Commit c09b1583 authored by Sergei Golubchik's avatar Sergei Golubchik

cleanup: remove FixedBinTypeBundle

now the main class is the Type_handler_fbt.

It contains everything and generates objects of all other classes as
needed.
parent 238cfcc7
......@@ -158,7 +158,7 @@ String *Item_func_inet6_aton::val_str(String *buffer)
return buffer;
}
Inet6Bundle::Fbt_null ipv6(*tmp.string());
Type_handler_inet6::Fbt_null ipv6(*tmp.string());
if (!ipv6.is_null())
{
ipv6.to_binary(buffer);
......@@ -197,7 +197,7 @@ String *Item_func_inet6_ntoa::val_str_ascii(String *buffer)
return buffer;
}
Inet6Bundle::Fbt_null ipv6(static_cast<const Binary_string&>(*tmp.string()));
Type_handler_inet6::Fbt_null ipv6(static_cast<const Binary_string&>(*tmp.string()));
if (!ipv6.is_null())
{
ipv6.to_string(buffer);
......@@ -221,10 +221,10 @@ longlong Item_func_is_ipv4::val_int()
return !tmp.is_null() && !Inet4_null(*tmp.string()).is_null();
}
class IP6 : public Inet6Bundle::Fbt_null
class IP6 : public Type_handler_inet6::Fbt_null
{
public:
IP6(Item* arg) : Inet6Bundle::Fbt_null(arg) {}
IP6(Item* arg) : Type_handler_inet6::Fbt_null(arg) {}
bool is_v4compat() const
{
static_assert(sizeof(in6_addr) == IN6_ADDR_SIZE, "unexpected in6_addr size");
......@@ -246,7 +246,7 @@ longlong Item_func_is_ipv6::val_int()
{
DBUG_ASSERT(fixed());
String_ptr_and_buffer<STRING_BUFFER_USUAL_SIZE> tmp(args[0]);
return !tmp.is_null() && !Inet6Bundle::Fbt_null(*tmp.string()).is_null();
return !tmp.is_null() && !Type_handler_inet6::Fbt_null(*tmp.string()).is_null();
}
/**
......
......@@ -24,7 +24,7 @@
static struct st_mariadb_data_type plugin_descriptor_type_inet6=
{
MariaDB_DATA_TYPE_INTERFACE_VERSION,
Inet6Bundle::type_handler_fbt()
Type_handler_inet6::singleton()
};
......
......@@ -44,7 +44,7 @@ class Inet6: public FixedBinTypeStorage<IN6_ADDR_SIZE, IN6_ADDR_MAX_CHAR_LENGTH>
#include "sql_type_fixedbin.h"
typedef FixedBinTypeBundle<Inet6> Inet6Bundle;
typedef Type_handler_fbt<Inet6> Type_handler_inet6;
/***********************************************************************/
......
This source diff could not be displayed because it is too large. You can view the blob instead.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment