summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql.test
diff options
context:
space:
mode:
authorAlexander Barkov <bar@mariadb.org>2015-03-16 21:55:10 +0400
committerAlexander Barkov <bar@mariadb.org>2015-03-16 21:55:10 +0400
commite6f67c64cda4e4ca4f1463ae65f301358ed356a7 (patch)
treefe952ce152ae5383966b8761756cd59cdd86dc44 /mysql-test/t/mysql.test
parent4cb86b79dd61b51ab09811a8c5ef383a16638fc9 (diff)
downloadmariadb-git-e6f67c64cda4e4ca4f1463ae65f301358ed356a7.tar.gz
MDEV-6572 "USE dbname" with a bad sequence erroneously connects to a wrong database
Diffstat (limited to 'mysql-test/t/mysql.test')
-rw-r--r--mysql-test/t/mysql.test24
1 files changed, 24 insertions, 0 deletions
diff --git a/mysql-test/t/mysql.test b/mysql-test/t/mysql.test
index 2b4b1e69ab6..c328ab19ffd 100644
--- a/mysql-test/t/mysql.test
+++ b/mysql-test/t/mysql.test
@@ -608,5 +608,29 @@ EOF
#
--exec $MYSQL -t -N -e "SELECT 'a' union select 'aaaaaaaaaaaaaaaaa'"
+--echo #
+--echo # Start of 10.1 tests
+--echo #
+
+--echo #
+--echo # MDEV-6572 "USE dbname" with a bad sequence erroneously connects to a wrong database
+--echo #
+
+--echo #
+--echo # End of 10.1 tests
+--echo #
+
+--error 1
+--exec $MYSQL --default-character-set=utf8 -e "select 1" "test😁 " 2>&1
+--error 1
+--exec $MYSQL --default-character-set=binary -e "select 1" "test😁 " 2>&1
+--write_file $MYSQLTEST_VARDIR/tmp/mdev-6572.sql
+SET NAMES utf8;
+USE test😁 ;
+EOF
+--error 1
+--exec $MYSQL --default-character-set=utf8 < $MYSQLTEST_VARDIR/tmp/mdev-6572.sql 2>&1
+--remove_file $MYSQLTEST_VARDIR/tmp/mdev-6572.sql
+
--echo
--echo End of tests