summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysql.test
diff options
context:
space:
mode:
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