mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +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:
@ -3129,6 +3129,7 @@ WHERE table1 .`col_varchar_key` ) field10
|
||||
1 NULL f
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
SET @@optimizer_switch = 'subquery_cache=on';
|
||||
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
|
||||
SELECT SUBQUERY2_t1 .`col_int_key`
|
||||
@ -3144,6 +3145,7 @@ WHERE table1 .`col_varchar_key` ) field10
|
||||
1 NULL f
|
||||
Warnings:
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
Warning 1292 Truncated incorrect DOUBLE value: 'f'
|
||||
drop table t1,t2,t3,t4;
|
||||
set @@optimizer_switch= default;
|
||||
#launchpad BUG#611625
|
||||
|
Reference in New Issue
Block a user