summaryrefslogtreecommitdiff
path: root/mysql-test/t/mysqldump.test
diff options
context:
space:
mode:
authorSergey Vojtovich <svoj@mariadb.org>2015-12-02 16:08:54 +0400
committerSergey Vojtovich <svoj@mariadb.org>2015-12-03 16:33:50 +0400
commit9f07c6b383d776d430510de1256b3e4e8680bc60 (patch)
tree8cccbf3cc4a008696e639fd450a8896f888e53c5 /mysql-test/t/mysqldump.test
parent33589b25efe3283b748e43a54c42db2ed176c3e5 (diff)
downloadmariadb-git-9f07c6b383d776d430510de1256b3e4e8680bc60.tar.gz
MDEV-9001 - [PATCH] Fix DB name quoting in mysqldump --routine
mysqldump --routine fails to dump databases containing backslash ("\") character. This happened because escaped database name was being used as an identifier while changing current database. Such identifers are not supposed to be escaped, they must be properly quoted instead.
Diffstat (limited to 'mysql-test/t/mysqldump.test')
-rw-r--r--mysql-test/t/mysqldump.test10
1 files changed, 10 insertions, 0 deletions
diff --git a/mysql-test/t/mysqldump.test b/mysql-test/t/mysqldump.test
index e0c0ce346ed..b0285747e4e 100644
--- a/mysql-test/t/mysqldump.test
+++ b/mysql-test/t/mysqldump.test
@@ -2494,3 +2494,13 @@ DROP DATABASE db_20772273;
--exec $MYSQL_DUMP --user=foo 2>&1 > $MYSQLTEST_VARDIR/tmp/bug6056.out
--exec $MYSQL_DUMP --help > $MYSQLTEST_VARDIR/tmp/bug6056.out
+
+--echo #
+--echo # MDEV-9001 - [PATCH] Fix DB name quoting in mysqldump --routine
+--echo #
+CREATE DATABASE `a\"'``b`;
+USE `a\"'``b`;
+CREATE PROCEDURE p1() BEGIN END;
+ALTER DATABASE `a\"'``b` COLLATE utf8_general_ci;
+--exec $MYSQL_DUMP --routines --compact a\\\"\'\`b 2>&1
+DROP DATABASE `a\"'``b`;