diff options
author | unknown <timour@mysql.com> | 2004-08-30 15:26:27 +0300 |
---|---|---|
committer | unknown <timour@mysql.com> | 2004-08-30 15:26:27 +0300 |
commit | 2466cbc4793fd56e531d128225227ba05e019757 (patch) | |
tree | 262d8b9780a57dfc4d3423dbc87ee4a45930283f /sql/item_cmpfunc.h | |
parent | 88fe390a721e4bc92918f8571cdf8961dc340796 (diff) | |
download | mariadb-git-2466cbc4793fd56e531d128225227ba05e019757.tar.gz |
Fix for Bug#3759
The cause of the bug is that Item_func_in::fix_fields did not fully update its
used_table_cache. This was the cause for not_null_tables in setup_conds() to be
still 0 after the call
not_null_tables= (*conds)->not_null_tables();
As a result the condition in setup_conds()
if ( ... (table->table->map & not_null_tables) ...)
failed, which was the cause for the ON expression not to be added to conds, and later
the optimizer couldn't detect that it could apply the OUTER JOIN ==> JOIN optimization.
sql/item_cmpfunc.h:
Fix for Bug#3759
BitKeeper/etc/logging_ok:
Logging to logging@openlogging.org accepted
Diffstat (limited to 'sql/item_cmpfunc.h')
-rw-r--r-- | sql/item_cmpfunc.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index 236ebb8d28b..a4f8118f21d 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -431,6 +431,9 @@ class Item_func_in :public Item_int_func { bool res= (item->fix_fields(thd,tlist) || Item_func::fix_fields(thd,tlist)); with_sum_func= with_sum_func || item->with_sum_func; + used_tables_cache|= item->used_tables(); + not_null_tables_cache|= item->not_null_tables(); + const_item_cache&= item->const_item(); return res; } void fix_length_and_dec(); |