Commit 57f5c319 authored by Alexander Barkov's avatar Alexander Barkov

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

parent bdc1134d
......@@ -161,32 +161,32 @@ EmployeeID SMALLINT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
FirstName VARCHAR(30) NOT NULL CHECK (CHAR_LENGTH(FirstName > 2))
);
INSERT INTO t1 VALUES (NULL, 'Ken');
ERROR 22007: Truncated incorrect DOUBLE value: 'Ken'
ERROR 22007: Truncated incorrect DECIMAL value: 'Ken'
SHOW WARNINGS;
Level Code Message
Error 1292 Truncated incorrect DOUBLE value: 'Ken'
Error 1292 Truncated incorrect DECIMAL value: 'Ken'
Error 4025 CONSTRAINT `t1.FirstName` failed for `test`.`t1`
INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
ERROR 22007: Truncated incorrect DOUBLE value: 'Ken'
ERROR 22007: Truncated incorrect DECIMAL value: 'Ken'
SHOW WARNINGS;
Level Code Message
Error 1292 Truncated incorrect DOUBLE value: 'Ken'
Error 1292 Truncated incorrect DECIMAL value: 'Ken'
Error 4025 CONSTRAINT `t1.FirstName` failed for `test`.`t1`
INSERT IGNORE INTO t1 VALUES (NULL, 'Ken');
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'Ken'
Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
INSERT IGNORE INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'Ken'
Warning 1292 Truncated incorrect DOUBLE value: 'Brian'
Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
Warning 1292 Truncated incorrect DECIMAL value: 'Brian'
set sql_mode="";
INSERT INTO t1 VALUES (NULL, 'Ken');
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'Ken'
Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
INSERT INTO t1 VALUES (NULL, 'Ken'),(NULL, 'Brian');
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'Ken'
Warning 1292 Truncated incorrect DOUBLE value: 'Brian'
Warning 1292 Truncated incorrect DECIMAL value: 'Ken'
Warning 1292 Truncated incorrect DECIMAL value: 'Brian'
set sql_mode=default;
select * from t1;
EmployeeID FirstName
......
......@@ -47,11 +47,11 @@ insert into t1 values (0x01,0x01);
select * from t1 where a=b;
a b
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '\x01'
Warning 1292 Truncated incorrect DECIMAL value: '\x01'
select * from t1 where a=b and b=0x01;
a b
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '\x01'
Warning 1292 Truncated incorrect DECIMAL value: '\x01'
drop table if exists t1;
CREATE TABLE t1 (b int(2) zerofill, c int(2) zerofill);
INSERT INTO t1 (b,c) VALUES (1,2), (1,1), (2,2);
......
......@@ -3371,17 +3371,17 @@ SELECT * FROM t1 WHERE a IN (1,2,3);
a
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1'
Warning 1292 Truncated incorrect DECIMAL value: '`1'
SELECT * FROM t1 WHERE a IN (1,2,3) AND a=' 1';
a
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1'
Warning 1292 Truncated incorrect DECIMAL value: '`1'
SELECT * FROM t1 WHERE a IN (1,2,3,'4') AND a=' 1';
a
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1'
Warning 1292 Truncated incorrect DECIMAL value: '`1'
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (1,2,3) AND a=' 1';
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
......
......@@ -10286,7 +10286,7 @@ SELECT * FROM t1 WHERE a=10;
a
1e1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1é1'
Warning 1292 Truncated incorrect DECIMAL value: '1é1'
SELECT * FROM t1 WHERE a='1e1';
a
1e1
......@@ -10295,12 +10295,12 @@ SELECT * FROM t1 WHERE a=10 AND a='1e1';
a
1e1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1é1'
Warning 1292 Truncated incorrect DECIMAL value: '1é1'
SELECT * FROM t1 WHERE (a,a)=(10,'1e1');
a
1e1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1é1'
Warning 1292 Truncated incorrect DECIMAL value: '1é1'
EXPLAIN EXTENDED SELECT * FROM t1 WHERE (a,a)=(10,'1e1');
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
......@@ -10317,17 +10317,17 @@ SELECT * FROM t1 WHERE a IN (1,2);
a
1ë1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1ë1'
Warning 1292 Truncated incorrect DECIMAL value: '1ë1'
SELECT * FROM t1 WHERE a IN (1,2) AND a='1ë1';
a
1ë1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1ë1'
Warning 1292 Truncated incorrect DECIMAL value: '1ë1'
SELECT * FROM t1 WHERE a IN (1,2,'x') AND a='1ë1';
a
1ë1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1ë1'
Warning 1292 Truncated incorrect DECIMAL value: '1ë1'
EXPLAIN EXTENDED SELECT * FROM t1 WHERE a IN (1,2) AND a='1ë1';
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
......
......@@ -677,13 +677,13 @@ a
A
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'A'
Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT DISTINCT a FROM t1 WHERE a=0;
a
A
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'A'
Warning 1292 Truncated incorrect DECIMAL value: 'A'
DROP TABLE t1;
CREATE TABLE t1 (a DATE);
INSERT INTO t1 VALUES ('1972-07-29'), ('1972-02-06');
......
......@@ -774,28 +774,28 @@ SELECT 'a' IN ('a',2);
1
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT 'a' IN ('a',2,NULL);
'a' IN ('a',2,NULL)
1
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT 'a' NOT IN ('a',2);
'a' NOT IN ('a',2)
0
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT 'a' NOT IN ('a',2,NULL);
'a' NOT IN ('a',2,NULL)
0
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT TIME'10:20:30' IN (1,TIME'10:20:30');
TIME'10:20:30' IN (1,TIME'10:20:30')
......@@ -999,25 +999,25 @@ SELECT a IN (1,'1') FROM t1;
a IN (1,'1')
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT a IN (1,'1',NULL) FROM t1;
a IN (1,'1',NULL)
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT a NOT IN (1,'1') FROM t1;
a NOT IN (1,'1')
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT a NOT IN (1,'1',NULL) FROM t1;
a NOT IN (1,'1',NULL)
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (bigint)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT a IN (1,TIME'10:20:30') FROM t1;
a IN (1,TIME'10:20:30')
......@@ -1197,7 +1197,7 @@ SELECT a IN ('a',1) FROM t1;
a IN ('a',1)
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT a IN ('a',TIME'10:20:30') FROM t1;
a IN ('a',TIME'10:20:30')
......@@ -1209,7 +1209,7 @@ SELECT a NOT IN ('a',1) FROM t1;
a NOT IN ('a',1)
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=2 handler=1 (double)
Note 1105 DBUG: [1] arg=2 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT a NOT IN ('a',TIME'10:20:30') FROM t1;
a NOT IN ('a',TIME'10:20:30')
......@@ -1577,7 +1577,7 @@ A NULL
B NULL
Warnings:
Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double)
Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN ('A',b,10);
a b
......@@ -1585,24 +1585,24 @@ A NULL
B NULL
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double)
Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (b,a,10);
a b
A NULL
Warnings:
Note 1105 DBUG: [0] arg=2 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double)
Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
Warning 1292 Truncated incorrect DOUBLE value: 'A'
Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT a,NULL AS b FROM t1 GROUP BY a HAVING 'A' IN (a,b,10);
a b
A NULL
Warnings:
Note 1105 DBUG: [0] arg=1 handler=0 (longblob)
Note 1105 DBUG: [1] arg=3 handler=1 (double)
Note 1105 DBUG: [1] arg=3 handler=1 (decimal)
Note 1105 DBUG: types_compatible=no bisect=no
Warning 1292 Truncated incorrect DOUBLE value: 'A'
Warning 1292 Truncated incorrect DECIMAL value: 'A'
DROP TABLE t1;
#
# MDEV-11497 Wrong result for (int_expr IN (mixture of signed and unsigned expressions))
......
......@@ -63,7 +63,7 @@ select nullif(1,'test');
nullif(1,'test')
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'test'
Warning 1292 Truncated incorrect DECIMAL value: 'test'
select NULLIF(NULL,NULL), NULLIF(NULL,1), NULLIF(NULL,1.0), NULLIF(NULL,"test");
NULLIF(NULL,NULL) NULLIF(NULL,1) NULLIF(NULL,1.0) NULLIF(NULL,"test")
NULL NULL NULL NULL
......
......@@ -498,21 +498,21 @@ f1
a
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
select f1, case f1 when 'a' then '+' when 1 then '-' end from t1;
f1 case f1 when 'a' then '+' when 1 then '-' end
a +
b NULL
1 -
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
create index t1f1_idx on t1(f1);
select f1 from t1 where f1 in ('a',1);
f1
1
a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
explain select f1 from t1 where f1 in ('a',1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index
......@@ -527,8 +527,8 @@ select f1 from t1 where f1 in (2,1);
f1
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
explain select f1 from t1 where f1 in (2,1);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t1 index t1f1_idx t1f1_idx 2 NULL 3 Using where; Using index
......@@ -539,9 +539,9 @@ f2
0
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
explain select f2 from t2 where f2 in ('a',2);
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
......@@ -549,21 +549,21 @@ select f2 from t2 where f2 in ('a','b');
f2
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
explain select f2 from t2 where f2 in ('a','b');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
select f2 from t2 where f2 in (1,'b');
f2
0
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
explain select f2 from t2 where f2 in (1,'b');
id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE t2 index t2f2 t2f2 5 NULL 3 Using where; Using index
......
......@@ -303,7 +303,7 @@ SELECT COALESCE(a) = COALESCE(b) FROM t1;
COALESCE(a) = COALESCE(b)
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DECIMAL value: ''
DROP TABLE t1;
#
# Bug #54461: crash with longblob and union or update with subquery
......
......@@ -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,
......
......@@ -1724,7 +1724,7 @@ min(timestampadd(month, 1>'', from_days('%Z')))
NULL
Warnings:
Warning 1292 Truncated incorrect INTEGER value: '%Z'
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DECIMAL value: ''
Warning 1292 Incorrect datetime value: '0000-00-00'
SET timestamp=UNIX_TIMESTAMP('2001-01-01 00:00:00');
create table t1(a time);
......
......@@ -1654,8 +1654,8 @@ SELECT 1 FROM g1 WHERE a >= ANY
(SELECT 1 FROM g1 WHERE a = geomfromtext('') OR a) ;
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
DROP TABLE g1;
#
# Bug#16451878 GEOMETRY QUERY CRASHES SERVER
......
......@@ -820,11 +820,11 @@ set sql_mode='';
SELECT a FROM t1 HAVING 'a' > 1;
a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT a FROM t1 HAVING "a" > 1;
a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT a FROM t1 HAVING `a` > 1;
a
2
......@@ -2324,17 +2324,17 @@ field1 field2
2004-10-11 18:13:00 1
2009-02-19 02:05:00 5
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'g'
Warning 1292 Truncated incorrect DOUBLE value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'g'
Warning 1292 Truncated incorrect DECIMAL value: 'o'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
SELECT alias2.f3 AS field1 , alias2.f1 AS field2 FROM t1 AS alias1 JOIN t1 AS alias2 ON alias2.f1 = alias1.f2 AND alias2.f1 != alias1.f4 GROUP BY field1 , field2 ;
field1 field2
2004-10-11 18:13:00 1
2009-02-19 02:05:00 5
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'g'
Warning 1292 Truncated incorrect DOUBLE value: 'o'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'g'
Warning 1292 Truncated incorrect DECIMAL value: 'o'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
SET SESSION SQL_MODE=default;
drop table t1;
#
......
......@@ -3270,11 +3270,11 @@ b min(a)
d 7
f 7
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'g'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DECIMAL value: 'g'
explain
SELECT b, min(a) FROM t1 WHERE (a > '0' AND (a > '1' OR b = 'd')) GROUP BY b;
id select_type table type possible_keys key key_len ref rows Extra
......
......@@ -529,7 +529,7 @@ ORDER BY t1.f2;
MAX(t2.f2)
NULL
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
DROP TABLE t1,t2;
End of 5.0 tests
#
......@@ -862,13 +862,13 @@ bar
SELECT DEFAULT(f) AS h FROM t1 HAVING h > 5;
h
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'A'
Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT DEFAULT(f) AS h FROM t1 HAVING h >= 0;
h
A
A
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'A'
Warning 1292 Truncated incorrect DECIMAL value: 'A'
SELECT DEFAULT(f) AS h FROM t1 HAVING h >= 'A';
h
A
......
......@@ -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;
......@@ -3881,8 +3881,8 @@ ORDER BY t2.v;
MAX(t1.i)
NULL
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'y'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'y'
EXPLAIN
SELECT MAX(t1.i)
......
......@@ -958,10 +958,10 @@ c c b
c NULL NULL
c NULL NULL
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
SET optimizer_switch=@save_optimizer_switch;
DROP TABLE t1,t2,t3,t4;
#
......
......@@ -442,7 +442,7 @@ NULLIF(1,1e0),
NULLIF(1,'2001-01-01'),
NULLIF(1,TIME'00:00:00');
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '2001-01-01'
Warning 1292 Truncated incorrect DECIMAL value: '2001-01-01'
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE `t1` (
......
......@@ -913,7 +913,7 @@ Warnings:
Warning 1366 Incorrect integer value: 'three' for column `test`.`t2`.`b` at row 2
UPDATE v SET a = NULL;
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
Warning 1292 Truncated incorrect DECIMAL value: 'foo'
DROP view v;
DROP TABLE t1, t2;
SET @save_isp=@@innodb_stats_persistent;
......
......@@ -297,12 +297,12 @@ id
2
3
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
Warning 1292 Truncated incorrect DOUBLE value: 'hello'
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
Warning 1292 Truncated incorrect DECIMAL value: 'hello'
select @@profiling;
@@profiling
1
......
......@@ -4381,15 +4381,15 @@ set sql_mode='STRICT_ALL_TABLES';
CREATE TABLE t1 (id int, count int);
insert into t1 values (1,1),(0,2);
update t1 set count = count + 1 where id = '1bad';
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
prepare stmt from "update t1 set count = count + 1 where id = '1bad'";
execute stmt;
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
deallocate prepare stmt;
prepare stmt from 'update t1 set count = count + 1 where id = ?';
set @a = '1bad';
execute stmt using @a;
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
deallocate prepare stmt;
drop table t1;
CREATE TABLE t1 (id decimal(10,5), count int);
......
......@@ -282,8 +282,8 @@ SET @arg00=1;
execute stmt4 using @arg00;
Field Type Null Key Default Extra
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
prepare stmt4 from ' show columns from t2 from test like ''a%'' ';
execute stmt4;
Field Type Null Key Default Extra
......
......@@ -7,15 +7,15 @@ set sql_mode='STRICT_TRANS_TABLES';
CREATE TABLE t1 (id int, count int) engine=innodb;
insert into t1 values (1,1),(0,2);
update t1 set count = count + 1 where id = '1bad';
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
prepare stmt from "update t1 set count = count + 1 where id = '1bad'";
execute stmt;
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
deallocate prepare stmt;
prepare stmt from 'update t1 set count = count + 1 where id = ?';
set @a = '1bad';
execute stmt using @a;
ERROR 22007: Truncated incorrect DOUBLE value: '1bad'
ERROR 22007: Truncated incorrect DECIMAL value: '1bad'
deallocate prepare stmt;
drop table t1;
CREATE TABLE t1 (id decimal(10,5), count int) engine=innodb;
......
......@@ -5215,11 +5215,11 @@ SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'z'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'q'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DECIMAL value: 'z'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'j'
DROP TABLE CC;
# End of test#45227
#
......
......@@ -5226,11 +5226,11 @@ SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'z'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'q'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DECIMAL value: 'z'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
DROP TABLE CC;
# End of test#45227
#
......
......@@ -5215,11 +5215,11 @@ SELECT `varchar_nokey` G1 FROM CC WHERE `int_nokey` AND `int_key` <= 4
HAVING G1 ORDER BY `varchar_key` LIMIT 6 ;
G1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'z'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'q'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DECIMAL value: 'z'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'q'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'j'
DROP TABLE CC;
# End of test#45227
#
......
......@@ -8721,11 +8721,11 @@ RETURN a = timestamp'2038-01-19 03:14:07.999999'
END
$$
SELECT f1(e) FROM t1;
ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30'
ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30'
SELECT f2(e) FROM t1;
ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30'
ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30'
SELECT f3(e) FROM t1;
ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30'
ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30'
DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
......
......@@ -141,7 +141,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b);
......@@ -4675,7 +4675,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -5949,7 +5949,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -6330,10 +6330,10 @@ ORDER BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
......@@ -6341,10 +6341,10 @@ GROUP BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2;
#
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)
......
......@@ -1677,7 +1677,7 @@ WHERE ( alias2.f1 , alias2.f2 ) IN ( SELECT max(f2) , f1 FROM t0 GROUP BY f2 , f
f1 f2
8 8
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'u'
Warning 1292 Truncated incorrect DECIMAL value: 'u'
EXPLAIN
SELECT * FROM t2 WHERE (f1b, f2b) IN (SELECT max(f1a), f2a FROM t1 GROUP BY f1a, f2a);
id select_type table type possible_keys key key_len ref rows Extra
......@@ -1711,7 +1711,7 @@ WHERE ( alias2.f1 , alias2.f2 ) IN ( SELECT max(f2) , f1 FROM t0 GROUP BY f2 , f
f1 f2
8 8
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'u'
Warning 1292 Truncated incorrect DECIMAL value: 'u'
EXPLAIN
SELECT * FROM t2 WHERE (f1b, f2b) IN (SELECT max(f1a), f2a FROM t1 GROUP BY f1a, f2a);
id select_type table type possible_keys key key_len ref rows Extra
......@@ -1903,8 +1903,8 @@ WHERE SUBQUERY2_t2.col_varchar_nokey IN
(SELECT col_varchar_nokey FROM t1 GROUP BY col_varchar_nokey));
col_int_key
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
set @@optimizer_switch='subquery_cache=off,materialization=off,in_to_exists=on,semijoin=off';
EXPLAIN
SELECT col_int_key
......@@ -1928,8 +1928,8 @@ WHERE SUBQUERY2_t2.col_varchar_nokey IN
(SELECT col_varchar_nokey FROM t1 GROUP BY col_varchar_nokey));
col_int_key
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
drop table t1, t2;
set @@optimizer_switch = @old_optimizer_switch;
#
......
This diff is collapsed.
......@@ -545,9 +545,9 @@ select * from t1 group by (a1 in (select col from columns));
a1 a2
1 - 00 2 - 00
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1 - 00'
Warning 1292 Truncated incorrect DOUBLE value: '1 - 01'
Warning 1292 Truncated incorrect DOUBLE value: '1 - 02'
Warning 1292 Truncated incorrect DECIMAL value: '1 - 00'
Warning 1292 Truncated incorrect DECIMAL value: '1 - 01'
Warning 1292 Truncated incorrect DECIMAL value: '1 - 02'
/* ORDER BY clause */
explain extended
select * from t1 order by (select col from columns limit 1);
......
......@@ -209,8 +209,8 @@ WHERE t1.f1 AND alias2.f10
ORDER BY field1 ;
field1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
set optimizer_switch=@tmp_optimizer_switch;
drop table t1,t2;
#
......@@ -273,8 +273,8 @@ WHERE alias1.f11 OR alias1.f3 = 50 AND alias1.f10
);
f12 f13
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
EXPLAIN
SELECT * FROM t2
WHERE ( f12 ) IN (
......@@ -292,8 +292,8 @@ FROM t1 AS alias1, t1 AS alias2
WHERE (alias2.f10 = alias1.f11) AND (alias1.f11 OR alias1.f3 = 50 AND alias1.f10));
f12 f13
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'f'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'f'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
set @@optimizer_switch=@save_optimizer_switch;
drop table t1, t2;
#
......
......@@ -145,7 +145,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b);
......@@ -4677,7 +4677,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -5949,7 +5949,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -6330,10 +6330,10 @@ ORDER BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
......@@ -6341,10 +6341,10 @@ GROUP BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2;
#
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)
......
......@@ -148,7 +148,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b);
......@@ -4675,7 +4675,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -5946,7 +5946,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -6325,10 +6325,10 @@ ORDER BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
......@@ -6336,10 +6336,10 @@ GROUP BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2;
#
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)
......
......@@ -144,7 +144,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b);
......@@ -4671,7 +4671,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -5942,7 +5942,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -6321,10 +6321,10 @@ ORDER BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
......@@ -6332,10 +6332,10 @@ GROUP BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2;
#
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)
......
......@@ -147,7 +147,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b);
......@@ -4681,7 +4681,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -5955,7 +5955,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -6336,10 +6336,10 @@ ORDER BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
......@@ -6347,10 +6347,10 @@ GROUP BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2;
#
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)
......
......@@ -144,7 +144,7 @@ SELECT (SELECT 1.5,'c','a') = ROW(1.5,2,'a');
(SELECT 1.5,'c','a') = ROW(1.5,2,'a')
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
SELECT (SELECT * FROM (SELECT 'test' a,'test' b) a);
ERROR 21000: Operand should contain 1 column(s)
SELECT 1 as a,(SELECT a+a) b,(SELECT b);
......@@ -4671,7 +4671,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -5942,7 +5942,7 @@ SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 2.0 FROM t2);
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT 'a' FROM t2);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
SELECT 1 FROM t1 WHERE 1 < SOME (SELECT a1 FROM t2);
1
1
......@@ -6321,10 +6321,10 @@ ORDER BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
SELECT 1 FROM t1 WHERE a =
(SELECT 1 FROM t2 WHERE b =
(SELECT 1 FROM t1 t11 WHERE c = 1 OR t1.a = 1 AND 1 = 2)
......@@ -6332,10 +6332,10 @@ GROUP BY b
);
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
DROP TABLE t1, t2;
#
# BUG#12616253 - WRONG RESULT WITH EXISTS(SUBQUERY) (MISSING ROWS)
......
......@@ -1705,15 +1705,15 @@ x
m
c
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
drop table t1,t2,t3,t4;
#
# BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
......@@ -2100,8 +2100,8 @@ f1 f2 f3 f3
4 0 0 0
0 NULL NULL NULL
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
Warning 1292 Truncated incorrect DECIMAL value: 'foo'
Warning 1292 Truncated incorrect DECIMAL value: 'foo'
DROP TABLE t1, t2, t3, t4;
set @tmp803457=@@optimizer_switch;
#
......@@ -2294,13 +2294,13 @@ PREPARE st1 FROM "SELECT * FROM t2 LEFT JOIN t1 ON t2.a != 0 AND ('j','r') IN (
EXECUTE st1;
a a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
EXECUTE st1;
a a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
DROP TABLE t1, t2, t3;
#
# BUG#849776: Wrong result with semijoin + "Impossible where"
......
......@@ -1716,15 +1716,15 @@ x
m
c
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
drop table t1,t2,t3,t4;
#
# BUG#751484: Valgrind warning / sporadic crash in evaluate_join_record sql_select.cc:14099 with semijoin
......@@ -2111,8 +2111,8 @@ f1 f2 f3 f3
4 0 0 0
0 NULL NULL NULL
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
Warning 1292 Truncated incorrect DOUBLE value: 'foo'
Warning 1292 Truncated incorrect DECIMAL value: 'foo'
Warning 1292 Truncated incorrect DECIMAL value: 'foo'
DROP TABLE t1, t2, t3, t4;
set @tmp803457=@@optimizer_switch;
#
......@@ -2305,13 +2305,13 @@ PREPARE st1 FROM "SELECT * FROM t2 LEFT JOIN t1 ON t2.a != 0 AND ('j','r') IN (
EXECUTE st1;
a a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
EXECUTE st1;
a a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'j'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'j'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
DROP TABLE t1, t2, t3;
#
# BUG#849776: Wrong result with semijoin + "Impossible where"
......
......@@ -566,9 +566,9 @@ select * from t1 group by (a1 in (select col from columns));
a1 a2
1 - 00 2 - 00
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1 - 00'
Warning 1292 Truncated incorrect DOUBLE value: '1 - 01'
Warning 1292 Truncated incorrect DOUBLE value: '1 - 02'
Warning 1292 Truncated incorrect DECIMAL value: '1 - 00'
Warning 1292 Truncated incorrect DECIMAL value: '1 - 01'
Warning 1292 Truncated incorrect DECIMAL value: '1 - 02'
/* ORDER BY clause */
explain extended
select * from t1 order by (select col from columns limit 1);
......
......@@ -286,5 +286,153 @@ a
127
DROP TABLE t1, t2;
#
# MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers and strings
#
CREATE TABLE t1 (
id bigint(20) unsigned NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO t1 VALUES(1234),(97716021308405775),(97716021308405770),(97716021308405780);
SELECT * FROM t1 WHERE id IN(97716021308405775);
id
97716021308405775
SELECT * FROM t1 WHERE id IN('97716021308405775');
id
97716021308405775
SELECT * FROM t1 WHERE id IN('1234',97716021308405775);
id
1234
97716021308405775
SELECT * FROM t1 WHERE id IN('1234','97716021308405775');
id
1234
97716021308405775
SELECT * FROM t1 WHERE id = 1234 OR id = '97716021308405775';
id
1234
97716021308405775
SELECT * FROM t1 WHERE id IN(1234,'97716021308405775');
id
1234
97716021308405775
SELECT * FROM t1 WHERE id IN('97716021308405775',1234);
id
1234
97716021308405775
DROP TABLE t1;
CREATE TABLE t1 (id bigint(20) unsigned NOT NULL PRIMARY KEY);
INSERT INTO t1 VALUES(1234),(97716021308405775),(97716021308405770),(97716021308405780);
SELECT
id,
CASE id
WHEN '97716021308405770' THEN '70'
WHEN '97716021308405775' THEN '75'
WHEN '97716021308405780' THEN '80'
END AS c1
FROM t1;
id c1
1234 NULL
97716021308405770 70
97716021308405775 75
97716021308405780 80
SELECT
id,
CASE
WHEN id='97716021308405770' THEN '70'
WHEN id='97716021308405775' THEN '75'
WHEN id='97716021308405780' THEN '80'
END AS c1
FROM t1;
id c1
1234 NULL
97716021308405770 70
97716021308405775 75
97716021308405780 80
SELECT id, id BETWEEN '97716021308405775' AND '97716021308405775' AS c1 FROM t1;
id c1
1234 0
97716021308405770 0
97716021308405775 1
97716021308405780 0
SELECT id, id BETWEEN '97716021308405775' AND 97716021308405775 AS c1 FROM t1;
id c1
1234 0
97716021308405770 0
97716021308405775 1
97716021308405780 0
SELECT id, id BETWEEN 97716021308405775 AND '97716021308405775' AS c1 FROM t1;
id c1
1234 0
97716021308405770 0
97716021308405775 1
97716021308405780 0
DROP TABLE t1;
SELECT '97716021308405770'=97716021308405770;
'97716021308405770'=97716021308405770
1
SELECT 97716021308405770='97716021308405770';
97716021308405770='97716021308405770'
1
SELECT '9e+16'=90000000000000000;
'9e+16'=90000000000000000
1
SELECT 90000000000000000='9e+16';
90000000000000000='9e+16'
1
SELECT '9e+30'>90000000000000000;
'9e+30'>90000000000000000
1
SELECT 90000000000000000<'9e+30';
90000000000000000<'9e+30'
1
SELECT '9e+80'>90000000000000000;
'9e+80'>90000000000000000
1
SELECT 90000000000000000<'9e+80';
90000000000000000<'9e+80'
1
SELECT '9.9999999999999999e+80'>90000000000000000;
'9.9999999999999999e+80'>90000000000000000
1
SELECT 90000000000000000<'9.9999999999999999e+80';
90000000000000000<'9.9999999999999999e+80'
1
SELECT '1e+81'>90000000000000000;
'1e+81'>90000000000000000
1
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e+81'
SELECT 90000000000000000<'1e+81';
90000000000000000<'1e+81'
1
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e+81'
SELECT '9e+100'>90000000000000000;
'9e+100'>90000000000000000
1
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '9e+100'
SELECT 90000000000000000<'9e+100';
90000000000000000<'9e+100'
1
Warnings:
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '9e+100'
SELECT CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED)=18446744073709551615;
CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED)=18446744073709551615
1
SELECT 18446744073709551615=CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED);
18446744073709551615=CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED)
1
SELECT CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED)=9223372036854775807;
CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED)=9223372036854775807
1
SELECT 9223372036854775807=CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED);
9223372036854775807=CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED)
1
#
# End of 10.3 tests
#
......@@ -220,6 +220,84 @@ INSERT IGNORE INTO t2 SELECT a FROM t1;
SELECT * FROM t2;
DROP TABLE t1, t2;
--echo #
--echo # MDEV-21445 Strange/inconsistent behavior of IN condition when mixing numbers and strings
--echo #
CREATE TABLE t1 (
id bigint(20) unsigned NOT NULL,
PRIMARY KEY (id)
);
INSERT INTO t1 VALUES(1234),(97716021308405775),(97716021308405770),(97716021308405780);
# OK
SELECT * FROM t1 WHERE id IN(97716021308405775);
SELECT * FROM t1 WHERE id IN('97716021308405775');
SELECT * FROM t1 WHERE id IN('1234',97716021308405775);
SELECT * FROM t1 WHERE id IN('1234','97716021308405775');
SELECT * FROM t1 WHERE id = 1234 OR id = '97716021308405775';
# The following was not OK
SELECT * FROM t1 WHERE id IN(1234,'97716021308405775');
SELECT * FROM t1 WHERE id IN('97716021308405775',1234);
DROP TABLE t1;
CREATE TABLE t1 (id bigint(20) unsigned NOT NULL PRIMARY KEY);
INSERT INTO t1 VALUES(1234),(97716021308405775),(97716021308405770),(97716021308405780);
SELECT
id,
CASE id
WHEN '97716021308405770' THEN '70'
WHEN '97716021308405775' THEN '75'
WHEN '97716021308405780' THEN '80'
END AS c1
FROM t1;
SELECT
id,
CASE
WHEN id='97716021308405770' THEN '70'
WHEN id='97716021308405775' THEN '75'
WHEN id='97716021308405780' THEN '80'
END AS c1
FROM t1;
SELECT id, id BETWEEN '97716021308405775' AND '97716021308405775' AS c1 FROM t1;
SELECT id, id BETWEEN '97716021308405775' AND 97716021308405775 AS c1 FROM t1;
SELECT id, id BETWEEN 97716021308405775 AND '97716021308405775' AS c1 FROM t1;
DROP TABLE t1;
SELECT '97716021308405770'=97716021308405770;
SELECT 97716021308405770='97716021308405770';
SELECT '9e+16'=90000000000000000;
SELECT 90000000000000000='9e+16';
SELECT '9e+30'>90000000000000000;
SELECT 90000000000000000<'9e+30';
SELECT '9e+80'>90000000000000000;
SELECT 90000000000000000<'9e+80';
SELECT '9.9999999999999999e+80'>90000000000000000;
SELECT 90000000000000000<'9.9999999999999999e+80';
SELECT '1e+81'>90000000000000000;
SELECT 90000000000000000<'1e+81';
SELECT '9e+100'>90000000000000000;
SELECT 90000000000000000<'9e+100';
SELECT CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED)=18446744073709551615;
SELECT 18446744073709551615=CAST(0xFFFFFFFFFFFFFFFF AS UNSIGNED);
SELECT CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED)=9223372036854775807;
SELECT 9223372036854775807=CAST(0x7FFFFFFFFFFFFFFF AS UNSIGNED);
--echo #
--echo # End of 10.3 tests
--echo #
......@@ -550,17 +550,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='1 ';
COUNT(*)
2
Warnings:
Note 1292 Truncated incorrect DOUBLE value: '1 '
Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE i2='1 ';
COUNT(*)
2
Warnings:
Note 1292 Truncated incorrect DOUBLE value: '1 '
Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE i4='1 ';
COUNT(*)
2
Warnings:
Note 1292 Truncated incorrect DOUBLE value: '1 '
Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE i8='1 ';
COUNT(*)
2
......@@ -585,17 +585,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE i2='';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE i4='';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE i8='';
COUNT(*)
2
......@@ -620,17 +620,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE i2='x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE i4='x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE i8='x';
COUNT(*)
2
......@@ -655,17 +655,17 @@ SELECT COUNT(*) FROM t1 WHERE i1=' x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' x'
Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE i2=' x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' x'
Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE i4=' x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: ' x'
Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE i8=' x';
COUNT(*)
2
......@@ -690,17 +690,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='.';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '.'
Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE i2='.';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '.'
Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE i4='.';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '.'
Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE i8='.';
COUNT(*)
2
......@@ -725,17 +725,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='-';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '-'
Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE i2='-';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '-'
Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE i4='-';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '-'
Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE i8='-';
COUNT(*)
2
......@@ -760,17 +760,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='+';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '+'
Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE i2='+';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '+'
Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE i4='+';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '+'
Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE i8='+';
COUNT(*)
2
......@@ -795,17 +795,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='1x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1x'
Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE i2='1x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1x'
Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE i4='1x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1x'
Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE i8='1x';
COUNT(*)
2
......@@ -830,17 +830,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='1e';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e'
Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE i2='1e';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e'
Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE i4='1e';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e'
Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE i8='1e';
COUNT(*)
2
......@@ -865,17 +865,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='1e+';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+'
Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE i2='1e+';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+'
Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE i4='1e+';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+'
Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE i8='1e+';
COUNT(*)
2
......@@ -900,17 +900,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='1E-';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1E-'
Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE i2='1E-';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1E-'
Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE i4='1E-';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1E-'
Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE i8='1E-';
COUNT(*)
2
......@@ -935,17 +935,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='1Ex';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1Ex'
Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE i2='1Ex';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1Ex'
Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE i4='1Ex';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1Ex'
Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE i8='1Ex';
COUNT(*)
2
......@@ -970,17 +970,17 @@ SELECT COUNT(*) FROM t1 WHERE i1='1e+x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+x'
Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE i2='1e+x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+x'
Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE i4='1e+x';
COUNT(*)
2
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e+x'
Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE i8='1e+x';
COUNT(*)
2
......@@ -1005,22 +1005,26 @@ SELECT COUNT(*) FROM t1 WHERE i1='1e1000';
COUNT(*)
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e1000'
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e1000'
SELECT COUNT(*) FROM t1 WHERE i2='1e1000';
COUNT(*)
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e1000'
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e1000'
SELECT COUNT(*) FROM t1 WHERE i4='1e1000';
COUNT(*)
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e1000'
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e1000'
SELECT COUNT(*) FROM t1 WHERE i8='1e1000';
COUNT(*)
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '1e1000'
Warning 1916 Got overflow when converting '' to DECIMAL. Value truncated
Warning 1292 Truncated incorrect DECIMAL value: '1e1000'
SELECT COUNT(*) FROM t1 WHERE d='1e1000';
COUNT(*)
0
......
......@@ -497,8 +497,8 @@ SELECT 5 = a FROM t1;
0
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 's'
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DECIMAL value: 's'
Warning 1292 Truncated incorrect DECIMAL value: ''
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(16));
INSERT INTO t1 VALUES ('5'), ('s'), ('');
......@@ -508,8 +508,8 @@ SELECT 5 = a FROM t1;
0
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 's '
Warning 1292 Truncated incorrect DOUBLE value: ' '
Warning 1292 Truncated incorrect DECIMAL value: 's '
Warning 1292 Truncated incorrect DECIMAL value: ' '
DROP TABLE t1;
#
# MDEV-13530 VARBINARY doesn't convert to to BLOB for sizes 65533, 65534 and 65535
......
......@@ -210,11 +210,11 @@ SELECT * FROM t2 WHERE yy = 'test';
yy c2
00 2000
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'test'
Warning 1292 Truncated incorrect DECIMAL value: 'test'
SELECT * FROM t4 WHERE yyyy = 'test';
yyyy c4
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'test'
Warning 1292 Truncated incorrect DECIMAL value: 'test'
SELECT * FROM t2 WHERE yy = '1999';
yy c2
99 1999
......
......@@ -6141,11 +6141,11 @@ CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 WHERE a <> 0 AND a = ' 1';
a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1'
Warning 1292 Truncated incorrect DECIMAL value: '`1'
SELECT * FROM v1 WHERE a <> 0 AND a = ' 1';
a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1'
Warning 1292 Truncated incorrect DECIMAL value: '`1'
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (a ENUM('5','6'));
......@@ -6168,11 +6168,11 @@ CREATE VIEW v1 AS SELECT * FROM t1;
SELECT * FROM t1 WHERE a <> 0 AND a = ' 1';
a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1'
Warning 1292 Truncated incorrect DECIMAL value: '`1'
SELECT * FROM v1 WHERE a <> 0 AND a = ' 1';
a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '`1'
Warning 1292 Truncated incorrect DECIMAL value: '`1'
DROP VIEW v1;
DROP TABLE t1;
CREATE TABLE t1 (a ENUM('5','6'));
......
......@@ -435,18 +435,18 @@ SELECT table1 .`col_varchar_key`
FROM t1 table1 STRAIGHT_JOIN ( t1 table3 JOIN t1 table4 ON table4 .`pk` = table3 .`col_int_nokey` ) ON table4 .`col_varchar_nokey` ;
col_varchar_key
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'r'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'r'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
DROP TABLE t1;
set join_cache_level=@save_join_cache_level;
set optimizer_switch=@save_optimizer_switch;
......@@ -664,70 +664,70 @@ table3.col_varchar_nokey = table2.col_varchar_key AND table3.pk > table2.col_var
count(*) sum(table1.col_int_key*table2.pk)
240 185955
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DOUBLE value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
Warning 1292 Truncated incorrect DECIMAL value: 'v'
set @my_save_join_cache_level= @@join_cache_level;
set @my_save_join_buffer_size= @@join_buffer_size;
set join_cache_level=6;
......
......@@ -250,7 +250,7 @@ HAVING x > '2000-02-06'
ORDER BY col_time_nokey, pk;
x
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: '2000-02-06'
Warning 1292 Truncated incorrect DECIMAL value: '2000-02-06'
DROP TABLE c;
# Bug#21341044: Conditional jump at sort_param::make_sort_key
CREATE TABLE t1 (
......
......@@ -489,10 +489,10 @@ ORDER BY field1, alias1.col_date_key, field1 ASC, field1 DESC,
alias1.col_time_key ASC, field1;
field1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 't'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 't'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
DROP TABLE cc;
SET sql_mode=@save_old_sql_mode;
#
......
......@@ -1069,10 +1069,10 @@ ORDER BY field1, alias1.col_date_key, field1 ASC, field1 DESC,
alias1.col_time_key ASC, field1;
field1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'c'
Warning 1292 Truncated incorrect DOUBLE value: 't'
Warning 1292 Truncated incorrect DOUBLE value: 'm'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'c'
Warning 1292 Truncated incorrect DECIMAL value: 't'
Warning 1292 Truncated incorrect DECIMAL value: 'm'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
DROP TABLE cc;
SET sql_mode=@save_old_sql_mode;
#
......@@ -1171,13 +1171,13 @@ id select_type table type possible_keys key key_len ref rows Extra
1 SIMPLE NULL NULL NULL NULL NULL NULL NULL Impossible WHERE noticed after reading const tables
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'cccc'
Warning 1292 Truncated incorrect DOUBLE value: 'cccc'
Warning 1292 Truncated incorrect DECIMAL value: 'cccc'
SELECT /*+ bka() */ 1 AS c FROM t AS b RIGHT JOIN t AS c ON b.a > c.c
WHERE b.b>c.a;
c
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'cccc'
Warning 1292 Truncated incorrect DOUBLE value: 'cccc'
Warning 1292 Truncated incorrect DECIMAL value: 'cccc'
DROP TABLE t;
set @optimizer_switch_save = @@optimizer_switch;
set optimizer_switch='mrr_cost_based=off';
......
......@@ -1118,8 +1118,8 @@ SELECT 1 FROM g1 WHERE a >= ANY
(SELECT 1 FROM g1 WHERE a = ST_geomfromtext('') OR a) ;
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
DROP TABLE g1;
End of 5.5 tests
DROP DATABASE IF EXISTS gis_ogs;
......
......@@ -1119,8 +1119,8 @@ SELECT 1 FROM g1 WHERE a >= ANY
(SELECT 1 FROM g1 WHERE a = ST_geomfromtext('') OR a) ;
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
DROP TABLE g1;
End of 5.5 tests
DROP DATABASE IF EXISTS gis_ogs;
......
......@@ -158,8 +158,8 @@ test.t1 optimize status OK
connection default;
DELETE FROM t2 WHERE c < 1;
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'b'
Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DECIMAL value: 'b'
connection con1;
OPTIMIZE TABLE t1;
Table Op Msg_type Msg_text
......
......@@ -326,10 +326,10 @@ SELECT table2 .`col_datetime_key`
FROM t2 JOIN ( t1 table2 JOIN t2 table3 ON table3 .`col_varchar_key` < table2 .`col_varchar_key` ) ON table3 .`col_varchar_nokey` ;
col_datetime_key
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DOUBLE value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
Warning 1292 Truncated incorrect DECIMAL value: 'd'
drop table t1, t2;
set join_cache_level=@save_join_cache_level;
CREATE TABLE t1(
......
......@@ -23,13 +23,13 @@ SELECT @@global.keep_files_on_create = 'OFF';
@@global.keep_files_on_create = 'OFF'
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'OFF'
Warning 1292 Truncated incorrect DECIMAL value: 'OFF'
SET @@session.keep_files_on_create = DEFAULT;
SELECT @@session.keep_files_on_create = 'OFF';
@@session.keep_files_on_create = 'OFF'
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'OFF'
Warning 1292 Truncated incorrect DECIMAL value: 'OFF'
'#--------------------FN_DYNVARS_054_03-------------------------#'
SET @@global.keep_files_on_create = ON;
SELECT @@global.keep_files_on_create;
......
......@@ -14,7 +14,7 @@ SELECT @@global.log_bin_trust_function_creators = 'FALSE';
@@global.log_bin_trust_function_creators = 'FALSE'
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'FALSE'
Warning 1292 Truncated incorrect DECIMAL value: 'FALSE'
'#--------------------FN_DYNVARS_063_03-------------------------#'
SET @@global.log_bin_trust_function_creators = ON;
SELECT @@global.log_bin_trust_function_creators;
......
......@@ -23,13 +23,13 @@ SELECT @@global.low_priority_updates = 'FALSE';
@@global.low_priority_updates = 'FALSE'
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'FALSE'
Warning 1292 Truncated incorrect DECIMAL value: 'FALSE'
SET @@session.low_priority_updates = DEFAULT;
SELECT @@session.low_priority_updates = 'FALSE';
@@session.low_priority_updates = 'FALSE'
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'FALSE'
Warning 1292 Truncated incorrect DECIMAL value: 'FALSE'
'#--------------------FN_DYNVARS_069_03-------------------------#'
SET @@global.low_priority_updates = ON;
SELECT @@global.low_priority_updates;
......
......@@ -16,7 +16,7 @@ select @@session.skip_replication = variable_value from information_schema.sessi
@@session.skip_replication = variable_value
1
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'OFF'
Warning 1292 Truncated incorrect DECIMAL value: 'OFF'
set session skip_replication=0;
select @@session.skip_replication;
@@session.skip_replication
......
......@@ -184,16 +184,16 @@ a
drop table t1;
create table t1 (a int , b date as (1 in ('x' ,(database ()) ))) ;
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'test'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'test'
select b from t1;
b
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'test'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'test'
select a from t1 order by 'x' = b;
a
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'x'
Warning 1292 Truncated incorrect DOUBLE value: 'test'
Warning 1292 Truncated incorrect DECIMAL value: 'x'
Warning 1292 Truncated incorrect DECIMAL value: 'test'
drop table t1;
......@@ -765,6 +765,11 @@ Type_handler_hybrid_field_type::aggregate_for_comparison(const Type_handler *h)
m_type_handler= &type_handler_datetime;
}
}
else if ((a == INT_RESULT && b == STRING_RESULT) ||
(b == INT_RESULT && a == STRING_RESULT))
{
m_type_handler= &type_handler_newdecimal;
}
else if ((a == INT_RESULT || a == DECIMAL_RESULT) &&
(b == INT_RESULT || b == DECIMAL_RESULT))
{
......
......@@ -467,8 +467,8 @@ SELECT 5 = a FROM t1;
0
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 's'
Warning 1292 Truncated incorrect DOUBLE value: ''
Warning 1292 Truncated incorrect DECIMAL value: 's'
Warning 1292 Truncated incorrect DECIMAL value: ''
DROP TABLE t1;
CREATE TABLE t1 (a CHAR(16));
INSERT INTO t1 VALUES ('5'), ('s'), ('');
......@@ -478,6 +478,6 @@ SELECT 5 = a FROM t1;
0
0
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 's '
Warning 1292 Truncated incorrect DOUBLE value: ' '
Warning 1292 Truncated incorrect DECIMAL value: 's '
Warning 1292 Truncated incorrect DECIMAL value: ' '
DROP TABLE t1;
......@@ -204,11 +204,11 @@ SELECT * FROM t2 WHERE yy = 'test';
yy c2
00 2000
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'test'
Warning 1292 Truncated incorrect DECIMAL value: 'test'
SELECT * FROM t4 WHERE yyyy = 'test';
yyyy c4
Warnings:
Warning 1292 Truncated incorrect DOUBLE value: 'test'
Warning 1292 Truncated incorrect DECIMAL value: 'test'
SELECT * FROM t2 WHERE yy = '1999';
yy c2
99 1999
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment