diff options
author | Michael Widenius <monty@askmonty.org> | 2013-01-17 02:27:10 +0200 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2013-01-17 02:27:10 +0200 |
commit | c65f9a1914b8abd26dd7f31099ed09116e429b9d (patch) | |
tree | b995f6fbd899cf1c424d6e5d2b77d1c9c39acd06 /sql | |
parent | c4e00d03e79c6202100f15244b10a74386d16568 (diff) | |
download | mariadb-git-c65f9a1914b8abd26dd7f31099ed09116e429b9d.tar.gz |
Don't reset maybe_null in update_used_tables(); This breaks ROLLUP
This fixed failing test in group_by.test
mysql-test/r/join_outer.result:
Updated test case
mysql-test/r/join_outer_jcl6.result:
Updated test case
sql/item.cc:
Don't reset maybe_null in update_used_tables(); This breaks ROLLUP
sql/item.h:
Don't reset maybe_null in update_used_tables(); This breaks ROLLUP
sql/item_cmpfunc.h:
Don't reset maybe_null in update_used_tables(); This breaks ROLLUP
Diffstat (limited to 'sql')
-rw-r--r-- | sql/item.cc | 2 | ||||
-rw-r--r-- | sql/item.h | 4 | ||||
-rw-r--r-- | sql/item_cmpfunc.h | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/sql/item.cc b/sql/item.cc index e6462d1c070..2c435eb6a9f 100644 --- a/sql/item.cc +++ b/sql/item.cc @@ -9603,7 +9603,7 @@ void Item_ref::update_used_tables() { if (!get_depended_from()) (*ref)->update_used_tables(); - maybe_null= (*ref)->maybe_null; + maybe_null|= (*ref)->maybe_null; } void Item_direct_view_ref::update_used_tables() diff --git a/sql/item.h b/sql/item.h index baff64cac24..89cb9b76439 100644 --- a/sql/item.h +++ b/sql/item.h @@ -2057,7 +2057,7 @@ public: { update_table_bitmaps(); if (field && field->table) - maybe_null= field->maybe_null(); + maybe_null|= field->maybe_null(); } Item *get_tmp_table_item(THD *thd); bool collect_item_field_processor(uchar * arg); @@ -3112,7 +3112,7 @@ public: void update_used_tables() { orig_item->update_used_tables(); - maybe_null= orig_item->maybe_null; + maybe_null|= orig_item->maybe_null; } bool const_item() const { return orig_item->const_item(); } table_map not_null_tables() const { return orig_item->not_null_tables(); } diff --git a/sql/item_cmpfunc.h b/sql/item_cmpfunc.h index e9b77152d12..eed9028a630 100644 --- a/sql/item_cmpfunc.h +++ b/sql/item_cmpfunc.h @@ -770,7 +770,7 @@ public: void update_used_tables() { Item_func_coalesce::update_used_tables(); - maybe_null= args[1]->maybe_null; + maybe_null|= args[1]->maybe_null; } const char *func_name() const { return "ifnull"; } Field *tmp_table_field(TABLE *table); @@ -797,7 +797,7 @@ public: void update_used_tables() { Item_func::update_used_tables(); - maybe_null= args[1]->maybe_null || args[2]->maybe_null; + maybe_null|= args[1]->maybe_null || args[2]->maybe_null; } uint decimal_precision() const; const char *func_name() const { return "if"; } |