mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
MDEV-8222 "string_field LIKE int_const" returns a wrong result in case of UCS2
MDEV-8257 Erroneous "Impossible where" when mixing decimal comparison and LIKE
This commit is contained in:
@ -200,3 +200,32 @@ SELECT 'a' LIKE REPEAT('',0);
|
||||
SELECT 'a' LIKE EXTRACTVALUE('bar','qux');
|
||||
'a' LIKE EXTRACTVALUE('bar','qux')
|
||||
0
|
||||
#
|
||||
# End of 10.0 tests
|
||||
#
|
||||
#
|
||||
# Start of 10.1 tests
|
||||
#
|
||||
#
|
||||
# MDEV-8257 Erroneous "Impossible where" when mixing decimal comparison and LIKE
|
||||
#
|
||||
CREATE TABLE t1 (a DECIMAL(8,2));
|
||||
INSERT INTO t1 VALUES (10),(20);
|
||||
SELECT * FROM t1 WHERE a=10.0;
|
||||
a
|
||||
10.00
|
||||
SELECT * FROM t1 WHERE a LIKE 10.00;
|
||||
a
|
||||
10.00
|
||||
SELECT * FROM t1 WHERE a=10.0 AND a LIKE 10.00;
|
||||
a
|
||||
10.00
|
||||
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a=10.0 AND a LIKE 10.00;
|
||||
id select_type table type possible_keys key key_len ref rows filtered Extra
|
||||
1 SIMPLE t1 ALL NULL NULL NULL NULL 2 100.00 Using where
|
||||
Warnings:
|
||||
Note 1003 select `test`.`t1`.`a` AS `a` from `test`.`t1` where ((`test`.`t1`.`a` = 10.0) and (`test`.`t1`.`a` like 10.00))
|
||||
DROP TABLE t1;
|
||||
#
|
||||
# End of 10.1 tests
|
||||
#
|
||||
|
Reference in New Issue
Block a user