diff options
author | bar@mysql.com <> | 2007-04-09 17:53:10 +0500 |
---|---|---|
committer | bar@mysql.com <> | 2007-04-09 17:53:10 +0500 |
commit | 9faaec9e1ba52e338a900fcd599ba52ad66b0c81 (patch) | |
tree | 8c65ae4e849cc30cb02aeb1d9c439bd31470df97 /client | |
parent | cec17aa0ba1ff3252efaadc0e52ee3a90eba37cd (diff) | |
download | mariadb-git-9faaec9e1ba52e338a900fcd599ba52ad66b0c81.tar.gz |
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.
Diffstat (limited to 'client')
-rw-r--r-- | client/mysql.cc | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/client/mysql.cc b/client/mysql.cc index 510420fdf3d..6b37bb7b6f5 100644 --- a/client/mysql.cc +++ b/client/mysql.cc @@ -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 { |