mirror of
https://github.com/MariaDB/server.git
synced 2025-01-18 13:02:28 +01:00
Merge gleb.loc:/home/uchum/work/bk/5.0-opt-30126
into gleb.loc:/home/uchum/work/bk/5.0-opt
This commit is contained in:
commit
b25b8cbc72
5 changed files with 21 additions and 1 deletions
|
@ -2898,7 +2898,7 @@ int init_dumping_tables(char *qdatabase)
|
|||
/* Old server version, dump generic CREATE DATABASE */
|
||||
if (opt_drop_database)
|
||||
fprintf(md_result_file,
|
||||
"\n/*!40000 DROP DATABASE IF EXISTS %s;*/\n",
|
||||
"\n/*!40000 DROP DATABASE IF EXISTS %s*/;\n",
|
||||
qdatabase);
|
||||
fprintf(md_result_file,
|
||||
"\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ %s;\n",
|
||||
|
|
4
mysql-test/r/mysqldump-compat.result
Normal file
4
mysql-test/r/mysqldump-compat.result
Normal file
|
@ -0,0 +1,4 @@
|
|||
CREATE DATABASE mysqldump_30126;
|
||||
USE mysqldump_30126;
|
||||
CREATE TABLE t1 (c1 int);
|
||||
DROP DATABASE mysqldump_30126;
|
1
mysql-test/t/mysqldump-compat.opt
Normal file
1
mysql-test/t/mysqldump-compat.opt
Normal file
|
@ -0,0 +1 @@
|
|||
--loose-debug=d,4x_server_emul
|
13
mysql-test/t/mysqldump-compat.test
Normal file
13
mysql-test/t/mysqldump-compat.test
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Embedded server doesn't support external clients
|
||||
--source include/not_embedded.inc
|
||||
|
||||
#
|
||||
# Bug #30126: semicolon before closing */ in /*!... CREATE DATABASE ;*/
|
||||
#
|
||||
|
||||
CREATE DATABASE mysqldump_30126;
|
||||
USE mysqldump_30126;
|
||||
CREATE TABLE t1 (c1 int);
|
||||
--exec $MYSQL_DUMP --add-drop-database mysqldump_30126 > $MYSQLTEST_VARDIR/tmp/bug30126.sql
|
||||
--exec $MYSQL mysqldump_30126 < $MYSQLTEST_VARDIR/tmp/bug30126.sql
|
||||
DROP DATABASE mysqldump_30126;
|
|
@ -3990,6 +3990,8 @@ end_with_restore_list:
|
|||
}
|
||||
case SQLCOM_SHOW_CREATE_DB:
|
||||
{
|
||||
DBUG_EXECUTE_IF("4x_server_emul",
|
||||
my_error(ER_UNKNOWN_ERROR, MYF(0)); goto error;);
|
||||
if (!strip_sp(lex->name) || check_db_name(lex->name))
|
||||
{
|
||||
my_error(ER_WRONG_DB_NAME, MYF(0), lex->name);
|
||||
|
|
Loading…
Reference in a new issue