diff options
author | holyfoot/hf@mysql.com/hfmain.(none) <> | 2007-10-30 12:35:03 +0400 |
---|---|---|
committer | holyfoot/hf@mysql.com/hfmain.(none) <> | 2007-10-30 12:35:03 +0400 |
commit | e93574e9d16efc747a88875325469e2b029e5eb8 (patch) | |
tree | 2706c4c4b6b4d907d9501a6ef605079be702dc65 /sql/item_strfunc.h | |
parent | 29ea825e574aaeb3ebd3e02b44a105b26da899ec (diff) | |
download | mariadb-git-e93574e9d16efc747a88875325469e2b029e5eb8.tar.gz |
Bug #31758 inet_ntoa, oct crashes server with null+filesort
Item_func_inet_ntoa and Item_func_conv inherit 'maybe_null' flag from an
argument, which is wrong.
Both can be NULL with notnull arguments, so that's fixed.
Diffstat (limited to 'sql/item_strfunc.h')
-rw-r--r-- | sql/item_strfunc.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_strfunc.h b/sql/item_strfunc.h index 4bd8574ff04..b438ac81763 100644 --- a/sql/item_strfunc.h +++ b/sql/item_strfunc.h @@ -531,6 +531,7 @@ public: { collation.set(default_charset()); decimals=0; max_length=64; + maybe_null= 1; } }; @@ -623,7 +624,7 @@ public: } String* val_str(String* str); const char *func_name() const { return "inet_ntoa"; } - void fix_length_and_dec() { decimals = 0; max_length=3*8+7; } + void fix_length_and_dec() { decimals = 0; max_length=3*8+7; maybe_null=1;} }; class Item_func_quote :public Item_str_func |