summaryrefslogtreecommitdiff
path: root/mysql-test/main
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-07-28 10:33:26 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-07-28 10:33:26 +0300
commitf79cebb4d02a7b5151ac617bc762c3e094436562 (patch)
tree16008fa4f8d8d0b9b884670f6d850ae6a151520a /mysql-test/main
parent1630037959ab9516fc2a56d4901d2e5d794bc8e7 (diff)
parent742e1c727fc2be50b758068c2ab92abb19f3ff56 (diff)
downloadmariadb-git-f79cebb4d02a7b5151ac617bc762c3e094436562.tar.gz
Merge 10.7 into 10.8
Diffstat (limited to 'mysql-test/main')
-rw-r--r--mysql-test/main/check_constraint.result32
-rw-r--r--mysql-test/main/compare.result4
-rw-r--r--mysql-test/main/create_windows.result2
-rw-r--r--mysql-test/main/create_windows.test10
-rw-r--r--mysql-test/main/ctype_cp1251.result6
-rw-r--r--mysql-test/main/ctype_utf8.result12
-rw-r--r--mysql-test/main/delayed.result9
-rw-r--r--mysql-test/main/delayed.test12
-rw-r--r--mysql-test/main/distinct.result4
-rw-r--r--mysql-test/main/func_debug.result50
-rw-r--r--mysql-test/main/func_hybrid_type.result16
-rw-r--r--mysql-test/main/func_if.result2
-rw-r--r--mysql-test/main/func_in.result38
-rw-r--r--mysql-test/main/func_math.result2
-rw-r--r--mysql-test/main/func_misc.result2
-rw-r--r--mysql-test/main/func_str.result6
-rw-r--r--mysql-test/main/get_diagnostics.result12
-rw-r--r--mysql-test/main/gis.result4
-rw-r--r--mysql-test/main/group_by.result16
-rw-r--r--mysql-test/main/group_min_max.result10
-rw-r--r--mysql-test/main/having.result8
-rw-r--r--mysql-test/main/having_cond_pushdown.result4
-rw-r--r--mysql-test/main/insert.result6
-rw-r--r--mysql-test/main/insert_innodb.result12
-rw-r--r--mysql-test/main/insert_innodb.test17
-rw-r--r--mysql-test/main/insert_select.result70
-rw-r--r--mysql-test/main/insert_select.test54
-rw-r--r--mysql-test/main/join_cache.result4
-rw-r--r--mysql-test/main/json_debug_nonembedded.result13
-rw-r--r--mysql-test/main/json_debug_nonembedded.test22
-rw-r--r--mysql-test/main/myisam_icp.result8
-rw-r--r--mysql-test/main/mysqld--help.result4
-rw-r--r--mysql-test/main/mysqld--help.test1
-rw-r--r--mysql-test/main/null.result2
-rw-r--r--mysql-test/main/partition_innodb.result2
-rw-r--r--mysql-test/main/profiling.result12
-rw-r--r--mysql-test/main/ps.result6
-rw-r--r--mysql-test/main/ps_1general.result4
-rw-r--r--mysql-test/main/ps_innodb.result6
-rw-r--r--mysql-test/main/row.result16
-rw-r--r--mysql-test/main/secure_file_priv_win.result22
-rw-r--r--mysql-test/main/secure_file_priv_win.test12
-rw-r--r--mysql-test/main/select.result10
-rw-r--r--mysql-test/main/select_jcl6.result10
-rw-r--r--mysql-test/main/select_pkeycache.result10
-rw-r--r--mysql-test/main/set_statement.result12
-rw-r--r--mysql-test/main/set_statement.test10
-rw-r--r--mysql-test/main/sp-anchor-row-type-table.result2
-rw-r--r--mysql-test/main/sp-anchor-type.result12
-rw-r--r--mysql-test/main/sp-bugs.result10
-rw-r--r--mysql-test/main/sp-bugs.test15
-rw-r--r--mysql-test/main/sp-vars.result2
-rw-r--r--mysql-test/main/sp.result6
-rw-r--r--mysql-test/main/subselect.result22
-rw-r--r--mysql-test/main/subselect4.result69
-rw-r--r--mysql-test/main/subselect4.test39
-rw-r--r--mysql-test/main/subselect_cache.result192
-rw-r--r--mysql-test/main/subselect_innodb.result2
-rw-r--r--mysql-test/main/subselect_mat.result6
-rw-r--r--mysql-test/main/subselect_mat_cost_bugs.result12
-rw-r--r--mysql-test/main/subselect_no_exists_to_in.result22
-rw-r--r--mysql-test/main/subselect_no_mat.result22
-rw-r--r--mysql-test/main/subselect_no_opts.result22
-rw-r--r--mysql-test/main/subselect_no_scache.result22
-rw-r--r--mysql-test/main/subselect_no_semijoin.result22
-rw-r--r--mysql-test/main/subselect_sj.result43
-rw-r--r--mysql-test/main/subselect_sj.test17
-rw-r--r--mysql-test/main/subselect_sj_jcl6.result43
-rw-r--r--mysql-test/main/subselect_sj_mat.result6
-rw-r--r--mysql-test/main/type_enum.result31
-rw-r--r--mysql-test/main/type_enum.test28
-rw-r--r--mysql-test/main/type_int.result169
-rw-r--r--mysql-test/main/type_int.test102
-rw-r--r--mysql-test/main/type_num.result120
-rw-r--r--mysql-test/main/type_num_innodb.result17
-rw-r--r--mysql-test/main/type_set.result31
-rw-r--r--mysql-test/main/type_set.test28
-rw-r--r--mysql-test/main/type_varchar.result9
-rw-r--r--mysql-test/main/type_year.result4
-rw-r--r--mysql-test/main/view.result46
-rw-r--r--mysql-test/main/view.test38
-rw-r--r--mysql-test/main/warnings.result1
-rw-r--r--mysql-test/main/xtradb_mrr.result152
83 files changed, 1417 insertions, 573 deletions
diff --git a/mysql-test/main/check_constraint.result b/mysql-test/main/check_constraint.result
index dab1d61cdb9..a6480bb6133 100644
--- a/mysql-test/main/check_constraint.result
+++ b/mysql-test/main/check_constraint.result
@@ -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
@@ -240,13 +240,13 @@ drop table t1;
#
create table t1 (v1 bigint check (v1 not in ('x' , 'x111'))) ;
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
-Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select * from t1;
v1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
-Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select v1 from t1;
v1
select * from t1;
@@ -260,8 +260,8 @@ flush tables;
select * from t1;
v1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
-Warning 1292 Truncated incorrect DOUBLE value: 'x111'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x111'
select * from t1;
v1
deallocate prepare stmt;
diff --git a/mysql-test/main/compare.result b/mysql-test/main/compare.result
index c4650014326..b8883784d21 100644
--- a/mysql-test/main/compare.result
+++ b/mysql-test/main/compare.result
@@ -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);
diff --git a/mysql-test/main/create_windows.result b/mysql-test/main/create_windows.result
new file mode 100644
index 00000000000..c064eb7c86f
--- /dev/null
+++ b/mysql-test/main/create_windows.result
@@ -0,0 +1,2 @@
+create table `...................................................`(i int);
+ERROR HY000: Can't create table `test`.`...................................................` (errno: 38 "Filename too long")
diff --git a/mysql-test/main/create_windows.test b/mysql-test/main/create_windows.test
new file mode 100644
index 00000000000..6fe99f6aeb6
--- /dev/null
+++ b/mysql-test/main/create_windows.test
@@ -0,0 +1,10 @@
+--source include/windows.inc
+
+# MDEV-28746 Wrong error code ER_BAD_DB_ERROR for long filenames
+
+# There are 51 dots in the table name below, with every dot encoded with 5
+# bytes in "mysql file name encoding", making the filename length 255 byte.
+# Adding drive and extension makes it exceed MAX_PATH= 260 bytes
+let $t = `SELECT(REPEAT('.',51))`;
+--error ER_CANT_CREATE_TABLE
+eval create table `$t`(i int);
diff --git a/mysql-test/main/ctype_cp1251.result b/mysql-test/main/ctype_cp1251.result
index 5d0bf3be615..482b61cd958 100644
--- a/mysql-test/main/ctype_cp1251.result
+++ b/mysql-test/main/ctype_cp1251.result
@@ -3373,17 +3373,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
diff --git a/mysql-test/main/ctype_utf8.result b/mysql-test/main/ctype_utf8.result
index 6eebc8f4cf2..0e12f405edc 100644
--- a/mysql-test/main/ctype_utf8.result
+++ b/mysql-test/main/ctype_utf8.result
@@ -10291,7 +10291,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
@@ -10300,12 +10300,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
@@ -10322,17 +10322,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
diff --git a/mysql-test/main/delayed.result b/mysql-test/main/delayed.result
index 55f5ff6eb28..4b482c8bb66 100644
--- a/mysql-test/main/delayed.result
+++ b/mysql-test/main/delayed.result
@@ -510,3 +510,12 @@ a b
2 2
3 3
drop table t1;
+#
+# MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and
+# spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs
+# and inline_mysql_mutex_lock)
+#
+CREATE TABLE t1 (c0 INT,UNIQUE (c0) USING HASH) ENGINE=MYISAM;
+INSERT DELAYED INTO t1 VALUES (0);
+INSERT DELAYED INTO t1 VALUES (0);
+DROP TABLE t1;
diff --git a/mysql-test/main/delayed.test b/mysql-test/main/delayed.test
index 862d30fe79f..cac433efd84 100644
--- a/mysql-test/main/delayed.test
+++ b/mysql-test/main/delayed.test
@@ -644,3 +644,15 @@ insert delayed into t1 values (3,3);
flush tables t1;
select * from t1;
drop table t1;
+
+--echo #
+--echo # MDEV-26546 SIGSEGV's in spider_db_connect on SHOW TABLE and
+--echo # spider_db_mbase::connect (and SIGSEGV's in check_vcol_forward_refs
+--echo # and inline_mysql_mutex_lock)
+--echo #
+
+CREATE TABLE t1 (c0 INT,UNIQUE (c0) USING HASH) ENGINE=MYISAM;
+INSERT DELAYED INTO t1 VALUES (0);
+INSERT DELAYED INTO t1 VALUES (0);
+DROP TABLE t1;
+
diff --git a/mysql-test/main/distinct.result b/mysql-test/main/distinct.result
index 0e31a174be7..888d3143f2c 100644
--- a/mysql-test/main/distinct.result
+++ b/mysql-test/main/distinct.result
@@ -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');
diff --git a/mysql-test/main/func_debug.result b/mysql-test/main/func_debug.result
index 08650fdd3c3..c8efcf09d41 100644
--- a/mysql-test/main/func_debug.result
+++ b/mysql-test/main/func_debug.result
@@ -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')
@@ -1581,7 +1581,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
@@ -1589,30 +1589,30 @@ 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
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
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))
@@ -1930,20 +1930,20 @@ SELECT '0x' IN (0);
'0x' IN (0)
1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '0x'
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT '0x' IN (0,1);
'0x' IN (0,1)
1
Warnings:
-Note 1105 DBUG: [0] arg=1 handler=0 (double)
-Note 1105 DBUG: [1] arg=2 handler=0 (double)
+Note 1105 DBUG: [0] arg=1 handler=0 (decimal)
+Note 1105 DBUG: [1] arg=2 handler=0 (decimal)
Note 1105 DBUG: types_compatible=yes bisect=yes
-Warning 1292 Truncated incorrect DOUBLE value: '0x'
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT ('0x',1) IN ((0,1));
('0x',1) IN ((0,1))
1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '0x'
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT ('0x',1) IN ((0,1),(1,1));
('0x',1) IN ((0,1),(1,1))
1
@@ -1954,13 +1954,13 @@ Note 1105 DBUG: ROW(3 args) level=0
Note 1105 DBUG: [0,0] handler=varchar
Note 1105 DBUG: [0,1] handler=int
Note 1105 DBUG: [0,2] handler=int
-Note 1105 DBUG: => handler=double
+Note 1105 DBUG: => handler=decimal
Note 1105 DBUG: [1,0] handler=int
Note 1105 DBUG: [1,1] handler=int
Note 1105 DBUG: [1,2] handler=int
Note 1105 DBUG: => handler=bigint
Note 1105 DBUG: types_compatible=yes bisect=yes
-Warning 1292 Truncated incorrect DOUBLE value: '0x'
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
SET SESSION debug_dbug="-d,Predicant_to_list_comparator";
SET SESSION debug_dbug="-d,Item_func_in";
SET SESSION debug_dbug="-d,cmp_item";
diff --git a/mysql-test/main/func_hybrid_type.result b/mysql-test/main/func_hybrid_type.result
index 16bd0359da2..7c1b5fef61c 100644
--- a/mysql-test/main/func_hybrid_type.result
+++ b/mysql-test/main/func_hybrid_type.result
@@ -1609,14 +1609,14 @@ def ifnull___a_a 253 10 1 Y 0 39 8
def least____a_a 253 10 1 Y 0 39 8
def greatest_a_a 253 10 1 Y 0 39 8
def test t1 t1 b ___________b 254 1 1 Y 256 0 8
-def case_______b 254 1 1 Y 0 39 8
-def case_____b_b 254 1 1 Y 0 39 8
-def coalesce___b 254 1 1 Y 0 39 8
-def coalesce_b_b 254 1 1 Y 0 39 8
-def if_______b_b 254 1 1 Y 0 39 8
-def ifnull___b_b 254 1 1 Y 0 39 8
-def least____b_b 254 1 1 Y 0 39 8
-def greatest_b_b 254 1 1 Y 0 39 8
+def case_______b 253 1 1 Y 0 39 8
+def case_____b_b 253 1 1 Y 0 39 8
+def coalesce___b 253 1 1 Y 0 39 8
+def coalesce_b_b 253 1 1 Y 0 39 8
+def if_______b_b 253 1 1 Y 0 39 8
+def ifnull___b_b 253 1 1 Y 0 39 8
+def least____b_b 253 1 1 Y 0 39 8
+def greatest_b_b 253 1 1 Y 0 39 8
___________a a
case_______a a
case_____a_a a
diff --git a/mysql-test/main/func_if.result b/mysql-test/main/func_if.result
index 09eb85d9fb6..6a8e578767e 100644
--- a/mysql-test/main/func_if.result
+++ b/mysql-test/main/func_if.result
@@ -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
diff --git a/mysql-test/main/func_in.result b/mysql-test/main/func_in.result
index 569fdfe4cbf..918d0481df7 100644
--- a/mysql-test/main/func_in.result
+++ b/mysql-test/main/func_in.result
@@ -470,7 +470,7 @@ HEX(a)
7FFFFFFFFFFFFFFE
7FFFFFFFFFFFFFFF
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'abc'
+Warning 1292 Truncated incorrect DECIMAL value: 'abc'
CREATE TABLE t3 (a BIGINT UNSIGNED);
INSERT INTO t3 VALUES (9223372036854775551);
SELECT HEX(a) FROM t3 WHERE a IN (9223372036854775807, 42);
@@ -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 range t2f2 t2f2 5 NULL 1 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
@@ -916,22 +916,22 @@ SELECT '0x' IN (0);
'0x' IN (0)
1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '0x'
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT '0x' IN (0,1);
'0x' IN (0,1)
1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '0x'
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT ('0x',1) IN ((0,1));
('0x',1) IN ((0,1))
1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '0x'
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
SELECT ('0x',1) IN ((0,1),(1,1));
('0x',1) IN ((0,1),(1,1))
1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '0x'
+Warning 1292 Truncated incorrect DECIMAL value: '0x'
#
# End of 10.4 tests
#
diff --git a/mysql-test/main/func_math.result b/mysql-test/main/func_math.result
index bebd7cd9655..befff56c4da 100644
--- a/mysql-test/main/func_math.result
+++ b/mysql-test/main/func_math.result
@@ -425,9 +425,7 @@ SELECT b DIV 900 y FROM t1 GROUP BY y;
y
0
Warnings:
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'str1'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'str2'
SELECT c DIV 900 y FROM t1 GROUP BY y;
y
diff --git a/mysql-test/main/func_misc.result b/mysql-test/main/func_misc.result
index 7597da95f3d..245146d9a96 100644
--- a/mysql-test/main/func_misc.result
+++ b/mysql-test/main/func_misc.result
@@ -317,7 +317,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
diff --git a/mysql-test/main/func_str.result b/mysql-test/main/func_str.result
index 799fd1933dd..ca673e8e155 100644
--- a/mysql-test/main/func_str.result
+++ b/mysql-test/main/func_str.result
@@ -377,7 +377,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
@@ -1189,12 +1189,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,
diff --git a/mysql-test/main/get_diagnostics.result b/mysql-test/main/get_diagnostics.result
index 697b3a589d7..1636c463f70 100644
--- a/mysql-test/main/get_diagnostics.result
+++ b/mysql-test/main/get_diagnostics.result
@@ -1811,14 +1811,14 @@ val2
val4
DELETE FROM t WHERE a = 100;
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'val1'
-Warning 1292 Truncated incorrect DOUBLE value: 'val2'
-Warning 1292 Truncated incorrect DOUBLE value: 'val4'
+Warning 1292 Truncated incorrect DECIMAL value: 'val1'
+Warning 1292 Truncated incorrect DECIMAL value: 'val2'
+Warning 1292 Truncated incorrect DECIMAL value: 'val4'
SHOW WARNINGS;
Level Code Message
-Warning 1292 Truncated incorrect DOUBLE value: 'val1'
-Warning 1292 Truncated incorrect DOUBLE value: 'val2'
-Warning 1292 Truncated incorrect DOUBLE value: 'val4'
+Warning 1292 Truncated incorrect DECIMAL value: 'val1'
+Warning 1292 Truncated incorrect DECIMAL value: 'val2'
+Warning 1292 Truncated incorrect DECIMAL value: 'val4'
GET DIAGNOSTICS CONDITION 3 @n = ROW_NUMBER;
SELECT @n;
@n
diff --git a/mysql-test/main/gis.result b/mysql-test/main/gis.result
index 88cd55c0251..5fdea9cb353 100644
--- a/mysql-test/main/gis.result
+++ b/mysql-test/main/gis.result
@@ -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
diff --git a/mysql-test/main/group_by.result b/mysql-test/main/group_by.result
index 8c1ba102e8f..ba403fa8b73 100644
--- a/mysql-test/main/group_by.result
+++ b/mysql-test/main/group_by.result
@@ -829,11 +829,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
@@ -2334,17 +2334,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;
#
diff --git a/mysql-test/main/group_min_max.result b/mysql-test/main/group_min_max.result
index 1644a5f3573..4b39039b533 100644
--- a/mysql-test/main/group_min_max.result
+++ b/mysql-test/main/group_min_max.result
@@ -3309,11 +3309,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
diff --git a/mysql-test/main/having.result b/mysql-test/main/having.result
index d1e8ec56670..ac26d69543d 100644
--- a/mysql-test/main/having.result
+++ b/mysql-test/main/having.result
@@ -524,7 +524,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
#
@@ -860,13 +860,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
@@ -894,7 +894,7 @@ HAVING t.f != 112 AND t.f = 'x' AND t.f != 'a';
f
x
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
DROP TABLE t1,t2;
#
# MDEV-20200: AddressSanitizer: use-after-poison in
diff --git a/mysql-test/main/having_cond_pushdown.result b/mysql-test/main/having_cond_pushdown.result
index 63a1bb3681e..59388aa7ca0 100644
--- a/mysql-test/main/having_cond_pushdown.result
+++ b/mysql-test/main/having_cond_pushdown.result
@@ -5533,11 +5533,11 @@ i
SELECT * FROM t1 GROUP BY i HAVING i IN ( i IS NULL AND 'x' = 0);
i
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT * FROM t1 GROUP BY i HAVING i='1' IN ( i IS NULL AND 'x' = 0);
i
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
DROP TABLE t1;
#
# MDEV-28080: HAVING with NOT EXIST predicate in an equality
diff --git a/mysql-test/main/insert.result b/mysql-test/main/insert.result
index 22682e180c6..586dbbff153 100644
--- a/mysql-test/main/insert.result
+++ b/mysql-test/main/insert.result
@@ -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;
@@ -751,7 +751,7 @@ 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;
#
diff --git a/mysql-test/main/insert_innodb.result b/mysql-test/main/insert_innodb.result
index e5e2b4b8623..314412bcfdd 100644
--- a/mysql-test/main/insert_innodb.result
+++ b/mysql-test/main/insert_innodb.result
@@ -43,3 +43,15 @@ INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
Warnings:
Warning 1452 Cannot add or update a child row: a foreign key constraint fails (`test`.`t2`, CONSTRAINT `fk` FOREIGN KEY (`fld2`) REFERENCES `t1` (`fld1`))
DROP TABLE t2, t1;
+#
+# MDEV-26433: assertion: table->get_ref_count() == 0 in dict0dict.cc
+# line 1915
+#
+CREATE TEMPORARY TABLE v0 ( v1 TEXT ( 15 ) CHAR SET BINARY NOT NULL NOT NULL UNIQUE CHECK ( v1 ) ) REPLACE SELECT NULL AS v3 , 74 AS v2 ;
+ERROR HY000: Field 'v1' doesn't have a default value
+CREATE TEMPORARY TABLE t1 (i TEXT(15) NOT NULL DEFAULT '' UNIQUE CHECK (i)) engine=innodb
+REPLACE SELECT NULL AS a;
+ERROR HY000: Field 'DB_ROW_HASH_1' doesn't have a default value
+#
+# End of 10.5 tests
+#
diff --git a/mysql-test/main/insert_innodb.test b/mysql-test/main/insert_innodb.test
index 68b6ca4e315..b5a9fc72c07 100644
--- a/mysql-test/main/insert_innodb.test
+++ b/mysql-test/main/insert_innodb.test
@@ -62,3 +62,20 @@ INSERT IGNORE INTO t2 VALUES('abc', 2) ON DUPLICATE KEY UPDATE fld1= 'def';
--disable_warnings
DROP TABLE t2, t1;
+
+--echo #
+--echo # MDEV-26433: assertion: table->get_ref_count() == 0 in dict0dict.cc
+--echo # line 1915
+--echo #
+
+--error ER_NO_DEFAULT_FOR_FIELD
+CREATE TEMPORARY TABLE v0 ( v1 TEXT ( 15 ) CHAR SET BINARY NOT NULL NOT NULL UNIQUE CHECK ( v1 ) ) REPLACE SELECT NULL AS v3 , 74 AS v2 ;
+
+--error ER_NO_DEFAULT_FOR_FIELD
+CREATE TEMPORARY TABLE t1 (i TEXT(15) NOT NULL DEFAULT '' UNIQUE CHECK (i)) engine=innodb
+ REPLACE SELECT NULL AS a;
+
+
+--echo #
+--echo # End of 10.5 tests
+--echo #
diff --git a/mysql-test/main/insert_select.result b/mysql-test/main/insert_select.result
index e85c4982137..ea770535e8f 100644
--- a/mysql-test/main/insert_select.result
+++ b/mysql-test/main/insert_select.result
@@ -883,4 +883,74 @@ INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a;
Warnings:
Warning 1264 Out of range value for column 'a' at row 4
DROP TABLE t1;
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 (a) SELECT SUM(1);
+INSERT INTO t1 (a, b) SELECT AVG(2), MIN(3);
+INSERT INTO t1 (b) SELECT AVG('x') OVER ();
+ERROR 22007: Truncated incorrect DOUBLE value: 'x'
+INSERT INTO t1 SELECT MIN(7) OVER (), MAX(8) OVER();
+SELECT * FROM t1;
+a b
+1 NULL
+2 3
+7 8
+PREPARE stmt FROM 'INSERT INTO t1 (a) SELECT AVG(?)';
+EXECUTE stmt USING 9;
+EXECUTE stmt USING 10;
+PREPARE stmt FROM 'INSERT INTO t1 SELECT MIN(?), MAX(?)';
+EXECUTE stmt USING 11, 12;
+EXECUTE stmt USING 13, 14;
+DEALLOCATE PREPARE stmt;
+SELECT * FROM t1;
+a b
+1 NULL
+2 3
+7 8
+9 NULL
+10 NULL
+11 12
+13 14
+CREATE PROCEDURE p1(param_a INT, param_b INT)
+BEGIN
+INSERT INTO t1 SELECT MIN(param_a) OVER (), MAX(param_b);
+END//
+CALL p1(21, 22);
+CALL p1(23, 24);
+SELECT * FROM t1;
+a b
+1 NULL
+2 3
+7 8
+9 NULL
+10 NULL
+11 12
+13 14
+21 22
+23 24
+CREATE TABLE t2 (
+a DECIMAL UNIQUE CHECK (CASE 0 * 27302337.000000 WHEN 34 THEN
++ 'x' LIKE 'x' OR a NOT IN (-1 / TRUE ^ 2) ELSE 7105743.000000 END));
+INSERT INTO t2 VALUES (90),( -1),(31152443.000000),(-32768),(NULL),(NULL);
+INSERT INTO t2 SELECT AVG('x') OVER (
+PARTITION BY ((NOT AVG(76698761.000000))) IS NOT NULL);
+ERROR 22007: Truncated incorrect DOUBLE value: 'x'
+INSERT IGNORE INTO t2 () VALUES (0),('x'),(3751286.000000),
+('x'),((a = 'x' AND 0 AND 0));
+Warnings:
+Warning 1366 Incorrect decimal value: 'x' for column `test`.`t2`.`a` at row 2
+Warning 1062 Duplicate entry '0' for key 'a'
+Warning 1366 Incorrect decimal value: 'x' for column `test`.`t2`.`a` at row 4
+Warning 1062 Duplicate entry '0' for key 'a'
+Warning 1062 Duplicate entry '0' for key 'a'
+INSERT INTO t2 VALUES (127);
+INSERT INTO t2 SELECT -2147483648 END FROM t2 AS TEXT JOIN t2 JOIN t2 TABLES;
+ERROR 23000: Duplicate entry '-2147483648' for key 'a'
+ALTER TABLE t2 ADD (
+b INT UNIQUE CHECK ((a = 'x' AND ((-(+(BINARY 49730460.000000)))) = 'x'
+BETWEEN 'x' AND 'x')));
+ERROR 22007: Truncated incorrect DECIMAL value: 'x'
+UPDATE t2 SET a = -128 WHERE a IS NULL ORDER BY 78 IN ('x','x'),a;
+ERROR 23000: Duplicate entry '-128' for key 'a'
+DROP TABLE t1, t2;
+DROP PROCEDURE p1;
# End of 10.2 test
diff --git a/mysql-test/main/insert_select.test b/mysql-test/main/insert_select.test
index 91b2cc6f981..1f672acc203 100644
--- a/mysql-test/main/insert_select.test
+++ b/mysql-test/main/insert_select.test
@@ -459,4 +459,58 @@ INSERT INTO t1 SELECT a*2 FROM t1 ORDER BY a;
DROP TABLE t1;
+#
+# MDEV-26427 MariaDB Server SEGV on INSERT .. SELECT
+#
+CREATE TABLE t1 (a INT, b INT);
+INSERT INTO t1 (a) SELECT SUM(1);
+INSERT INTO t1 (a, b) SELECT AVG(2), MIN(3);
+
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t1 (b) SELECT AVG('x') OVER ();
+INSERT INTO t1 SELECT MIN(7) OVER (), MAX(8) OVER();
+SELECT * FROM t1;
+
+PREPARE stmt FROM 'INSERT INTO t1 (a) SELECT AVG(?)';
+EXECUTE stmt USING 9;
+EXECUTE stmt USING 10;
+
+PREPARE stmt FROM 'INSERT INTO t1 SELECT MIN(?), MAX(?)';
+EXECUTE stmt USING 11, 12;
+EXECUTE stmt USING 13, 14;
+DEALLOCATE PREPARE stmt;
+SELECT * FROM t1;
+
+DELIMITER //;
+CREATE PROCEDURE p1(param_a INT, param_b INT)
+BEGIN
+INSERT INTO t1 SELECT MIN(param_a) OVER (), MAX(param_b);
+END//
+DELIMITER ;//
+CALL p1(21, 22);
+CALL p1(23, 24);
+SELECT * FROM t1;
+
+CREATE TABLE t2 (
+ a DECIMAL UNIQUE CHECK (CASE 0 * 27302337.000000 WHEN 34 THEN
+ + 'x' LIKE 'x' OR a NOT IN (-1 / TRUE ^ 2) ELSE 7105743.000000 END));
+INSERT INTO t2 VALUES (90),( -1),(31152443.000000),(-32768),(NULL),(NULL);
+--error ER_TRUNCATED_WRONG_VALUE
+INSERT INTO t2 SELECT AVG('x') OVER (
+ PARTITION BY ((NOT AVG(76698761.000000))) IS NOT NULL);
+INSERT IGNORE INTO t2 () VALUES (0),('x'),(3751286.000000),
+ ('x'),((a = 'x' AND 0 AND 0));
+INSERT INTO t2 VALUES (127);
+--error ER_DUP_ENTRY
+INSERT INTO t2 SELECT -2147483648 END FROM t2 AS TEXT JOIN t2 JOIN t2 TABLES;
+--error ER_TRUNCATED_WRONG_VALUE
+ALTER TABLE t2 ADD (
+ b INT UNIQUE CHECK ((a = 'x' AND ((-(+(BINARY 49730460.000000)))) = 'x'
+ BETWEEN 'x' AND 'x')));
+--error ER_DUP_ENTRY
+UPDATE t2 SET a = -128 WHERE a IS NULL ORDER BY 78 IN ('x','x'),a;
+
+DROP TABLE t1, t2;
+DROP PROCEDURE p1;
+
--echo # End of 10.2 test
diff --git a/mysql-test/main/join_cache.result b/mysql-test/main/join_cache.result
index 359739fecf8..10ed8960b64 100644
--- a/mysql-test/main/join_cache.result
+++ b/mysql-test/main/join_cache.result
@@ -3887,8 +3887,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)
diff --git a/mysql-test/main/json_debug_nonembedded.result b/mysql-test/main/json_debug_nonembedded.result
new file mode 100644
index 00000000000..6af88191d97
--- /dev/null
+++ b/mysql-test/main/json_debug_nonembedded.result
@@ -0,0 +1,13 @@
+#
+# Beginning of 10.6 test
+#
+# MDEV-28762: recursive call of some json functions without stack control
+#
+SET @saved_debug= @@debug_dbug;
+SET @@debug_dbug='+d,json_check_min_stack_requirement';
+SELECT * from JSON_TABLE('[{"a": 1, "b": [11,111]}, {"a": 2, "b": [22,222]}]', '$[*]' COLUMNS( a INT PATH '$.a')) as tt;
+ERROR HY000: Thread stack overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed. Consider increasing the thread_stack system variable.
+SET @@debug_dbug= @saved_debug;
+#
+# End of 10.6 tests
+#
diff --git a/mysql-test/main/json_debug_nonembedded.test b/mysql-test/main/json_debug_nonembedded.test
new file mode 100644
index 00000000000..cecb9f1f6ed
--- /dev/null
+++ b/mysql-test/main/json_debug_nonembedded.test
@@ -0,0 +1,22 @@
+-- source include/not_embedded.inc
+--source include/have_debug.inc
+
+--echo #
+--echo # Beginning of 10.6 test
+--echo #
+--echo # MDEV-28762: recursive call of some json functions without stack control
+--echo #
+
+SET @saved_debug= @@debug_dbug;
+
+SET @@debug_dbug='+d,json_check_min_stack_requirement';
+
+--replace_regex /overrun: [0-9]* bytes used of a [0-9]* byte stack, and [0-9]* bytes needed/overrun: 'used bytes' used of a 'available' byte stack, and 'X' bytes needed/
+--error ER_STACK_OVERRUN_NEED_MORE
+SELECT * from JSON_TABLE('[{"a": 1, "b": [11,111]}, {"a": 2, "b": [22,222]}]', '$[*]' COLUMNS( a INT PATH '$.a')) as tt;
+
+SET @@debug_dbug= @saved_debug;
+
+--echo #
+--echo # End of 10.6 tests
+--echo #
diff --git a/mysql-test/main/myisam_icp.result b/mysql-test/main/myisam_icp.result
index d0614913480..2bd9ac9ba95 100644
--- a/mysql-test/main/myisam_icp.result
+++ b/mysql-test/main/myisam_icp.result
@@ -972,10 +972,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;
#
diff --git a/mysql-test/main/mysqld--help.result b/mysql-test/main/mysqld--help.result
index 7cbfa52b846..e051400d2ea 100644
--- a/mysql-test/main/mysqld--help.result
+++ b/mysql-test/main/mysqld--help.result
@@ -363,7 +363,9 @@ The following specify which files/extra groups are read (specified before remain
--gtid-strict-mode Enforce strict seq_no ordering of events in the binary
log. Slave stops with an error if it encounters an event
that would cause it to generate an out-of-order binlog if
- executed.
+ executed. When ON the same server-id semisync-replicated
+ transactions that duplicate exising ones in binlog are
+ ignored without error and slave interruption.
-?, --help Display this help and exit.
--histogram-size=# Number of bytes used for a histogram. If set to 0, no
histograms are created by ANALYZE.
diff --git a/mysql-test/main/mysqld--help.test b/mysql-test/main/mysqld--help.test
index 95ae49b5c89..42f551974d9 100644
--- a/mysql-test/main/mysqld--help.test
+++ b/mysql-test/main/mysqld--help.test
@@ -38,6 +38,7 @@ perl;
test-sql-discovery query-cache-info password-reuse-check
query-response-time metadata-lock-info locales unix-socket
wsrep file-key-management cracklib-password-check user-variables
+ provider-bzip2 provider-lzma provider-lzo
thread-pool-groups thread-pool-queues thread-pool-stats thread-pool-waits/;
# And substitute the content some environment variables with their
diff --git a/mysql-test/main/null.result b/mysql-test/main/null.result
index 16a51d2d931..0a3f996aa4b 100644
--- a/mysql-test/main/null.result
+++ b/mysql-test/main/null.result
@@ -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` (
diff --git a/mysql-test/main/partition_innodb.result b/mysql-test/main/partition_innodb.result
index f5b2e4b3fcd..c593c35bd38 100644
--- a/mysql-test/main/partition_innodb.result
+++ b/mysql-test/main/partition_innodb.result
@@ -946,7 +946,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;
diff --git a/mysql-test/main/profiling.result b/mysql-test/main/profiling.result
index f1403c3ec2f..f4673e62861 100644
--- a/mysql-test/main/profiling.result
+++ b/mysql-test/main/profiling.result
@@ -296,12 +296,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
diff --git a/mysql-test/main/ps.result b/mysql-test/main/ps.result
index bb4132d5c31..793bcc40ead 100644
--- a/mysql-test/main/ps.result
+++ b/mysql-test/main/ps.result
@@ -4392,15 +4392,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);
diff --git a/mysql-test/main/ps_1general.result b/mysql-test/main/ps_1general.result
index 05a40f54a52..ca2447b6b26 100644
--- a/mysql-test/main/ps_1general.result
+++ b/mysql-test/main/ps_1general.result
@@ -283,8 +283,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
diff --git a/mysql-test/main/ps_innodb.result b/mysql-test/main/ps_innodb.result
index 4a5819e4072..2b9ec621f0f 100644
--- a/mysql-test/main/ps_innodb.result
+++ b/mysql-test/main/ps_innodb.result
@@ -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;
diff --git a/mysql-test/main/row.result b/mysql-test/main/row.result
index 12ab4208c11..38af3b40327 100644
--- a/mysql-test/main/row.result
+++ b/mysql-test/main/row.result
@@ -18,14 +18,14 @@ 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 DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
Warning 1292 Truncated incorrect DOUBLE value: 'a'
select row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3));
row('a',0,3) IN (row(3,2,3), row('a','a','3'), row(1,3,3))
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 DOUBLE value: 'a'
select row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3));
row('a',0,3) IN (row(3,2,3), row('a','0','3'), row(1,3,3))
@@ -49,16 +49,16 @@ select row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3));
row('b',1.5,3) IN (row('b',NULL,3), row('a',1.5,3), row(1,3,3))
1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'b'
-Warning 1292 Truncated incorrect DOUBLE value: 'b'
-Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
select row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3));
row('b',1.5,3) IN (row('b',NULL,4), row('a',1.5,3), row(1,3,3))
1
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'b'
-Warning 1292 Truncated incorrect DOUBLE value: 'b'
-Warning 1292 Truncated incorrect DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
select (1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4)));
(1,2,(3,4)) IN ((3,2,(3,4)), (1,2,(3,4)))
1
diff --git a/mysql-test/main/secure_file_priv_win.result b/mysql-test/main/secure_file_priv_win.result
index af402ae9537..418be1df711 100644
--- a/mysql-test/main/secure_file_priv_win.result
+++ b/mysql-test/main/secure_file_priv_win.result
@@ -1,8 +1,6 @@
CREATE TABLE t1 (c1 longtext);
INSERT INTO t1 values ('a');
-SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.tmp';
-Warnings:
-Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+SELECT * INTO OUTFILE 'MYSQL_TMP_DIR/B11764517.tmp' FROM t1;
show global variables like 'secure_file_priv';
Variable_name Value
secure_file_priv MYSQL_TMP_DIR/
@@ -31,18 +29,10 @@ LOAD DATA INFILE 'MYSQL_TMP_DIR_UCASE/B11764517.tmp' INTO TABLE t1;
LOAD DATA INFILE 'MYSQL_TMP_DIR_LCASE/B11764517.tmp' INTO TABLE t1;
LOAD DATA INFILE "MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517.tmp" into table t1;
ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement
-SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517-2.tmp';
+SELECT * INTO OUTFILE 'MYSQL_TMP_DIR\\..a..\\..\\..\\B11764517-2.tmp' FROM t1;
ERROR HY000: The MariaDB server is running with the --secure-file-priv option so it cannot execute this statement
-SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.tmp';
-Warnings:
-Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
-SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR/B11764517-3.tmp';
-Warnings:
-Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
-SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_UCASE/B11764517-4.tmp';
-Warnings:
-Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
-SELECT * FROM t1 INTO OUTFILE 'MYSQL_TMP_DIR_LCASE/B11764517-5.tmp';
-Warnings:
-Warning 1287 '<select expression> INTO <destination>;' is deprecated and will be removed in a future release. Please use 'SELECT <select list> INTO <destination> FROM...' instead
+SELECT * INTO OUTFILE 'MYSQL_TMP_DIR\\B11764517-2.tmp' FROM t1;
+SELECT * INTO OUTFILE 'MYSQL_TMP_DIR/B11764517-3.tmp' FROM t1;
+SELECT * INTO OUTFILE 'MYSQL_TMP_DIR_UCASE/B11764517-4.tmp' FROM t1;
+SELECT * INTO OUTFILE 'MYSQL_TMP_DIR_LCASE/B11764517-5.tmp' FROM t1;
DROP TABLE t1;
diff --git a/mysql-test/main/secure_file_priv_win.test b/mysql-test/main/secure_file_priv_win.test
index a12510974ce..be5345dc161 100644
--- a/mysql-test/main/secure_file_priv_win.test
+++ b/mysql-test/main/secure_file_priv_win.test
@@ -14,7 +14,7 @@ LET $MYSQL_TMP_DIR_LCASE= `SELECT lower('$MYSQL_TMP_DIR')`;
#create the file
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR/B11764517.tmp';
+eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR/B11764517.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
show global variables like 'secure_file_priv';
@@ -52,19 +52,19 @@ eval LOAD DATA INFILE "$MYSQL_TMP_DIR\\\\..a..\\\\..\\\\..\\\\B11764517.tmp" int
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
--error ER_OPTION_PREVENTS_STATEMENT
-eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR\\\\..a..\\\\..\\\\..\\\\B11764517-2.tmp';
+eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR\\\\..a..\\\\..\\\\..\\\\B11764517-2.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR\\\\B11764517-2.tmp';
+eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR\\\\B11764517-2.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR MYSQL_TMP_DIR
-eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR/B11764517-3.tmp';
+eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR/B11764517-3.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR_UCASE MYSQL_TMP_DIR_UCASE
-eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR_UCASE/B11764517-4.tmp';
+eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR_UCASE/B11764517-4.tmp' FROM t1;
--replace_result $MYSQL_TMP_DIR_LCASE MYSQL_TMP_DIR_LCASE
-eval SELECT * FROM t1 INTO OUTFILE '$MYSQL_TMP_DIR_LCASE/B11764517-5.tmp';
+eval SELECT * INTO OUTFILE '$MYSQL_TMP_DIR_LCASE/B11764517-5.tmp' FROM t1;
--error 0,1
--remove_file $MYSQL_TMP_DIR/B11764517.tmp;
diff --git a/mysql-test/main/select.result b/mysql-test/main/select.result
index da013eb2619..2a0bebbf8e9 100644
--- a/mysql-test/main/select.result
+++ b/mysql-test/main/select.result
@@ -5262,11 +5262,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
#
diff --git a/mysql-test/main/select_jcl6.result b/mysql-test/main/select_jcl6.result
index 0d09df225c9..f2a0403bd03 100644
--- a/mysql-test/main/select_jcl6.result
+++ b/mysql-test/main/select_jcl6.result
@@ -5273,11 +5273,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
#
diff --git a/mysql-test/main/select_pkeycache.result b/mysql-test/main/select_pkeycache.result
index da013eb2619..2a0bebbf8e9 100644
--- a/mysql-test/main/select_pkeycache.result
+++ b/mysql-test/main/select_pkeycache.result
@@ -5262,11 +5262,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
#
diff --git a/mysql-test/main/set_statement.result b/mysql-test/main/set_statement.result
index 97cc4f3831a..f1ba03dde65 100644
--- a/mysql-test/main/set_statement.result
+++ b/mysql-test/main/set_statement.result
@@ -1316,6 +1316,18 @@ t1 CREATE TABLE `t1` (
`c1` varchar(3) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP TABLE t1;
+#
+# MDEV-29074 GET_BIT variables crash in SET STATEMENT
+#
+set statement log_queries_not_using_indexes=1 for select @@log_queries_not_using_indexes;
+@@log_queries_not_using_indexes
+1
+select @@log_queries_not_using_indexes;
+@@log_queries_not_using_indexes
+0
+#
+# End of 10.3 tests
+#
create table t (a int);
SET sql_mode=ORACLE;
SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;
diff --git a/mysql-test/main/set_statement.test b/mysql-test/main/set_statement.test
index 670e9862abc..0bf9f423dab 100644
--- a/mysql-test/main/set_statement.test
+++ b/mysql-test/main/set_statement.test
@@ -1161,6 +1161,16 @@ SHOW CREATE TABLE t1;
DROP TABLE t1;
+--echo #
+--echo # MDEV-29074 GET_BIT variables crash in SET STATEMENT
+--echo #
+set statement log_queries_not_using_indexes=1 for select @@log_queries_not_using_indexes;
+select @@log_queries_not_using_indexes;
+
+--echo #
+--echo # End of 10.3 tests
+--echo #
+
create table t (a int);
SET sql_mode=ORACLE;
SET STATEMENT myisam_sort_buffer_size=800000 FOR OPTIMIZE TABLE t;
diff --git a/mysql-test/main/sp-anchor-row-type-table.result b/mysql-test/main/sp-anchor-row-type-table.result
index b51ee5bf55d..69991bf81ad 100644
--- a/mysql-test/main/sp-anchor-row-type-table.result
+++ b/mysql-test/main/sp-anchor-row-type-table.result
@@ -707,7 +707,7 @@ Table Create Table
t2 CREATE TABLE `t2` (
`a` int(11) DEFAULT NULL,
`b` text DEFAULT NULL,
- `c` char(1) DEFAULT NULL
+ `c` varchar(1) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1
DROP PROCEDURE p2;
DROP PROCEDURE p1;
diff --git a/mysql-test/main/sp-anchor-type.result b/mysql-test/main/sp-anchor-type.result
index ac867bd5ca3..a878e73d8c8 100644
--- a/mysql-test/main/sp-anchor-type.result
+++ b/mysql-test/main/sp-anchor-type.result
@@ -469,8 +469,8 @@ t2 CREATE TABLE `t2` (
`t2` text DEFAULT NULL,
`t3` mediumtext DEFAULT NULL,
`t4` longtext DEFAULT NULL,
- `enum1` char(1) DEFAULT NULL,
- `set1` char(5) DEFAULT NULL,
+ `enum1` varchar(1) DEFAULT NULL,
+ `set1` varchar(5) DEFAULT NULL,
`blob1` tinyblob DEFAULT NULL,
`blob2` blob DEFAULT NULL,
`blob3` mediumblob DEFAULT NULL,
@@ -631,8 +631,8 @@ t2 CREATE TABLE `t2` (
`t2` text DEFAULT NULL,
`t3` mediumtext DEFAULT NULL,
`t4` longtext DEFAULT NULL,
- `enum1` char(1) DEFAULT NULL,
- `set1` char(5) DEFAULT NULL,
+ `enum1` varchar(1) DEFAULT NULL,
+ `set1` varchar(5) DEFAULT NULL,
`blob1` tinyblob DEFAULT NULL,
`blob2` blob DEFAULT NULL,
`blob3` mediumblob DEFAULT NULL,
@@ -1044,7 +1044,7 @@ t1 CREATE TABLE `t1` (
`a_flt0` float DEFAULT NULL,
`a_dbl0` double DEFAULT NULL,
`a_bit3` bit(3) DEFAULT NULL,
- `a_enum0` char(1) DEFAULT NULL,
+ `a_enum0` varchar(1) DEFAULT NULL,
`a_varchar10` varchar(10) DEFAULT NULL,
`a_text1` text DEFAULT NULL,
`a_tinytext1` tinytext DEFAULT NULL,
@@ -1062,7 +1062,7 @@ t1 CREATE TABLE `t1` (
`aa_flt0` float DEFAULT NULL,
`aa_dbl0` double DEFAULT NULL,
`aa_bit3` bit(3) DEFAULT NULL,
- `aa_enum0` char(1) DEFAULT NULL,
+ `aa_enum0` varchar(1) DEFAULT NULL,
`aa_varchar10` varchar(10) DEFAULT NULL,
`aa_text1` text DEFAULT NULL,
`aa_tinytext1` tinytext DEFAULT NULL,
diff --git a/mysql-test/main/sp-bugs.result b/mysql-test/main/sp-bugs.result
index 8c6788d03f4..a166a5a0a9a 100644
--- a/mysql-test/main/sp-bugs.result
+++ b/mysql-test/main/sp-bugs.result
@@ -353,3 +353,13 @@ drop table _t1;
#
# End of 10.3 tests
#
+#
+# MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP
+#
+BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR 2 ; END $
+BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR (SELECT 2) ; END $
+KILL (('x' IN ( SELECT 1)) MOD 44);
+ERROR HY000: Unknown thread id: 0
+#
+# End of 10.4 tests
+#
diff --git a/mysql-test/main/sp-bugs.test b/mysql-test/main/sp-bugs.test
index 9b81fd1af61..18fe14dc8bc 100644
--- a/mysql-test/main/sp-bugs.test
+++ b/mysql-test/main/sp-bugs.test
@@ -371,3 +371,18 @@ drop table _t1;
--echo #
--echo # End of 10.3 tests
--echo #
+
+--echo #
+--echo # MDEV-22001: Server crashes in st_select_lex_unit::exclude_level upon execution of SP
+--echo #
+--delimiter $
+BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR 2 ; END $
+BEGIN NOT ATOMIC DECLARE a INT DEFAULT 0 IN ( SELECT 1 ) OR (SELECT 2) ; END $
+--delimiter ;
+
+--error ER_NO_SUCH_THREAD
+KILL (('x' IN ( SELECT 1)) MOD 44);
+
+--echo #
+--echo # End of 10.4 tests
+--echo #
diff --git a/mysql-test/main/sp-vars.result b/mysql-test/main/sp-vars.result
index 4ffc05fa257..127a0993e2b 100644
--- a/mysql-test/main/sp-vars.result
+++ b/mysql-test/main/sp-vars.result
@@ -1307,7 +1307,7 @@ $$
SHOW CREATE TABLE t1;
Table Create Table
t1 CREATE TABLE "t1" (
- "var" char(1) DEFAULT NULL
+ "var" varchar(1) DEFAULT NULL
)
DROP TABLE t1;
#
diff --git a/mysql-test/main/sp.result b/mysql-test/main/sp.result
index bb73622106f..364e7b88ccf 100644
--- a/mysql-test/main/sp.result
+++ b/mysql-test/main/sp.result
@@ -8697,11 +8697,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.000000'
+ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
SELECT f2(e) FROM t1;
-ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30.000000'
+ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
SELECT f3(e) FROM t1;
-ERROR 22007: Truncated incorrect DOUBLE value: '2001-01-01 10:20:30.000000'
+ERROR 22007: Truncated incorrect DECIMAL value: '2001-01-01 10:20:30.000000'
DROP FUNCTION f1;
DROP FUNCTION f2;
DROP FUNCTION f3;
diff --git a/mysql-test/main/subselect.result b/mysql-test/main/subselect.result
index 22a814c1756..781a4d57d7a 100644
--- a/mysql-test/main/subselect.result
+++ b/mysql-test/main/subselect.result
@@ -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);
@@ -4682,7 +4682,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
@@ -5967,7 +5967,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
@@ -6348,10 +6348,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)
@@ -6359,10 +6359,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)
diff --git a/mysql-test/main/subselect4.result b/mysql-test/main/subselect4.result
index c23352c6767..f3277c285d4 100644
--- a/mysql-test/main/subselect4.result
+++ b/mysql-test/main/subselect4.result
@@ -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;
#
@@ -2997,6 +2997,63 @@ ANALYZE
}
DROP TABLE t1;
# End of 10.2 tests
+#
+# MDEV-29139: Redundannt subquery in GROUP BY clause of ANY/ALL subquery
+#
+create table t1 (a int);
+insert into t1 values (3), (1), (2);
+create table t2 (b int not null);
+insert into t2 values (4), (2);
+create table t3 (c int);
+insert into t3 values (7), (1);
+explain extended select a from t1
+where a >= any (select b from t2 group by (select c from t3 where c = 1));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t1`.`a`)))
+select a from t1
+where a >= any (select b from t2 group by (select c from t3 where c = 1));
+a
+3
+2
+prepare stmt from "select a from t1
+where a >= any (select b from t2 group by (select c from t3 where c = 1))";
+execute stmt;
+a
+3
+2
+execute stmt;
+a
+3
+2
+deallocate prepare stmt;
+explain extended select a from t1
+where a <= all (select b from t2 group by (select c from t3 where c = 1));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <not>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) < <cache>(`test`.`t1`.`a`)))
+select a from t1
+where a <= all (select b from t2 group by (select c from t3 where c = 1));
+a
+1
+2
+explain extended select a from t1
+where a >= any (select b from t2 group by 1 + (select c from t3 where c = 1));
+id select_type table type possible_keys key key_len ref rows filtered Extra
+1 PRIMARY t1 ALL NULL NULL NULL NULL 3 100.00 Using where
+2 SUBQUERY t2 ALL NULL NULL NULL NULL 2 100.00
+Warnings:
+Note 1003 /* select#1 */ select `test`.`t1`.`a` AS `a` from `test`.`t1` where <nop>(<in_optimizer>(`test`.`t1`.`a`,(/* select#2 */ select min(`test`.`t2`.`b`) from `test`.`t2`) <= <cache>(`test`.`t1`.`a`)))
+select a from t1
+where a >= any (select b from t2 group by 1 + (select c from t3 where c = 1));
+a
+3
+2
+drop table t1,t2,t3;
# End of 10.3 tests
#
# MDEV-19134: EXISTS() slower if ORDER BY is defined
diff --git a/mysql-test/main/subselect4.test b/mysql-test/main/subselect4.test
index a32d6ec69d5..f7cb09f7771 100644
--- a/mysql-test/main/subselect4.test
+++ b/mysql-test/main/subselect4.test
@@ -2442,6 +2442,45 @@ DROP TABLE t1;
--echo # End of 10.2 tests
+
+--echo #
+--echo # MDEV-29139: Redundannt subquery in GROUP BY clause of ANY/ALL subquery
+--echo #
+
+create table t1 (a int);
+insert into t1 values (3), (1), (2);
+create table t2 (b int not null);
+insert into t2 values (4), (2);
+create table t3 (c int);
+insert into t3 values (7), (1);
+
+let $q1=
+select a from t1
+ where a >= any (select b from t2 group by (select c from t3 where c = 1));
+
+eval explain extended $q1;
+eval $q1;
+
+eval prepare stmt from "$q1";
+execute stmt;
+execute stmt;
+deallocate prepare stmt;
+
+let $q2=
+select a from t1
+ where a <= all (select b from t2 group by (select c from t3 where c = 1));
+
+eval explain extended $q2;
+eval $q2;
+
+let $q3=
+select a from t1
+ where a >= any (select b from t2 group by 1 + (select c from t3 where c = 1));
+eval explain extended $q3;
+eval $q3;
+
+drop table t1,t2,t3;
+
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/subselect_cache.result b/mysql-test/main/subselect_cache.result
index 132e870a860..e859ebbd2e8 100644
--- a/mysql-test/main/subselect_cache.result
+++ b/mysql-test/main/subselect_cache.result
@@ -2889,70 +2889,70 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL w
1 NULL y
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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
-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 DOUBLE value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
SET @@optimizer_switch='subquery_cache=on';
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
SELECT SUBQUERY2_t1 .`col_int_key`
@@ -2980,32 +2980,32 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL w
1 NULL y
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'a'
-Warning 1292 Truncated incorrect DOUBLE value: 'b'
-Warning 1292 Truncated incorrect DOUBLE value: 'c'
-Warning 1292 Truncated incorrect DOUBLE value: 'd'
-Warning 1292 Truncated incorrect DOUBLE value: 'e'
-Warning 1292 Truncated incorrect DOUBLE value: 'f'
-Warning 1292 Truncated incorrect DOUBLE value: 'g'
-Warning 1292 Truncated incorrect DOUBLE value: 'h'
-Warning 1292 Truncated incorrect DOUBLE value: 'i'
-Warning 1292 Truncated incorrect DOUBLE value: 'j'
-Warning 1292 Truncated incorrect DOUBLE value: 'k'
-Warning 1292 Truncated incorrect DOUBLE value: 'l'
-Warning 1292 Truncated incorrect DOUBLE value: 'm'
-Warning 1292 Truncated incorrect DOUBLE value: 'n'
-Warning 1292 Truncated incorrect DOUBLE value: 'o'
-Warning 1292 Truncated incorrect DOUBLE value: 'p'
-Warning 1292 Truncated incorrect DOUBLE value: 'q'
-Warning 1292 Truncated incorrect DOUBLE value: 'r'
-Warning 1292 Truncated incorrect DOUBLE value: 's'
-Warning 1292 Truncated incorrect DOUBLE value: 't'
-Warning 1292 Truncated incorrect DOUBLE value: 'u'
-Warning 1292 Truncated incorrect DOUBLE value: 'v'
-Warning 1292 Truncated incorrect DOUBLE value: 'w'
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
-Warning 1292 Truncated incorrect DOUBLE value: 'y'
-Warning 1292 Truncated incorrect DOUBLE value: 'z'
+Warning 1292 Truncated incorrect DECIMAL value: 'a'
+Warning 1292 Truncated incorrect DECIMAL value: 'b'
+Warning 1292 Truncated incorrect DECIMAL value: 'c'
+Warning 1292 Truncated incorrect DECIMAL value: 'd'
+Warning 1292 Truncated incorrect DECIMAL value: 'e'
+Warning 1292 Truncated incorrect DECIMAL value: 'f'
+Warning 1292 Truncated incorrect DECIMAL value: 'g'
+Warning 1292 Truncated incorrect DECIMAL value: 'h'
+Warning 1292 Truncated incorrect DECIMAL value: 'i'
+Warning 1292 Truncated incorrect DECIMAL value: 'j'
+Warning 1292 Truncated incorrect DECIMAL value: 'k'
+Warning 1292 Truncated incorrect DECIMAL value: 'l'
+Warning 1292 Truncated incorrect DECIMAL value: 'm'
+Warning 1292 Truncated incorrect DECIMAL value: 'n'
+Warning 1292 Truncated incorrect DECIMAL value: 'o'
+Warning 1292 Truncated incorrect DECIMAL value: 'p'
+Warning 1292 Truncated incorrect DECIMAL value: 'q'
+Warning 1292 Truncated incorrect DECIMAL value: 'r'
+Warning 1292 Truncated incorrect DECIMAL value: 's'
+Warning 1292 Truncated incorrect DECIMAL value: 't'
+Warning 1292 Truncated incorrect DECIMAL value: 'u'
+Warning 1292 Truncated incorrect DECIMAL value: 'v'
+Warning 1292 Truncated incorrect DECIMAL value: 'w'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'y'
+Warning 1292 Truncated incorrect DECIMAL value: 'z'
drop table t1,t2,t3,t4;
set @@optimizer_switch= default;
#launchpad BUG#609045
@@ -3430,9 +3430,9 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL d
1 NULL f
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'f'
-Warning 1292 Truncated incorrect DOUBLE value: 'f'
-Warning 1292 Truncated incorrect DOUBLE value: 'f'
+Warning 1292 Truncated incorrect DECIMAL value: 'f'
+Warning 1292 Truncated incorrect DECIMAL value: 'f'
+Warning 1292 Truncated incorrect DECIMAL value: 'f'
SET @@optimizer_switch = 'subquery_cache=on';
/* cache is on */ SELECT COUNT( DISTINCT table2 .`col_int_key` ) , (
SELECT SUBQUERY2_t1 .`col_int_key`
@@ -3447,9 +3447,9 @@ WHERE table1 .`col_varchar_key` ) field10
1 NULL d
1 NULL f
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'f'
-Warning 1292 Truncated incorrect DOUBLE value: 'f'
-Warning 1292 Truncated incorrect DOUBLE value: 'f'
+Warning 1292 Truncated incorrect DECIMAL value: 'f'
+Warning 1292 Truncated incorrect DECIMAL value: 'f'
+Warning 1292 Truncated incorrect DECIMAL value: 'f'
drop table t1,t2,t3,t4;
set @@optimizer_switch= default;
#launchpad BUG#611625
diff --git a/mysql-test/main/subselect_innodb.result b/mysql-test/main/subselect_innodb.result
index 90976963b00..242b01f8955 100644
--- a/mysql-test/main/subselect_innodb.result
+++ b/mysql-test/main/subselect_innodb.result
@@ -723,7 +723,7 @@ a
1
0
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DECIMAL value: ''
drop table t1;
#
# End of 10.4 tests
diff --git a/mysql-test/main/subselect_mat.result b/mysql-test/main/subselect_mat.result
index 980db9f3ee1..d7384dda165 100644
--- a/mysql-test/main/subselect_mat.result
+++ b/mysql-test/main/subselect_mat.result
@@ -578,9 +578,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);
diff --git a/mysql-test/main/subselect_mat_cost_bugs.result b/mysql-test/main/subselect_mat_cost_bugs.result
index 3ff1307268e..1889291398c 100644
--- a/mysql-test/main/subselect_mat_cost_bugs.result
+++ b/mysql-test/main/subselect_mat_cost_bugs.result
@@ -209,8 +209,8 @@ WHERE (t1.f1>0 or t1.f1<0) 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;
#
diff --git a/mysql-test/main/subselect_no_exists_to_in.result b/mysql-test/main/subselect_no_exists_to_in.result
index def116c0f52..fdfa75b48f2 100644
--- a/mysql-test/main/subselect_no_exists_to_in.result
+++ b/mysql-test/main/subselect_no_exists_to_in.result
@@ -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);
@@ -4684,7 +4684,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
@@ -5967,7 +5967,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
@@ -6348,10 +6348,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)
@@ -6359,10 +6359,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)
diff --git a/mysql-test/main/subselect_no_mat.result b/mysql-test/main/subselect_no_mat.result
index 7eb37343051..c644d44e85a 100644
--- a/mysql-test/main/subselect_no_mat.result
+++ b/mysql-test/main/subselect_no_mat.result
@@ -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);
@@ -4682,7 +4682,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
@@ -5964,7 +5964,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
@@ -6343,10 +6343,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)
@@ -6354,10 +6354,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)
diff --git a/mysql-test/main/subselect_no_opts.result b/mysql-test/main/subselect_no_opts.result
index f2981c0c25f..4ad312b7289 100644
--- a/mysql-test/main/subselect_no_opts.result
+++ b/mysql-test/main/subselect_no_opts.result
@@ -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);
@@ -4678,7 +4678,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
@@ -5960,7 +5960,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
@@ -6339,10 +6339,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)
@@ -6350,10 +6350,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)
diff --git a/mysql-test/main/subselect_no_scache.result b/mysql-test/main/subselect_no_scache.result
index 17bec03c53d..0aaae3fb303 100644
--- a/mysql-test/main/subselect_no_scache.result
+++ b/mysql-test/main/subselect_no_scache.result
@@ -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);
@@ -4688,7 +4688,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
@@ -5973,7 +5973,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
@@ -6354,10 +6354,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)
@@ -6365,10 +6365,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)
diff --git a/mysql-test/main/subselect_no_semijoin.result b/mysql-test/main/subselect_no_semijoin.result
index cb3620f4756..ecdaa8d702c 100644
--- a/mysql-test/main/subselect_no_semijoin.result
+++ b/mysql-test/main/subselect_no_semijoin.result
@@ -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);
@@ -4678,7 +4678,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
@@ -5960,7 +5960,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
@@ -6339,10 +6339,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)
@@ -6350,10 +6350,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)
diff --git a/mysql-test/main/subselect_sj.result b/mysql-test/main/subselect_sj.result
index 9febf3d4e5f..ea6180e9022 100644
--- a/mysql-test/main/subselect_sj.result
+++ b/mysql-test/main/subselect_sj.result
@@ -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"
@@ -3336,4 +3336,17 @@ ERROR HY000: Illegal parameter data types geometry and int for operation '='
EXECUTE stmt;
ERROR HY000: Illegal parameter data types geometry and int for operation '='
DROP TABLE t1, t2;
+#
+# MDEV-28871: Assert ... failed in JOIN::dbug_verify_sj_inner_tables with low optimizer_search_depth
+#
+set @tmp_28871=@@optimizer_search_depth;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t1 VALUES (3),(4);
+SET optimizer_search_depth= 1;
+SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 JOIN t1);
+a
+DROP TABLE t1, t2;
+set optimizer_search_depth= @tmp_28871;
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/main/subselect_sj.test b/mysql-test/main/subselect_sj.test
index 324f2828de2..c869f56c837 100644
--- a/mysql-test/main/subselect_sj.test
+++ b/mysql-test/main/subselect_sj.test
@@ -3018,5 +3018,22 @@ EXECUTE stmt;
DROP TABLE t1, t2;
+--echo #
+--echo # MDEV-28871: Assert ... failed in JOIN::dbug_verify_sj_inner_tables with low optimizer_search_depth
+--echo #
+set @tmp_28871=@@optimizer_search_depth;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+
+# Data is optional, fails either way
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t1 VALUES (3),(4);
+
+SET optimizer_search_depth= 1;
+
+SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 JOIN t1);
+DROP TABLE t1, t2;
+set optimizer_search_depth= @tmp_28871;
+
# The following command must be the last one the file
set optimizer_switch=@subselect_sj_tmp;
diff --git a/mysql-test/main/subselect_sj_jcl6.result b/mysql-test/main/subselect_sj_jcl6.result
index 9eac5c65f82..bddf3fdd268 100644
--- a/mysql-test/main/subselect_sj_jcl6.result
+++ b/mysql-test/main/subselect_sj_jcl6.result
@@ -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"
@@ -3347,6 +3347,19 @@ ERROR HY000: Illegal parameter data types geometry and int for operation '='
EXECUTE stmt;
ERROR HY000: Illegal parameter data types geometry and int for operation '='
DROP TABLE t1, t2;
+#
+# MDEV-28871: Assert ... failed in JOIN::dbug_verify_sj_inner_tables with low optimizer_search_depth
+#
+set @tmp_28871=@@optimizer_search_depth;
+CREATE TABLE t1 (a INT);
+CREATE TABLE t2 (b INT);
+INSERT INTO t1 VALUES (1),(2);
+INSERT INTO t1 VALUES (3),(4);
+SET optimizer_search_depth= 1;
+SELECT * FROM t1 WHERE a IN (SELECT b FROM t2 JOIN t1);
+a
+DROP TABLE t1, t2;
+set optimizer_search_depth= @tmp_28871;
set optimizer_switch=@subselect_sj_tmp;
#
# BUG#49129: Wrong result with IN-subquery with join_cache_level=6 and firstmatch=off
diff --git a/mysql-test/main/subselect_sj_mat.result b/mysql-test/main/subselect_sj_mat.result
index 97dcf07705c..17763a3fa02 100644
--- a/mysql-test/main/subselect_sj_mat.result
+++ b/mysql-test/main/subselect_sj_mat.result
@@ -604,9 +604,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);
diff --git a/mysql-test/main/type_enum.result b/mysql-test/main/type_enum.result
index 8d0dfefc64c..9a0df07724c 100644
--- a/mysql-test/main/type_enum.result
+++ b/mysql-test/main/type_enum.result
@@ -2353,3 +2353,34 @@ a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a)
999999999999999999999999999999999999999999999999999999999999 1 1 1 1
DROP TABLE t2;
DROP TABLE t1;
+#
+# MDEV-29062 Wrong result set metadata for a mix of INT+ENUM
+#
+CREATE TABLE t1
+(
+c_int INT,
+c_enum ENUM('1')
+);
+CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c_int` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_enum) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `COALESCE(c_int, c_enum)` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def c_int c_int 253 11 0 Y 0 0 8
+c_int
+SELECT COALESCE(c_int, c_enum) FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(c_int, c_enum) 253 11 0 Y 0 39 8
+COALESCE(c_int, c_enum)
+DROP TABLE t1;
diff --git a/mysql-test/main/type_enum.test b/mysql-test/main/type_enum.test
index 6ff3e257feb..2d6938c27ae 100644
--- a/mysql-test/main/type_enum.test
+++ b/mysql-test/main/type_enum.test
@@ -551,3 +551,31 @@ SHOW CREATE TABLE t2;
SELECT * FROM t2;
DROP TABLE t2;
DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-29062 Wrong result set metadata for a mix of INT+ENUM
+--echo #
+
+CREATE TABLE t1
+(
+ c_int INT,
+ c_enum ENUM('1')
+);
+
+CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_enum) FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+--disable_ps_protocol
+--enable_metadata
+SELECT c_int FROM t1 UNION SELECT c_enum FROM t1;
+SELECT COALESCE(c_int, c_enum) FROM t1;
+--disable_metadata
+--enable_ps_protocol
+
+DROP TABLE t1;
diff --git a/mysql-test/main/type_int.result b/mysql-test/main/type_int.result
index c9763a1453e..36b65dbf49c 100644
--- a/mysql-test/main/type_int.result
+++ b/mysql-test/main/type_int.result
@@ -286,6 +286,175 @@ 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
+#
+# MDEV-25492 BETWEEN clause returns incorrect results on quoted 64-bit ints
+#
+CREATE TABLE betweentest
+(
+id int(11) unsigned NOT NULL AUTO_INCREMENT,
+range1 bigint(20) DEFAULT NULL,
+range2 bigint(20) DEFAULT NULL,
+PRIMARY KEY (id)
+);
+INSERT INTO betweentest VALUES
+(1,2739499741191602369,2739499741191602369),
+(2,2739499741191602192,2739499741191602192),
+(3,2739138623713574912,2739138623730352127);
+SELECT * FROM betweentest WHERE '2739499741191602192' BETWEEN range1 AND range2;
+id range1 range2
+2 2739499741191602192 2739499741191602192
+SELECT * FROM betweentest WHERE 2739499741191602192 BETWEEN range1 AND range2;
+id range1 range2
+2 2739499741191602192 2739499741191602192
+DROP TABLE betweentest;
+#
# End of 10.3 tests
#
#
diff --git a/mysql-test/main/type_int.test b/mysql-test/main/type_int.test
index c2edb0a9756..7ffbe94cc0d 100644
--- a/mysql-test/main/type_int.test
+++ b/mysql-test/main/type_int.test
@@ -221,6 +221,108 @@ 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 # MDEV-25492 BETWEEN clause returns incorrect results on quoted 64-bit ints
+--echo #
+
+CREATE TABLE betweentest
+(
+ id int(11) unsigned NOT NULL AUTO_INCREMENT,
+ range1 bigint(20) DEFAULT NULL,
+ range2 bigint(20) DEFAULT NULL,
+ PRIMARY KEY (id)
+);
+
+INSERT INTO betweentest VALUES
+ (1,2739499741191602369,2739499741191602369),
+ (2,2739499741191602192,2739499741191602192),
+ (3,2739138623713574912,2739138623730352127);
+
+SELECT * FROM betweentest WHERE '2739499741191602192' BETWEEN range1 AND range2;
+
+SELECT * FROM betweentest WHERE 2739499741191602192 BETWEEN range1 AND range2;
+
+DROP TABLE betweentest;
+
+
+--echo #
--echo # End of 10.3 tests
--echo #
diff --git a/mysql-test/main/type_num.result b/mysql-test/main/type_num.result
index 2dadb4f1f8d..849190b68f4 100644
--- a/mysql-test/main/type_num.result
+++ b/mysql-test/main/type_num.result
@@ -550,22 +550,22 @@ 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
Warnings:
-Note 1292 Truncated incorrect DOUBLE value: '1 '
+Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 WHERE d='1 ';
COUNT(*)
2
@@ -585,22 +585,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 WHERE d='';
COUNT(*)
2
@@ -620,22 +620,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: 'x'
+Warning 1292 Truncated incorrect DECIMAL value: 'x'
SELECT COUNT(*) FROM t1 WHERE d='x';
COUNT(*)
2
@@ -655,22 +655,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: ' x'
+Warning 1292 Truncated incorrect DECIMAL value: ' x'
SELECT COUNT(*) FROM t1 WHERE d=' x';
COUNT(*)
2
@@ -690,22 +690,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '.'
+Warning 1292 Truncated incorrect DECIMAL value: '.'
SELECT COUNT(*) FROM t1 WHERE d='.';
COUNT(*)
2
@@ -725,22 +725,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '-'
+Warning 1292 Truncated incorrect DECIMAL value: '-'
SELECT COUNT(*) FROM t1 WHERE d='-';
COUNT(*)
2
@@ -760,22 +760,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '+'
+Warning 1292 Truncated incorrect DECIMAL value: '+'
SELECT COUNT(*) FROM t1 WHERE d='+';
COUNT(*)
2
@@ -795,22 +795,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1x'
+Warning 1292 Truncated incorrect DECIMAL value: '1x'
SELECT COUNT(*) FROM t1 WHERE d='1x';
COUNT(*)
2
@@ -830,22 +830,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1e'
+Warning 1292 Truncated incorrect DECIMAL value: '1e'
SELECT COUNT(*) FROM t1 WHERE d='1e';
COUNT(*)
2
@@ -865,22 +865,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1e+'
+Warning 1292 Truncated incorrect DECIMAL value: '1e+'
SELECT COUNT(*) FROM t1 WHERE d='1e+';
COUNT(*)
2
@@ -900,22 +900,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1E-'
+Warning 1292 Truncated incorrect DECIMAL value: '1E-'
SELECT COUNT(*) FROM t1 WHERE d='1E-';
COUNT(*)
2
@@ -935,22 +935,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1Ex'
+Warning 1292 Truncated incorrect DECIMAL value: '1Ex'
SELECT COUNT(*) FROM t1 WHERE d='1Ex';
COUNT(*)
2
@@ -970,22 +970,22 @@ 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
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: '1e+x'
+Warning 1292 Truncated incorrect DECIMAL value: '1e+x'
SELECT COUNT(*) FROM t1 WHERE d='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
@@ -1056,7 +1060,7 @@ SELECT COUNT(*) FROM t1 FORCE INDEX(i8) WHERE i8='1 ';
COUNT(*)
2
Warnings:
-Note 1292 Truncated incorrect DOUBLE value: '1 '
+Note 1292 Truncated incorrect DECIMAL value: '1 '
SELECT COUNT(*) FROM t1 FORCE INDEX(d) WHERE d='1 ';
COUNT(*)
2
@@ -1081,7 +1085,7 @@ SELECT COUNT(*) FROM t1 FORCE INDEX(i8) WHERE i8='';
COUNT(*)
2
Warnings:
-Warning 1292 Truncated incorrect DOUBLE value: ''
+Warning 1292 Truncated incorrect DECIMAL value: ''
SELECT COUNT(*) FROM t1 FORCE INDEX(d) WHERE d='';
COUNT(*)
2
diff --git a/mysql-test/main/type_num_innodb.result b/mysql-test/main/type_num_innodb.result
index 581a387b2e8..92dc705de90 100644
--- a/mysql-test/main/type_num_innodb.result
+++ b/mysql-test/main/type_num_innodb.result
@@ -46,39 +46,22 @@ ALTER TABLE t1 MODIFY a DECIMAL(10,0);
SELECT * FROM t1,t2 WHERE a=d;
a b c pk d e
Warnings:
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'd'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'd'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'f'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'f'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'g'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'k'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'm'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'o'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'q'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'r'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'u'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'w'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'x'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'x'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 'y'
ALTER TABLE t1 MODIFY a DOUBLE;
SELECT * FROM t1,t2 WHERE a=d;
diff --git a/mysql-test/main/type_set.result b/mysql-test/main/type_set.result
index 5f54521c9dc..f5a518fa60c 100644
--- a/mysql-test/main/type_set.result
+++ b/mysql-test/main/type_set.result
@@ -379,3 +379,34 @@ a FLOOR(a) CEILING(a) TRUNCATE(a,0) ROUND(a)
999999999999999999999999999999999999999999999999999999999999 1 1 1 1
DROP TABLE t2;
DROP TABLE t1;
+#
+# MDEV-29062 Wrong result set metadata for a mix of INT+ENUM
+#
+CREATE TABLE t1
+(
+c_int INT,
+c_set SET('1')
+);
+CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `c_int` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_set) FROM t1;
+SHOW CREATE TABLE t2;
+Table Create Table
+t2 CREATE TABLE `t2` (
+ `COALESCE(c_int, c_set)` varchar(11) DEFAULT NULL
+) ENGINE=MyISAM DEFAULT CHARSET=latin1
+DROP TABLE t2;
+SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def c_int c_int 253 33 0 Y 0 0 33
+c_int
+SELECT COALESCE(c_int, c_set) FROM t1;
+Catalog Database Table Table_alias Column Column_alias Type Length Max length Is_null Flags Decimals Charsetnr
+def COALESCE(c_int, c_set) 253 33 0 Y 0 39 33
+COALESCE(c_int, c_set)
+DROP TABLE t1;
diff --git a/mysql-test/main/type_set.test b/mysql-test/main/type_set.test
index 2d0c81340ae..b79a3fff452 100644
--- a/mysql-test/main/type_set.test
+++ b/mysql-test/main/type_set.test
@@ -261,3 +261,31 @@ SHOW CREATE TABLE t2;
SELECT * FROM t2;
DROP TABLE t2;
DROP TABLE t1;
+
+
+--echo #
+--echo # MDEV-29062 Wrong result set metadata for a mix of INT+ENUM
+--echo #
+
+CREATE TABLE t1
+(
+ c_int INT,
+ c_set SET('1')
+);
+
+CREATE TABLE t2 AS SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+CREATE OR REPLACE TABLE t2 AS SELECT COALESCE(c_int, c_set) FROM t1;
+SHOW CREATE TABLE t2;
+DROP TABLE t2;
+
+--disable_ps_protocol
+--enable_metadata
+SELECT c_int FROM t1 UNION SELECT c_set FROM t1;
+SELECT COALESCE(c_int, c_set) FROM t1;
+--disable_metadata
+--enable_ps_protocol
+
+DROP TABLE t1;
diff --git a/mysql-test/main/type_varchar.result b/mysql-test/main/type_varchar.result
index cfc8218b8ab..7bffba4a19e 100644
--- a/mysql-test/main/type_varchar.result
+++ b/mysql-test/main/type_varchar.result
@@ -476,7 +476,6 @@ a (a DIV 2)
t 0
Warnings:
Warning 1292 Truncated incorrect DECIMAL value: '1a'
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: 't '
SELECT a,CAST(a AS SIGNED) FROM t1 ORDER BY a;
a CAST(a AS SIGNED)
@@ -498,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'), ('');
@@ -509,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
diff --git a/mysql-test/main/type_year.result b/mysql-test/main/type_year.result
index a3918580e1f..ccab548321b 100644
--- a/mysql-test/main/type_year.result
+++ b/mysql-test/main/type_year.result
@@ -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
diff --git a/mysql-test/main/view.result b/mysql-test/main/view.result
index 712b8629c09..5cf513148e5 100644
--- a/mysql-test/main/view.result
+++ b/mysql-test/main/view.result
@@ -1503,6 +1503,8 @@ execute stmt1 using @a;
set @a= 301;
execute stmt1 using @a;
deallocate prepare stmt1;
+insert into v3(a) select sum(302);
+insert into v3(a) select sum(303) over ();
select * from v3;
a b
100 0
@@ -1521,6 +1523,14 @@ a b
301 10
301 1000
301 2000
+302 0
+302 10
+302 1000
+302 2000
+303 0
+303 10
+303 1000
+303 2000
drop view v3;
drop tables t1,t2;
create table t1(f1 int);
@@ -6148,11 +6158,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'));
@@ -6175,11 +6185,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'));
@@ -6892,8 +6902,19 @@ CREATE TABLE t4 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
ERROR 42S22: Unknown column 't1.x' in 'on clause'
DROP TABLE t1,t2,t3;
#
-# End of 10.4 tests
+# MDEV-29088: view specification contains unknown column in ON condition
#
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+create view v as
+select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
+ERROR 42S22: Unknown column 'd' in 'field list'
+create algorithm=merge view v as
+select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
+ERROR 42S22: Unknown column 'd' in 'field list'
+drop table t1,t2,t3;
+# End of 10.4 tests
#
# MDEV-13115: SELECT .. SKIP LOCKED - ensure SHOW CREATE VIEW is correct
#
@@ -6920,5 +6941,20 @@ Drop View v3;
Drop View v4;
Drop table t1;
#
+# MDEV-26456: SIGSEGV in flush_tables_with_read_lock on FLUSH TABLE
+#
+CREATE FUNCTION f() RETURNS INT RETURN (SELECT 1 FROM t);
+CREATE VIEW v AS SELECT f();
+SELECT * FROM v;
+ERROR HY000: View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+FLUSH TABLE v WITH READ LOCK;
+UNLOCK TABLES;
+FLUSH TABLES v FOR EXPORT;
+UNLOCK TABLES;
+SELECT * FROM v;
+ERROR HY000: View 'test.v' references invalid table(s) or column(s) or function(s) or definer/invoker of view lack rights to use them
+DROP VIEW v;
+DROP FUNCTION f;
+#
# End of 10.6 tests
#
diff --git a/mysql-test/main/view.test b/mysql-test/main/view.test
index 49b339c9f4c..71c8eff0539 100644
--- a/mysql-test/main/view.test
+++ b/mysql-test/main/view.test
@@ -1334,6 +1334,8 @@ execute stmt1 using @a;
set @a= 301;
execute stmt1 using @a;
deallocate prepare stmt1;
+insert into v3(a) select sum(302);
+insert into v3(a) select sum(303) over ();
--sorted_result
select * from v3;
@@ -6626,9 +6628,25 @@ CREATE TABLE t4 AS SELECT * FROM t1 JOIN t2 ON t1.x > t2.b;
DROP TABLE t1,t2,t3;
--echo #
---echo # End of 10.4 tests
+--echo # MDEV-29088: view specification contains unknown column in ON condition
--echo #
+create table t1 (a int);
+create table t2 (b int);
+create table t3 (c int);
+
+--error ER_BAD_FIELD_ERROR
+create view v as
+ select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
+
+--error ER_BAD_FIELD_ERROR
+create algorithm=merge view v as
+ select * from t1 left join t2 on t1.a=t2.b and t1.a in (select d from t3);
+
+drop table t1,t2,t3;
+
+--echo # End of 10.4 tests
+
--echo #
--echo # MDEV-13115: SELECT .. SKIP LOCKED - ensure SHOW CREATE VIEW is correct
--echo #
@@ -6654,5 +6672,23 @@ Drop View v4;
Drop table t1;
--echo #
+--echo # MDEV-26456: SIGSEGV in flush_tables_with_read_lock on FLUSH TABLE
+--echo #
+
+CREATE FUNCTION f() RETURNS INT RETURN (SELECT 1 FROM t);
+CREATE VIEW v AS SELECT f();
+--error ER_VIEW_INVALID
+SELECT * FROM v;
+FLUSH TABLE v WITH READ LOCK;
+UNLOCK TABLES;
+FLUSH TABLES v FOR EXPORT;
+UNLOCK TABLES;
+--error ER_VIEW_INVALID
+SELECT * FROM v;
+
+DROP VIEW v;
+DROP FUNCTION f;
+
+--echo #
--echo # End of 10.6 tests
--echo #
diff --git a/mysql-test/main/warnings.result b/mysql-test/main/warnings.result
index aa4cab37741..8340cb9e981 100644
--- a/mysql-test/main/warnings.result
+++ b/mysql-test/main/warnings.result
@@ -327,7 +327,6 @@ select CAST(a AS DECIMAL(13,5)) FROM (SELECT '' as a) t;
CAST(a AS DECIMAL(13,5))
0.00000
Warnings:
-Warning 1918 Encountered illegal value '' when converting to DECIMAL
Warning 1292 Truncated incorrect DECIMAL value: ''
create table t1 (a integer unsigned);
insert into t1 values (1),(-1),(0),(-2);
diff --git a/mysql-test/main/xtradb_mrr.result b/mysql-test/main/xtradb_mrr.result
index 34fd8300423..836d3f0af35 100644
--- a/mysql-test/main/xtradb_mrr.result
+++ b/mysql-test/main/xtradb_mrr.result
@@ -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;