subselect.test, subselect.result:
Added a test case for bug #12392. item_cmpfunc.cc: Fixed bug #12392. Missing handling of rows containing NULL components when evaluating IN predicates caused a crash.
This commit is contained in:
parent
0ff109f170
commit
73be194f96
@ -2742,3 +2742,9 @@ one two flag
|
||||
5 6 N
|
||||
7 8 N
|
||||
DROP TABLE t1,t2;
|
||||
CREATE TABLE t1 (a char(5), b char(5));
|
||||
INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa');
|
||||
SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
|
||||
a b
|
||||
aaa aaa
|
||||
DROP TABLE t1;
|
||||
|
@ -1770,4 +1770,15 @@ SELECT * FROM t1
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
||||
#
|
||||
# Bug #12392: where cond with IN predicate for rows and NULL values in table
|
||||
#
|
||||
|
||||
CREATE TABLE t1 (a char(5), b char(5));
|
||||
INSERT INTO t1 VALUES (NULL,'aaa'), ('aaa','aaa');
|
||||
|
||||
SELECT * FROM t1 WHERE (a,b) IN (('aaa','aaa'), ('aaa','bbb'));
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
# End of 4.1 tests
|
||||
|
@ -1551,6 +1551,8 @@ in_row::~in_row()
|
||||
byte *in_row::get_value(Item *item)
|
||||
{
|
||||
tmp.store_value(item);
|
||||
if (item->is_null())
|
||||
return 0;
|
||||
return (byte *)&tmp;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user