1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-30 16:24:05 +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:
Sergei Golubchik
2017-02-21 11:07:42 +01:00
parent d72dbb4122
commit 44534487d4
2 changed files with 11 additions and 2 deletions

View File

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