diff options
author | Alexander Barkov <bar@mariadb.org> | 2017-11-09 15:41:26 +0400 |
---|---|---|
committer | Alexander Barkov <bar@mariadb.org> | 2017-11-09 15:41:26 +0400 |
commit | 62333983e4cc72ee68f2b6990b58a59aa81af0fe (patch) | |
tree | 42184f58f95ccb6a95d95a4f24070f5ab6fc8e08 /sql/item_inetfunc.cc | |
parent | 7c85a8d936b1a8bb82ff069f82f5ecf3ff2ab654 (diff) | |
parent | 0fdb0bdf2769dc4e69d46b342200d3fd333fa3a5 (diff) | |
download | mariadb-git-62333983e4cc72ee68f2b6990b58a59aa81af0fe.tar.gz |
Merge remote-tracking branch 'origin/10.1' into 10.2
Diffstat (limited to 'sql/item_inetfunc.cc')
-rw-r--r-- | sql/item_inetfunc.cc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sql/item_inetfunc.cc b/sql/item_inetfunc.cc index cf484d251a9..4ea0f544819 100644 --- a/sql/item_inetfunc.cc +++ b/sql/item_inetfunc.cc @@ -181,7 +181,8 @@ String *Item_func_inet_str_base::val_str_ascii(String *buffer) return NULL; } - String *arg_str= args[0]->val_str(buffer); + StringBuffer<STRING_BUFFER_USUAL_SIZE> tmp; + String *arg_str= args[0]->val_str(&tmp); if (!arg_str) // Out-of memory happened. The error has been reported. { // Or: the underlying field is NULL null_value= true; @@ -679,7 +680,7 @@ static void ipv6_to_str(const in6_addr *ipv6, char *str) @retval true The string has been converted sucessfully. */ -bool Item_func_inet6_aton::calc_value(String *arg, String *buffer) +bool Item_func_inet6_aton::calc_value(const String *arg, String *buffer) { // ipv4-string -> varbinary(4) // ipv6-string -> varbinary(16) @@ -719,7 +720,7 @@ bool Item_func_inet6_aton::calc_value(String *arg, String *buffer) @retval true The string has been converted sucessfully. */ -bool Item_func_inet6_ntoa::calc_value(String *arg, String *buffer) +bool Item_func_inet6_ntoa::calc_value(const String *arg, String *buffer) { if (arg->charset() != &my_charset_bin) return false; |