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:
@ -292,7 +292,7 @@ public:
|
||||
|
||||
bool need_tmp, hidden_group_fields;
|
||||
DYNAMIC_ARRAY keyuse;
|
||||
Item::cond_result cond_value;
|
||||
Item::cond_result cond_value, having_value;
|
||||
List<Item> all_fields; // to store all fields that used in query
|
||||
//Above list changed to use temporary table
|
||||
List<Item> tmp_all_fields1, tmp_all_fields2, tmp_all_fields3;
|
||||
|
Reference in New Issue
Block a user