summaryrefslogtreecommitdiff
path: root/mysql-test/t
diff options
context:
space:
mode:
Diffstat (limited to 'mysql-test/t')
-rw-r--r--mysql-test/t/cast.test13
-rw-r--r--mysql-test/t/ctype_utf8mb4.test15
-rw-r--r--mysql-test/t/func_str.test12
-rw-r--r--mysql-test/t/join_outer.test31
-rw-r--r--mysql-test/t/mysql_plugin.test66
-rw-r--r--mysql-test/t/mysqlshow.test9
-rw-r--r--mysql-test/t/variables.test12
7 files changed, 102 insertions, 56 deletions
diff --git a/mysql-test/t/cast.test b/mysql-test/t/cast.test
index c39b7267f83..64e8225530b 100644
--- a/mysql-test/t/cast.test
+++ b/mysql-test/t/cast.test
@@ -412,6 +412,19 @@ 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
select cast("2101-00-01 02:03:04" as datetime);
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 #
diff --git a/mysql-test/t/func_str.test b/mysql-test/t/func_str.test
index f245b4f9f78..1a60b0c222a 100644
--- a/mysql-test/t/func_str.test
+++ b/mysql-test/t/func_str.test
@@ -1538,6 +1538,18 @@ create table t1(a int) select null;
select 1 div convert(a using utf8) from t1;
drop table t1;
+#
+# BUG#11757250: REPLACE(...) INSIDE A STORED PROCEDURE.
+#
+create table t1 (a int);
+create table t2 (a int);
+create procedure foo (var char(100))
+ select replace(var, '00000000', table_name)
+ from information_schema.tables where table_schema='test';
+--sorted_result
+call foo('(( 00000000 ++ 00000000 ))');
+drop procedure foo;
+drop table t1,t2;
--echo #
--echo # End of 5.5 tests
diff --git a/mysql-test/t/join_outer.test b/mysql-test/t/join_outer.test
index a325d0b6233..24885c056b8 100644
--- a/mysql-test/t/join_outer.test
+++ b/mysql-test/t/join_outer.test
@@ -1439,6 +1439,37 @@ GROUP BY t2.f1, t2.f2;
DROP TABLE t1,t2;
+--echo #
+--echo # Bug#13068506 - QUERY WITH GROUP BY ON NON-AGGR COLUMN RETURNS
+--echo # WRONG RESULT
+--echo #
+
+CREATE TABLE t1 (i1 int);
+INSERT INTO t1 VALUES (100), (101);
+
+CREATE TABLE t2 (i2 int, i3 int);
+INSERT INTO t2 VALUES (20,1),(10,2);
+
+CREATE TABLE t3 (i4 int(11));
+INSERT INTO t3 VALUES (1),(2);
+
+let $query= SELECT (
+ SELECT MAX( t2.i2 )
+ FROM t3 RIGHT JOIN t2 ON ( t2.i3 = 2 )
+ WHERE t2.i3 <> t1.i1
+) AS field1
+FROM t1;
+
+--echo
+--eval $query;
+--echo
+--eval $query GROUP BY field1;
+
+--echo
+drop table t1,t2,t3;
+
+--echo # End of test for Bug#13068506
+
--echo End of 5.1 tests
--echo #
diff --git a/mysql-test/t/mysql_plugin.test b/mysql-test/t/mysql_plugin.test
index a05b5a624d9..10bc03e0f06 100644
--- a/mysql-test/t/mysql_plugin.test
+++ b/mysql-test/t/mysql_plugin.test
@@ -110,13 +110,8 @@ SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
--echo #
--echo # Enable the plugin...
--echo #
-let $expect_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
-# MTR will remove this file later, but this might be too late.
---error 0,1
---remove_file $expect_file
---write_file $expect_file
-wait
-EOF
+
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--source include/wait_until_disconnected.inc
@@ -132,9 +127,8 @@ EOF
#
# Restart the server
#
---append_file $expect_file
-restart
-EOF
+
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -155,12 +149,7 @@ eval INSERT INTO mysql.plugin VALUES ('wonky', '$DAEMONEXAMPLE');
--replace_regex /\.dll/.so/
SELECT * FROM mysql.plugin WHERE dl like 'libdaemon%' ORDER BY name;
-# MTR will remove this file later, but this might be too late.
---error 0,1
---remove_file $expect_file
---write_file $expect_file
-wait
-EOF
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--source include/wait_until_disconnected.inc
@@ -177,9 +166,7 @@ EOF
#
# Restart the server
#
---append_file $expect_file
-restart
-EOF
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -189,12 +176,7 @@ EOF
--replace_regex /\.dll/.so/
SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
-# MTR will remove this file later, but this might be too late.
---error 0,1
---remove_file $expect_file
---write_file $expect_file
-wait
-EOF
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--source include/wait_until_disconnected.inc
@@ -211,9 +193,7 @@ let $DAEMON_RELOAD = lib$DAEMONEXAMPLE;
#
# Restart the server
#
---append_file $expect_file
-restart
-EOF
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -226,12 +206,8 @@ SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
--echo #
--echo # Disable the plugin...
--echo #
-# MTR will remove this file later, but this might be too late.
---error 0,1
---remove_file $expect_file
---write_file $expect_file
-wait
-EOF
+
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--source include/wait_until_disconnected.inc
@@ -248,9 +224,7 @@ EOF
#
# Restart the server
#
---append_file $expect_file
-restart
-EOF
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
@@ -262,13 +236,8 @@ SELECT * FROM mysql.plugin WHERE dl like '%libdaemon%' ORDER BY name;
#
# Stop the server for error conditions
#
-let $expect_file= $MYSQLTEST_VARDIR/tmp/mysqld.1.expect;
-# MTR will remove this file later, but this might be too late.
---error 0,1
---remove_file $expect_file
---write_file $expect_file
-wait
-EOF
+
+--exec echo "wait" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--shutdown_server 10
--source include/wait_until_disconnected.inc
@@ -382,17 +351,14 @@ replace_result $MYSQL_PLUGIN mysql_plugin;
#
# Restart the server
#
---append_file $expect_file
-restart
-EOF
+--exec echo "restart" > $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
--enable_reconnect
--source include/wait_until_connected_again.inc
#
# Cleanup
-# MTR will remove this file later, but this might be too late.
---error 0,1
---remove_file $expect_file
+
+--remove_file $MYSQLTEST_VARDIR/tmp/mysqld.1.expect
# Cleanup the share folder in the binary path.
--remove_file $MYSQLD_BASEDIR/share/errmsg.sys
diff --git a/mysql-test/t/mysqlshow.test b/mysql-test/t/mysqlshow.test
index cf8661d090c..4602c15e566 100644
--- a/mysql-test/t/mysqlshow.test
+++ b/mysql-test/t/mysqlshow.test
@@ -29,17 +29,14 @@ select "---- -v -v -t ------" as "";
DROP TABLE t1, t2;
-if (`select count(*) from information_schema.plugins where plugin_name='innodb' and plugin_auth_version > "5.5.31"`)
-{
# because of lp:1066512 this test shows xtradb I_S plugins, even when
# xtradb is supposed to be disabled
#
# Bug #19147: mysqlshow INFORMATION_SCHEMA does not work
#
---exec $MYSQL_SHOW information_schema
---exec $MYSQL_SHOW INFORMATION_SCHEMA
---exec $MYSQL_SHOW inf_rmation_schema
-}
+#--exec $MYSQL_SHOW information_schema
+#--exec $MYSQL_SHOW INFORMATION_SCHEMA
+#--exec $MYSQL_SHOW inf_rmation_schema
--echo End of 5.0 tests
diff --git a/mysql-test/t/variables.test b/mysql-test/t/variables.test
index 792859386e9..6c4599740e7 100644
--- a/mysql-test/t/variables.test
+++ b/mysql-test/t/variables.test
@@ -1538,4 +1538,16 @@ set session collation_connection=2048;
--error ER_UNKNOWN_COLLATION
set session collation_database=2048;
+#
+# Bug #16044655 CRASH: SETTING DEFAULT VALUE FOR SOME VARIABLES
+#
+--error ER_NO_DEFAULT
+set session rand_seed1=DEFAULT;
+
+#
+# Bug #14211565 CRASH WHEN ATTEMPTING TO SET SYSTEM VARIABLE TO RESULT OF VALUES()
+#
+--error ER_BAD_FIELD_ERROR
+set autocommit = values(v);
+
--echo End of 5.5 tests