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

@ -726,7 +726,7 @@ SET sql_mode= 'STRICT_ALL_TABLES';
CREATE TABLE t1 (f1 INT DEFAULT 0, f2 INT);
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
REPLACE INTO v1 SET f2 = 1;
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
SELECT * from t1;
f1 f2
drop view v1;
@ -739,7 +739,7 @@ drop view v1;
SELECT 0,0 INTO OUTFILE 't1.txt';
CREATE ALGORITHM = MERGE VIEW v1 AS SELECT f1, f2 FROM t1 WHERE f1 = 'x' WITH CHECK OPTION;
LOAD DATA INFILE 't1.txt' INTO TABLE v1;
ERROR 22007: Truncated incorrect DOUBLE value: 'x'
ERROR 22007: Truncated incorrect DECIMAL value: 'x'
SELECT * from t1;
f1 f2
drop view v1;
@ -748,6 +748,6 @@ SET @@sql_mode= @save_mode;
CREATE TABLE t1 (f INT);
CREATE VIEW v1 AS SELECT * FROM t1 WHERE f <=> 'foo' WITH CHECK OPTION;
REPLACE INTO v1 SET f = NULL;
ERROR 22007: Truncated incorrect DOUBLE value: 'foo'
ERROR 22007: Truncated incorrect DECIMAL value: 'foo'
DROP VIEW v1;
DROP TABLE t1;