summaryrefslogtreecommitdiff
path: root/sql/item_inetfunc.h
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.com>2018-12-14 11:30:34 +0400
committerAlexander Barkov <bar@mariadb.com>2018-12-15 07:02:03 +0400
commit375256bae71e3f20d4498990610842b2976b6187 (patch)
tree6e2d687aa732c4c3b1a7e3a6f984de1a8cdbee84 /sql/item_inetfunc.h
parent3b8c868aa19245633bf476b6dd265bebdf1393d4 (diff)
downloadmariadb-git-375256bae71e3f20d4498990610842b2976b6187.tar.gz
MDEV-18010 Add classes Inet4 and Inet6
Diffstat (limited to 'sql/item_inetfunc.h')
-rw-r--r--sql/item_inetfunc.h31
1 files changed, 4 insertions, 27 deletions
diff --git a/sql/item_inetfunc.h b/sql/item_inetfunc.h
index 4159d3db8e3..feeac9fa457 100644
--- a/sql/item_inetfunc.h
+++ b/sql/item_inetfunc.h
@@ -81,13 +81,7 @@ public:
{
null_value= false;
}
-
-public:
- virtual longlong val_int();
bool need_parentheses_in_default() { return false; }
-
-protected:
- virtual bool calc_value(const String *arg) = 0;
};
@@ -117,9 +111,6 @@ public:
{ return get_item_copy<Item_func_inet6_aton>(thd, this); }
String *val_str(String *to);
-
-protected:
- bool calc_value(const String *arg, String *buffer);
};
@@ -153,9 +144,6 @@ public:
String *val_str_ascii(String *to);
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_inet6_ntoa>(thd, this); }
-
-protected:
- bool calc_value(const Binary_string *arg, String *buffer);
};
@@ -176,8 +164,7 @@ public:
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_is_ipv4>(thd, this); }
-protected:
- virtual bool calc_value(const String *arg);
+ longlong val_int();
};
@@ -192,14 +179,12 @@ public:
Item_func_inet_bool_base(thd, ip_addr)
{ }
-public:
virtual const char *func_name() const
{ return "is_ipv6"; }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_is_ipv6>(thd, this); }
-protected:
- virtual bool calc_value(const String *arg);
+ longlong val_int();
};
@@ -213,15 +198,11 @@ public:
inline Item_func_is_ipv4_compat(THD *thd, Item *ip_addr):
Item_func_inet_bool_base(thd, ip_addr)
{ }
-
-public:
virtual const char *func_name() const
{ return "is_ipv4_compat"; }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_is_ipv4_compat>(thd, this); }
-
-protected:
- virtual bool calc_value(const String *arg);
+ longlong val_int();
};
@@ -235,15 +216,11 @@ public:
inline Item_func_is_ipv4_mapped(THD *thd, Item *ip_addr):
Item_func_inet_bool_base(thd, ip_addr)
{ }
-
-public:
virtual const char *func_name() const
{ return "is_ipv4_mapped"; }
Item *get_copy(THD *thd)
{ return get_item_copy<Item_func_is_ipv4_mapped>(thd, this); }
-
-protected:
- virtual bool calc_value(const String *arg);
+ longlong val_int();
};
#endif // ITEM_INETFUNC_INCLUDED