summaryrefslogtreecommitdiff
path: root/sql/item_cmpfunc.cc
diff options
context:
space:
mode:
authorunknown <igor@rurik.mysql.com>2006-03-24 12:46:33 -0800
committerunknown <igor@rurik.mysql.com>2006-03-24 12:46:33 -0800
commita18307f582b37e6c3b1d9c76fa6cb804990f34bf (patch)
treec1292db84e5a6c3b0dab2e391102e36ebdcd30e6 /sql/item_cmpfunc.cc
parentd953e153913ffe9737ba5d53ec1057bd4dd94fd2 (diff)
parentc0579144d5a9a9c64aa4a928aaefed45152185f1 (diff)
downloadmariadb-git-a18307f582b37e6c3b1d9c76fa6cb804990f34bf.tar.gz
Merge rurik.mysql.com:/home/igor/dev/mysql-5.0-0
into rurik.mysql.com:/home/igor/dev/mysql-5.1-0 mysql-test/r/join_outer.result: Auto merged sql/item_cmpfunc.cc: Auto merged
Diffstat (limited to 'sql/item_cmpfunc.cc')
-rw-r--r--sql/item_cmpfunc.cc11
1 files changed, 7 insertions, 4 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc
index 6c19c96f77c..e2ea592403e 100644
--- a/sql/item_cmpfunc.cc
+++ b/sql/item_cmpfunc.cc
@@ -2563,10 +2563,13 @@ Item_cond::fix_fields(THD *thd, Item **ref)
(item= *li.ref())->check_cols(1))
return TRUE; /* purecov: inspected */
used_tables_cache|= item->used_tables();
- tmp_table_map= item->not_null_tables();
- not_null_tables_cache|= tmp_table_map;
- and_tables_cache&= tmp_table_map;
- const_item_cache&= item->const_item();
+ if (!item->const_item())
+ {
+ tmp_table_map= item->not_null_tables();
+ not_null_tables_cache|= tmp_table_map;
+ and_tables_cache&= tmp_table_map;
+ const_item_cache= FALSE;
+ }
with_sum_func= with_sum_func || item->with_sum_func;
if (item->maybe_null)
maybe_null=1;