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/r/client_xml.result | |
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/r/client_xml.result')
-rw-r--r-- | mysql-test/r/client_xml.result | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/mysql-test/r/client_xml.result b/mysql-test/r/client_xml.result new file mode 100644 index 00000000000..b6cebab98e1 --- /dev/null +++ b/mysql-test/r/client_xml.result @@ -0,0 +1,75 @@ +create table t1 ( +`a&b` int, +`a<b` int, +`a>b` text +); +insert into t1 values (1, 2, 'a&b a<b a>b'); +<?xml version="1.0"?> + +<resultset statement="select * from t1 +"> + <row> + <field name="a&b">1</field> + <field name="a<b">2</field> + <field name="a>b">a&b a<b a>b</field> + </row> +</resultset> +<?xml version="1.0"?> +<mysqldump> +<database name="test"> + <table_structure name="t1"> + <field Field="a&b" Type="int(11)" Null="YES" Key="" Extra="" /> + <field Field="a<b" Type="int(11)" Null="YES" Key="" Extra="" /> + <field Field="a>b" Type="text" Null="YES" Key="" Extra="" /> + <options Name="t1" Engine="MyISAM" Version="9" Row_format="Dynamic" Rows="1" Avg_row_length="28" Data_length="28" Max_data_length="4294967295" Index_length="1024" Data_free="0" Create_time="2005-01-26 01:21:39" Update_time="2005-01-26 01:21:39" Collation="latin1_swedish_ci" Create_options="" Comment="" /> + </table_structure> + <table_data name="t1"> + <row> + <field name="a&b">1</field> + <field name="a<b">2</field> + <field name="a>b">a&b a<b a>b</field> + </row> + </table_data> +</database> +</mysqldump> +<?xml version="1.0"?> + +<resultset statement="select count(*) from t1 +"> + <row> + <field name="count(*)">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 < 2 from dual +"> + <row> + <field name="1 < 2">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 > 2 from dual +"> + <row> + <field name="1 > 2">0</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select 1 & 3 from dual +"> + <row> + <field name="1 & 3">1</field> + </row> +</resultset> +<?xml version="1.0"?> + +<resultset statement="select null from dual +"> + <row> + <field name="NULL">NULL</field> + </row> +</resultset> +drop table t1; |