1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers and strings

This commit is contained in:
Alexander Barkov
2022-07-06 15:42:21 +04:00
parent bdc1134dea
commit 57f5c319af
63 changed files with 733 additions and 498 deletions

View File

@ -372,7 +372,7 @@ select position("0" in "baaa" in (1)),position("0" in "1" in (1,2,3)),position("
position("0" in "baaa" in (1)) position("0" in "1" in (1,2,3)) position("sql" in ("mysql"))
1 0 3
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'baaa'
Warning 1292 Truncated incorrect DECIMAL value: 'baaa'
select position(("1" in (1,2,3)) in "01");
position(("1" in (1,2,3)) in "01")
2
@ -1184,12 +1184,12 @@ SELECT * FROM t1, t2 WHERE num=str;
str num
notnumber 0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'notnumber'
Warning 1292 Truncated incorrect DECIMAL value: 'notnumber'
SELECT * FROM t1, t2 WHERE num=substring(str from 1 for 6);
str num
notnumber 0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'notnum'
Warning 1292 Truncated incorrect DECIMAL value: 'notnum'
DROP TABLE t1,t2;
CREATE TABLE t1(
id int(11) NOT NULL auto_increment,