diff options
author | unknown <jimw@mysql.com> | 2005-01-25 14:25:40 -0800 |
---|---|---|
committer | unknown <jimw@mysql.com> | 2005-01-25 14:25:40 -0800 |
commit | d8f3934148a1a92458fc0f206c6b0a804f30a001 (patch) | |
tree | ba33c06d61ac622412dbe5d3d8e205bf91462352 /mysql-test/t/client_xml.test | |
parent | 4bb1c716e8f5d513f85b666a68ede0a112b12ca1 (diff) | |
download | mariadb-git-d8f3934148a1a92458fc0f206c6b0a804f30a001.tar.gz |
Change 'mysql' client to output XML like the 'mysqldump'
tool does, with the column names as attributes on <field>
elements, instead of trying to use the column name as the
element name. Also fix some encoding issues. (Bug #7811)
client/mysql.cc:
Quote > and " in XML output, and use <field name="XXX"></field>
instead of <XXX></XXX>, to make the output more like
mysqldump --xml and avoid having to turn XXX into a sensible
element name.
Diffstat (limited to 'mysql-test/t/client_xml.test')
-rw-r--r-- | mysql-test/t/client_xml.test | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/mysql-test/t/client_xml.test b/mysql-test/t/client_xml.test new file mode 100644 index 00000000000..3628a510557 --- /dev/null +++ b/mysql-test/t/client_xml.test @@ -0,0 +1,18 @@ +# 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 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' + +drop table t1; |