diff options
author | Igor Babaev <igor@askmonty.org> | 2011-07-13 21:06:28 -0700 |
---|---|---|
committer | Igor Babaev <igor@askmonty.org> | 2011-07-13 21:06:28 -0700 |
commit | ff9c406c1d3ac007d0079a4ef16d86b7a8b823bb (patch) | |
tree | 0cbb52268a50c48149f87834ebb0b1e3e1d2fd39 /sql/item_row.cc | |
parent | 7c46dc525e65ce2cde71a9591fc780f44bebc384 (diff) | |
download | mariadb-git-ff9c406c1d3ac007d0079a4ef16d86b7a8b823bb.tar.gz |
Fixed LP bug #809179.
The attribute not_null_tables could be calculated incorrectly in the
function SELECT_LEX::update_used_tables for queries over views
with row items in the WHERE clause. It happened because no
implementation of the virtual callback function eval_not_null_tables
was provided for the class Item_row.
Also slightly optimized the code calculating the value of the maybe_null
flag for tables in the function SELECT_LEX::update_used_tables.
Diffstat (limited to 'sql/item_row.cc')
-rw-r--r-- | sql/item_row.cc | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sql/item_row.cc b/sql/item_row.cc index 99a1644cc48..09977d71bb7 100644 --- a/sql/item_row.cc +++ b/sql/item_row.cc @@ -93,6 +93,22 @@ bool Item_row::fix_fields(THD *thd, Item **ref) } +bool +Item_row::eval_not_null_tables(uchar *opt_arg) +{ + Item **arg,**arg_end; + not_null_tables_cache= 0; + if (arg_count) + { + for (arg= items, arg_end= items+arg_count; arg != arg_end ; arg++) + { + not_null_tables_cache|= (*arg)->not_null_tables(); + } + } + return FALSE; +} + + void Item_row::cleanup() { DBUG_ENTER("Item_row::cleanup"); |