1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

bug#27608 XML output is not well-formed

Problem: output was empty if the result is empty.
Fix: print XML header and footer, even if the result
is empty, to produce well-formed XML output.
This commit is contained in:
bar@mysql.com
2007-04-09 17:53:10 +05:00
parent cec17aa0ba
commit 9faaec9e1b
5 changed files with 100 additions and 0 deletions

View File

@@ -2117,6 +2117,17 @@ com_go(String *buffer,char *line __attribute__((unused)))
if (!mysql_num_rows(result) && ! quick && !info_flag)
{
strmov(buff, "Empty set");
if (opt_xml)
{
/*
We must print XML header and footer
to produce a well-formed XML even if
the result set is empty (Bug#27608).
*/
init_pager();
print_table_data_xml(result);
end_pager();
}
}
else
{