diff options
author | evgen@moonbone.local <> | 2007-03-07 21:44:58 +0300 |
---|---|---|
committer | evgen@moonbone.local <> | 2007-03-07 21:44:58 +0300 |
commit | 7afa5f1c5af3b78ff1db21c191e36258d6f478e7 (patch) | |
tree | 6337a96cdf5cae4f0ad0153d8d89ed7c2ce285bf /sql/sql_lex.cc | |
parent | 0461228a701d017754437e88b03c523b0fddbc21 (diff) | |
download | mariadb-git-7afa5f1c5af3b78ff1db21c191e36258d6f478e7.tar.gz |
Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized
away.
During optimization stage the WHERE conditions can be changed or even
be removed at all if they know for sure to be true of false. Thus they aren't
showed in the EXPLAIN EXTENDED which prints conditions after optimization.
Now if all elements of an Item_cond were removed this Item_cond is substituted
for an Item_int with the int value of the Item_cond.
If there were conditions that were totally optimized away then values of the
saved cond_value and having_value will be printed instead.
Diffstat (limited to 'sql/sql_lex.cc')
-rw-r--r-- | sql/sql_lex.cc | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index ce76c35b33c..86590e10535 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -1192,6 +1192,7 @@ void st_select_lex::init_select() is_correlated= 0; cur_pos_in_select_list= UNDEF_POS; non_agg_fields.empty(); + cond_value= having_value= Item::COND_UNDEF; } /* |