mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user