summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2004-11-04 20:39:52 -0800
committerunknown <igor@rurik.mysql.com>2004-11-04 20:39:52 -0800
commit62ded37e365041e315f0f6317bdeda99f7a55ad0 (patch)
treed391297d0aa15aa8b3ffb743dd1af8b6b38edca3 /sql/item_cmpfunc.cc
parent7f3749c82ff55deb4f25626084b242ce6c2306e1 (diff)
downloadmariadb-git-62ded37e365041e315f0f6317bdeda99f7a55ad0.tar.gz
func_in.result, func_in.test:
Added a case for bug #6365. item_cmpfunc.cc: Fixed bug #6365 : Server crashed when list of values in IN predicate contains NULL while the tested field is of the character type and not of the default set; e.g. when f in 'f IN (NULL,'aa') belongs to binary character set, while the default character set is latin1. sql/item_cmpfunc.cc: Fixed bug #6365 : Server crash when list of values in IN predicate contains NULL while the tested field is of the character type of not of the default set e.g. when f in 'f IN (NULL,'aa') belongs to binary character set, while the default character set is latin1. mysql-test/t/func_in.test: Added a case for bug #6365. mysql-test/r/func_in.result: Added a case for bug #6365.
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 701894cacb5..a28f0f5d4a9 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -1749,7 +1749,8 @@ void Item_func_in::fix_length_and_dec()
thd->set_n_backup_item_arena(arena, &backup);
for (arg= args+1, arg_end= args+arg_count; arg < arg_end; arg++)
{
- if (!my_charset_same(cmp_collation.collation,
+ if (!arg[0]->null_value &&
+ !my_charset_same(cmp_collation.collation,
arg[0]->collation.collation))
{
Item_string *conv;