mirror of
https://github.com/MariaDB/server.git
synced 2025-08-01 03:47:19 +03:00
MDEV-11505 wrong databasename in mysqldump comment
fix_for_comment() uses a static buffer. cannot have two fix_for_comment() calls as arguments to one printf().
This commit is contained in:
@ -670,8 +670,9 @@ static void write_header(FILE *sql_file, char *db_name)
|
||||
"-- MySQL dump %s Distrib %s, for %s (%s)\n--\n",
|
||||
DUMP_VERSION, MYSQL_SERVER_VERSION, SYSTEM_TYPE,
|
||||
MACHINE_TYPE);
|
||||
print_comment(sql_file, 0, "-- Host: %s Database: %s\n",
|
||||
fix_for_comment(current_host ? current_host : "localhost"),
|
||||
print_comment(sql_file, 0, "-- Host: %s ",
|
||||
fix_for_comment(current_host ? current_host : "localhost"));
|
||||
print_comment(sql_file, 0, "Database: %s\n",
|
||||
fix_for_comment(db_name ? db_name : ""));
|
||||
print_comment(sql_file, 0,
|
||||
"-- ------------------------------------------------------\n"
|
||||
|
@ -2509,3 +2509,11 @@ if (`select convert(@@version_compile_os using latin1) IN ("Win32","Win64","Wind
|
||||
}
|
||||
--exec $MYSQL_DUMP --routines --compact $shell_ready_db_name
|
||||
DROP DATABASE `a\"'``b`;
|
||||
|
||||
#"
|
||||
# MDEV-11505 wrong databasename in mysqldump comment
|
||||
#
|
||||
let SEARCH_FILE=$MYSQLTEST_VARDIR/tmp/bug11505.sql;
|
||||
let SEARCH_PATTERN=Database: mysql;
|
||||
exec $MYSQL_DUMP mysql func > $SEARCH_FILE;
|
||||
source include/search_pattern_in_file.inc;
|
||||
|
Reference in New Issue
Block a user