Commit b6b6d6a9 authored by unknown's avatar unknown

Fix for the bug #1125 mysqldump -X creates invalid XML

parent bbdb77fc
...@@ -1137,7 +1137,7 @@ static void dumpTable(uint numFields, char *table) ...@@ -1137,7 +1137,7 @@ static void dumpTable(uint numFields, char *table)
safe_exit(EX_CONSCHECK); safe_exit(EX_CONSCHECK);
return; return;
} }
if (extended_insert) if (extended_insert && !opt_xml)
{ {
ulong length = lengths[i]; ulong length = lengths[i];
if (i == 0) if (i == 0)
...@@ -1222,7 +1222,7 @@ static void dumpTable(uint numFields, char *table) ...@@ -1222,7 +1222,7 @@ static void dumpTable(uint numFields, char *table)
if (opt_xml) if (opt_xml)
fprintf(md_result_file, "\t</row>\n"); fprintf(md_result_file, "\t</row>\n");
if (extended_insert) if (extended_insert && !opt_xml)
{ {
ulong row_length; ulong row_length;
dynstr_append(&extended_row,")"); dynstr_append(&extended_row,")");
...@@ -1404,7 +1404,7 @@ static int init_dumping(char *database) ...@@ -1404,7 +1404,7 @@ static int init_dumping(char *database)
(opt_quoted ? "`" : "")); (opt_quoted ? "`" : ""));
} }
} }
if (extended_insert) if (extended_insert && !opt_xml)
if (init_dynamic_string(&extended_row, "", 1024, 1024)) if (init_dynamic_string(&extended_row, "", 1024, 1024))
exit(EX_EOM); exit(EX_EOM);
return 0; return 0;
...@@ -1676,7 +1676,7 @@ int main(int argc, char **argv) ...@@ -1676,7 +1676,7 @@ int main(int argc, char **argv)
if (md_result_file != stdout) if (md_result_file != stdout)
my_fclose(md_result_file, MYF(0)); my_fclose(md_result_file, MYF(0));
my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR)); my_free(opt_password, MYF(MY_ALLOW_ZERO_PTR));
if (extended_insert) if (extended_insert & !opt_xml)
dynstr_free(&extended_row); dynstr_free(&extended_row);
my_end(0); my_end(0);
return(first_error); return(first_error);
......
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