mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Fixed bug mdev-5132.
Objects of the classes Item_func_isnull and Item_func_isnotnull must have the flag sargable set to TRUE. Set the value of the flag sargable only in constructors of the classes inherited from Item_int_func.
This commit is contained in:
@ -373,3 +373,12 @@ id select_type table type possible_keys key key_len ref rows Extra
|
||||
SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL);
|
||||
dt
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# Bug mdev-5132: crash when exeicuting a join query
|
||||
# with IS NULL and IS NOT NULL in where
|
||||
#
|
||||
CREATE TABLE t1 (a DATE, b INT, c INT, KEY(a), KEY(b), KEY(c)) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (d DATE) ENGINE=MyISAM;
|
||||
SELECT * FROM t1,t2 WHERE 1 IS NOT NULL AND t1.b IS NULL;
|
||||
a b c d
|
||||
DROP TABLE t1,t2;
|
||||
|
@ -283,3 +283,15 @@ SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL);
|
||||
SELECT * FROM t1 WHERE NOT (concat( dt, '1' ) IS NOT NULL);
|
||||
|
||||
DROP TABLE t1;
|
||||
|
||||
--echo #
|
||||
--echo # Bug mdev-5132: crash when exeicuting a join query
|
||||
--echo # with IS NULL and IS NOT NULL in where
|
||||
--echo #
|
||||
|
||||
CREATE TABLE t1 (a DATE, b INT, c INT, KEY(a), KEY(b), KEY(c)) ENGINE=MyISAM;
|
||||
CREATE TABLE t2 (d DATE) ENGINE=MyISAM;
|
||||
|
||||
SELECT * FROM t1,t2 WHERE 1 IS NOT NULL AND t1.b IS NULL;
|
||||
|
||||
DROP TABLE t1,t2;
|
||||
|
Reference in New Issue
Block a user