Commit ca399fec authored by unknown's avatar unknown

Merge eagle.mysql.r18.ru:/home/vva/work/mysql.orig/clear/mysql-4.0

into eagle.mysql.r18.ru:/home/vva/work/BUG_1348/mysql-4.0

parents e05ea7b8 800f2f46
...@@ -1271,10 +1271,13 @@ static int init_dumping(char *database) ...@@ -1271,10 +1271,13 @@ static int init_dumping(char *database)
{ {
if (opt_databases || opt_alldbs) if (opt_databases || opt_alldbs)
{ {
/* length of table name * 2 (if name contain quotas), 2 quotas and 0 */
char quoted_database_buf[64*2+3];
char *qdatabase= quote_name(database,quoted_database_buf,opt_quoted);
fprintf(md_result_file,"\n--\n-- Current Database: %s\n--\n", database); fprintf(md_result_file,"\n--\n-- Current Database: %s\n--\n", database);
if (!opt_create_db) if (!opt_create_db)
fprintf(md_result_file,"\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ %s;\n", fprintf(md_result_file,"\nCREATE DATABASE /*!32312 IF NOT EXISTS*/ %s;\n",
database); qdatabase);
fprintf(md_result_file,"\nUSE %s;\n", database); fprintf(md_result_file,"\nUSE %s;\n", database);
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment