summaryrefslogtreecommitdiff
path: root/mysql-test/r/func_test.result
diff options
context:
space:
mode:
authorunknown <evgen@moonbone.local>2007-03-07 21:44:58 +0300
committerunknown <evgen@moonbone.local>2007-03-07 21:44:58 +0300
commit5219dad6bb0019813e481cb937e6625d78e56e88 (patch)
tree6337a96cdf5cae4f0ad0153d8d89ed7c2ce285bf /mysql-test/r/func_test.result
parent147a8485627993ae0e2c10f6576fab54696afa3b (diff)
downloadmariadb-git-5219dad6bb0019813e481cb937e6625d78e56e88.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. mysql-test/t/explain.test: Added a test case for the bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized away. mysql-test/r/subselect.result: Corrected test case result after fix for bug#22331. mysql-test/r/func_test.result: Corrected test case result after fix for bug#22331. mysql-test/r/explain.result: Added a test case for the bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized away. sql/sql_select.cc: Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized away. 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. sql/sql_lex.h: Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized away. The cond_value and the having_value variables are added to the SELECT_LEX class. sql/sql_lex.cc: Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized away. The initialization of the cond_value and the having_value variables. sql/sql_select.h: Bug#22331: Wrong WHERE in EXPLAIN EXTENDED when all expressions were optimized away. Now having_value is also stored in the JOIN class.
Diffstat (limited to 'mysql-test/r/func_test.result')
-rw-r--r--mysql-test/r/func_test.result2
1 files changed, 1 insertions, 1 deletions
diff --git a/mysql-test/r/func_test.result b/mysql-test/r/func_test.result
index 43832bdbccc..c3fbdb3b3bf 100644
--- a/mysql-test/r/func_test.result
+++ b/mysql-test/r/func_test.result
@@ -79,7 +79,7 @@ explain extended select * from t1 where 1 xor 1;
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE
Warnings:
-Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1`
+Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where 0
select - a from t1;
- a
-1