mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
MDEV-4817: Optimizer fails to optimize expression of the form 'FOO' IS NULL
- Modify the way Item_cond::fix_fields() and Item_cond::eval_not_null_tables() calculate bitmap for Item_cond_or::not_null_tables(): if they see a "... OR inexpensive_const_false_item OR ..." then the item can be ignored. - Updated test results. There can be more warnings produced since parts of WHERE are evaluated more times.
This commit is contained in:
@ -663,9 +663,10 @@ Warning 1365 Division by 0
|
||||
Warning 1048 Column 'data' cannot be null
|
||||
update t1 set data='envelope' where 1/0 or 1;
|
||||
affected rows: 2
|
||||
info: Rows matched: 2 Changed: 2 Warnings: 3
|
||||
info: Rows matched: 2 Changed: 2 Warnings: 4
|
||||
Warnings:
|
||||
Warning 1365 Division by 0
|
||||
Warning 1365 Division by 0
|
||||
Warning 1265 Data truncated for column 'data' at row 1
|
||||
Warning 1265 Data truncated for column 'data' at row 2
|
||||
insert t1 (data) values (default), (1/0), ('dead beef');
|
||||
|
Reference in New Issue
Block a user