mariadb/mysql-test/t/client_xml.test
unknown 33ac50f076 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.


client/mysql.cc:
  Print header and footer even on empty set, when --xml
mysql-test/r/client_xml.result:
  Adding test case
mysql-test/t/client_xml.test:
  Adding test case
2007-04-09 17:53:10 +05:00

23 lines
773 B
Text

# Can't run with embedded server
-- source include/not_embedded.inc
# Test of the xml output of the 'mysql' and 'mysqldump' clients -- makes
# sure that basic encoding issues are handled properly
create table t1 (
`a&b` int,
`a<b` int,
`a>b` text
);
insert into t1 values (1, 2, 'a&b a<b a>b');
--exec $MYSQL --xml test -e "select * from t1"
--exec $MYSQL_DUMP --xml --skip-create test
--exec $MYSQL --xml test -e "select count(*) from t1"
--exec $MYSQL --xml test -e "select 1 < 2 from dual"
--exec $MYSQL --xml test -e "select 1 > 2 from dual"
--exec $MYSQL --xml test -e "select 1 & 3 from dual"
--exec $MYSQL --xml test -e "select null from dual"
--exec $MYSQL --xml test -e "select 1 limit 0"
--exec $MYSQL --xml test -vv -e "select 1 limit 0"
drop table t1;