#At file:///home/spetrunia/dev/mysql-5.1-bug37822/ based on
revid:aelkin@stripped
2751 Sergey Petrunia 2009-01-28
BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
Item_in_optimizer::is_null() evaluated "NULL IN (SELECT ...)" to NULL regardless of
whether subquery produced any records, this was a documented limitation.
The limitation has been removed (see bugs 8804, 24085, 24127) now
Item_in_optimizer::val_int() correctly handles all cases with NULLs. Make
Item_in_optimizer::is_null() invoke val_int() to return correct values for
"NULL IN (SELECT ...)".
modified:
sql/item_cmpfunc.cc
per-file messages:
sql/item_cmpfunc.cc
BUG#37822: Correlated subquery with IN and IS UNKNOWN provides wrong result
Item_in_optimizer::is_null() evaluated "NULL IN (SELECT ...)" to NULL
regardless of whether subquery produced any records, this was a documented limitation.
The limitation has been removed (see bugs 8804, 24085, 24127) now
Item_in_optimizer::val_int() correctly handles all cases with NULLs. Make
Item_in_optimizer::is_null() invoke val_int() to return correct values for
"NULL IN (SELECT ...)".
=== modified file 'sql/item_cmpfunc.cc'
--- a/sql/item_cmpfunc.cc 2009-01-15 18:11:25 +0000
+++ b/sql/item_cmpfunc.cc 2009-01-28 15:17:59 +0000
@@ -1623,8 +1623,8 @@ void Item_in_optimizer::cleanup()
bool Item_in_optimizer::is_null()
{
- cache->store(args[0]);
- return (null_value= (cache->null_value || args[1]->is_null()));
+ val_int();
+ return null_value;
}
| Thread |
|---|
| • bzr commit into mysql-5.1-bugteam branch (sergefp:2751) Bug#37822 | Sergey Petrunia | 28 Jan 2009 |