Commit 9ed83bda authored by unknown's avatar unknown

Fixed quoting problem in mysqldump

parent 8f2f1597
...@@ -651,7 +651,7 @@ static uint getTableStructure(char *table, char* db) ...@@ -651,7 +651,7 @@ static uint getTableStructure(char *table, char* db)
/* Make an sql-file, if path was given iow. option -T was given */ /* Make an sql-file, if path was given iow. option -T was given */
char buff[20+FN_REFLEN]; char buff[20+FN_REFLEN];
sprintf(buff,"show create table `%s`",table_name); sprintf(buff,"show create table `%s`",table);
if (mysql_query(sock, buff)) if (mysql_query(sock, buff))
{ {
fprintf(stderr, "%s: Can't get CREATE TABLE for table '%s' (%s)\n", fprintf(stderr, "%s: Can't get CREATE TABLE for table '%s' (%s)\n",
...@@ -786,7 +786,7 @@ static uint getTableStructure(char *table, char* db) ...@@ -786,7 +786,7 @@ static uint getTableStructure(char *table, char* db)
{ {
if (opt_keywords) if (opt_keywords)
fprintf(sql_file, " %s.%s %s", table_name, fprintf(sql_file, " %s.%s %s", table_name,
quote_name(row[SHOW_FIELDNAME],name_buff), row[SHOW_TYPE]); quote_name(row[SHOW_FIELDNAME],name_buff), row[SHOW_TYPE]);
else else
fprintf(sql_file, " %s %s", quote_name(row[SHOW_FIELDNAME], fprintf(sql_file, " %s %s", quote_name(row[SHOW_FIELDNAME],
name_buff), row[SHOW_TYPE]); name_buff), row[SHOW_TYPE]);
......
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