Commit 2466cbc4 authored by unknown's avatar unknown
Browse files

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
parent 88fe390a
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -136,6 +136,7 @@ tim@sand.box
tim@threads.polyesthetic.msg
tim@white.box
tim@work.mysql.com
timour@mysql.com
tom@basil-firewall.home.com
tonu@hundin.mysql.fi
tonu@volk.internalnet
+3 −0
Original line number Diff line number Diff line
@@ -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();