diff options
Diffstat (limited to 'client/mysql.cc')
-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 { |