summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorbell@sanja.is.com.ua <>2004-12-13 01:21:14 +0200
committerbell@sanja.is.com.ua <>2004-12-13 01:21:14 +0200
commitf65403cd75674f64523936d5f74aa108ec362cb4 (patch)
treeec81972a8b779540978b1b4f80daf0a9564935d6 /sql/item_cmpfunc.cc
parentb9abf25a555ff44c7ecbfde7d0c7052e8a65a414 (diff)
downloadmariadb-git-f65403cd75674f64523936d5f74aa108ec362cb4.tar.gz
fixed optimized SOME subquery
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 51212418b09..88083878053 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -120,7 +120,7 @@ longlong Item_func_not_all::val_int()
/*
return TRUE if there was records in underlaying select in max/min
- optimisation
+ optimisation (ALL subquery)
*/
if (empty_underlying_subquery())
return 1;
@@ -157,11 +157,11 @@ longlong Item_func_nop_all::val_int()
double value= args[0]->val();
/*
- return TRUE if there was records in underlaying select in max/min
- optimisation
+ return FALSE if there was records in underlaying select in max/min
+ optimisation (SAME/ANY subquery)
*/
if (empty_underlying_subquery())
- return 1;
+ return 0;
null_value= args[0]->null_value;
return (null_value || value == 0) ? 0 : 1;