summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <bell@sanja.is.com.ua>2004-12-13 01:21:14 +0200
committerunknown <bell@sanja.is.com.ua>2004-12-13 01:21:14 +0200
commita9457c573df0ce1b7505ee735140322badd628c0 (patch)
treeec81972a8b779540978b1b4f80daf0a9564935d6 /sql/item_cmpfunc.cc
parent3ce0df59372a3598ae39423e35bab877459693ad (diff)
downloadmariadb-git-a9457c573df0ce1b7505ee735140322badd628c0.tar.gz
fixed optimized SOME subquery
mysql-test/r/subselect.result: correct results of SOME subquery sql/item_cmpfunc.cc: some comments added 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;