1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +03:00

mysql cli: fix USE command quoting

* use proper sql quoting rules for USE, while preserving
  as much of historical behavior as possible
* short commands (\u) behave as before
This commit is contained in:
Sergei Golubchik
2016-10-13 21:35:01 +02:00
parent e4957de4fd
commit 383007c75d
3 changed files with 46 additions and 26 deletions

View File

@ -586,8 +586,16 @@ DROP DATABASE connected_db;
# USE and names with backticks
#
--write_file $MYSQLTEST_VARDIR/tmp/backticks.sql
\u aa`bb``cc
SELECT DATABASE();
USE test
SELECT DATABASE();
USE aa`bb``cc
SELECT DATABASE();
USE test
SELECT DATABASE();
USE `aa``bb````cc`
SELECT DATABASE();
EOF
create database `aa``bb````cc`;
--exec $MYSQL < $MYSQLTEST_VARDIR/tmp/backticks.sql