summaryrefslogtreecommitdiff
path: root/sql/item.h
diff options
context:
space:
mode:
authorsergefp@mysql.com <>2006-10-31 20:51:09 +0300
committersergefp@mysql.com <>2006-10-31 20:51:09 +0300
commit54a713aac54f97a19b3c90afdfca6122c506c1cf (patch)
tree9720832e2f3ce2403e51f324722b5522b5bac946 /sql/item.h
parent2ab34bac4b9b790c6476977272e18cdeae3d186b (diff)
downloadmariadb-git-54a713aac54f97a19b3c90afdfca6122c506c1cf.tar.gz
BUG#8804: wrong results for NULL IN (SELECT ...)
Evaluate "NULL IN (SELECT ...)" in a special way: Disable pushed-down conditions and their "consequences": = Do full table scans instead of unique_[index_subquery] lookups. = Change appropriate "ref_or_null" accesses to full table scans in subquery's joins. Also cache value of NULL IN (SELECT ...) if the SELECT is not correlated wrt any upper select.
Diffstat (limited to 'sql/item.h')
-rw-r--r--sql/item.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/sql/item.h b/sql/item.h
index 0cfb0b01fd8..566daa1aaee 100644
--- a/sql/item.h
+++ b/sql/item.h
@@ -1959,6 +1959,16 @@ public:
class Item_in_subselect;
+
+/*
+ An object of this class:
+ - Converts val_XXX() calls to ref->val_XXX_result() calls, like Item_ref.
+ - Sets owner->was_null=TRUE if it has returned a NULL value from any
+ val_XXX() function. This allows to inject an Item_ref_null_helper
+ object into subquery and then check if the subquery has produced a row
+ with NULL value.
+*/
+
class Item_ref_null_helper: public Item_ref
{
protected: