1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-29 05:21:33 +03:00

MDEV-6572 "USE dbname" with a bad sequence erroneously connects to a wrong database

This commit is contained in:
Alexander Barkov
2015-03-16 21:55:10 +04:00
parent 4cb86b79dd
commit e6f67c64cd
13 changed files with 232 additions and 21 deletions

View File

@ -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