diff options
author | unknown <igor@rurik.mysql.com> | 2006-05-17 20:48:48 -0700 |
---|---|---|
committer | unknown <igor@rurik.mysql.com> | 2006-05-17 20:48:48 -0700 |
commit | 087be9ba2d230c21949d65140658b6ce198f4e9f (patch) | |
tree | 30f94684f51cc209922f2f61bceba3aa5af5b49a /sql | |
parent | f1efd0883d4201b7fb8a60ee40f0024cafd01fd3 (diff) | |
download | mariadb-git-087be9ba2d230c21949d65140658b6ce198f4e9f.tar.gz |
Fixed bug #19816.
This bug was introduced when the patch resolving the
performance problem 17164 was applied. As a result
of that modification the not_null_tables attributes
were calculated incorrectly for constant OR conditions.
This triggered invalid conversion of outer joins into
inner joins.
mysql-test/r/join_outer.result:
Added a test case for bug #19816.
mysql-test/t/join_outer.test:
Added a test case for bug #19816.
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item_cmpfunc.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/sql/item_cmpfunc.cc b/sql/item_cmpfunc.cc index 54e281a1f14..a9cf44f301f 100644 --- a/sql/item_cmpfunc.cc +++ b/sql/item_cmpfunc.cc @@ -2570,7 +2570,9 @@ Item_cond::fix_fields(THD *thd, Item **ref) (item= *li.ref())->check_cols(1)) return TRUE; /* purecov: inspected */ used_tables_cache|= item->used_tables(); - if (!item->const_item()) + if (item->const_item()) + and_tables_cache= (table_map) 0; + else { tmp_table_map= item->not_null_tables(); not_null_tables_cache|= tmp_table_map; |