diff options
Diffstat (limited to 'mysql-test')
-rw-r--r-- | mysql-test/r/cast.result | 18 | ||||
-rw-r--r-- | mysql-test/r/ctype_utf8mb4.result | 18 | ||||
-rw-r--r-- | mysql-test/t/cast.test | 13 | ||||
-rw-r--r-- | mysql-test/t/ctype_utf8mb4.test | 15 |
4 files changed, 64 insertions, 0 deletions
diff --git a/mysql-test/r/cast.result b/mysql-test/r/cast.result index 736ef12968a..dd27a3bd0aa 100644 --- a/mysql-test/r/cast.result +++ b/mysql-test/r/cast.result @@ -477,4 +477,22 @@ WHERE CAST(a as BINARY)=x'62736D697468' AND CAST(a AS BINARY)=x'65736D697468'; a DROP TABLE t1; +# +# Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH +# LONGTEXT, UNION, USER VARIABLE +# Bug#14096619 UNABLE TO RESTORE DATABASE DUMP +# +CREATE TABLE t1 AS SELECT CONCAT(CAST(REPEAT('9', 1000) AS SIGNED)), +CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED)); +Warnings: +Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999' +Warning 1292 Truncated incorrect INTEGER value: '99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999' +SHOW CREATE TABLE t1; +Table Create Table +t1 CREATE TABLE `t1` ( + `CONCAT(CAST(REPEAT('9', 1000) AS SIGNED))` varchar(21) NOT NULL DEFAULT '', + `CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED))` varchar(21) NOT NULL DEFAULT '' +) ENGINE=MyISAM DEFAULT CHARSET=latin1 +DROP TABLE t1; +# End of test for Bug#13581962, Bug#14096619 End of 5.1 tests diff --git a/mysql-test/r/ctype_utf8mb4.result b/mysql-test/r/ctype_utf8mb4.result index 3b9abbc5412..c7084134cd3 100644 --- a/mysql-test/r/ctype_utf8mb4.result +++ b/mysql-test/r/ctype_utf8mb4.result @@ -2539,6 +2539,24 @@ t2 CREATE TABLE `t2` ( ) ENGINE=MyISAM DEFAULT CHARSET=latin1 DROP TABLE t1, t2; # +# Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH +# LONGTEXT, UNION, USER VARIABLE +# Bug#14096619 UNABLE TO RESTORE DATABASE DUMP +# +CREATE TABLE t1(f1 LONGTEXT CHARACTER SET utf8mb4); +INSERT INTO t1 VALUES ('a'); +SELECT @a:= CAST(f1 AS SIGNED) FROM t1 +UNION ALL +SELECT CAST(f1 AS SIGNED) FROM t1; +@a:= CAST(f1 AS SIGNED) +0 +0 +Warnings: +Warning 1292 Truncated incorrect INTEGER value: 'a' +Warning 1292 Truncated incorrect INTEGER value: 'a' +DROP TABLE t1; +# End of test for Bug#13581962,Bug#14096619 +# # End of 5.5 tests # # diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test index 3ba684a9b25..150ab9b4dd8 100644 --- a/mysql-test/t/cast.test +++ b/mysql-test/t/cast.test @@ -307,4 +307,17 @@ WHERE CAST(a as BINARY)=x'62736D697468' DROP TABLE t1; +--echo # +--echo # Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH +--echo # LONGTEXT, UNION, USER VARIABLE +--echo # Bug#14096619 UNABLE TO RESTORE DATABASE DUMP +--echo # + +CREATE TABLE t1 AS SELECT CONCAT(CAST(REPEAT('9', 1000) AS SIGNED)), + CONCAT(CAST(REPEAT('9', 1000) AS UNSIGNED)); +SHOW CREATE TABLE t1; +DROP TABLE t1; + +--echo # End of test for Bug#13581962, Bug#14096619 + --echo End of 5.1 tests diff --git a/mysql-test/t/ctype_utf8mb4.test b/mysql-test/t/ctype_utf8mb4.test index 03696f385b5..fda20ca0ec5 100644 --- a/mysql-test/t/ctype_utf8mb4.test +++ b/mysql-test/t/ctype_utf8mb4.test @@ -1812,6 +1812,21 @@ SHOW CREATE TABLE t2; DROP TABLE t1, t2; --echo # +--echo # Bug#13581962 HIGH MEMORY USAGE ATTEMPT, THEN CRASH WITH +--echo # LONGTEXT, UNION, USER VARIABLE +--echo # Bug#14096619 UNABLE TO RESTORE DATABASE DUMP +--echo # + +CREATE TABLE t1(f1 LONGTEXT CHARACTER SET utf8mb4); +INSERT INTO t1 VALUES ('a'); +SELECT @a:= CAST(f1 AS SIGNED) FROM t1 +UNION ALL +SELECT CAST(f1 AS SIGNED) FROM t1; +DROP TABLE t1; + +--echo # End of test for Bug#13581962,Bug#14096619 + +--echo # --echo # End of 5.5 tests --echo # |