mirror of
https://github.com/MariaDB/server.git
synced 2025-01-17 20:42:30 +01:00
Bug#25946 Namespace not include for xsi usage within --xml output with null/nil values
Fix: adding namespace reference into "mysql --xml" output, to make it work similary to "mysqldump --xml".
This commit is contained in:
parent
f0a95a4e20
commit
5e52cd3650
2 changed files with 8 additions and 7 deletions
|
@ -2529,7 +2529,8 @@ print_table_data_xml(MYSQL_RES *result)
|
|||
|
||||
tee_fputs("<?xml version=\"1.0\"?>\n\n<resultset statement=\"", PAGER);
|
||||
xmlencode_print(glob_buffer.ptr(), (int)strlen(glob_buffer.ptr()));
|
||||
tee_fputs("\">", PAGER);
|
||||
tee_fputs("\" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\">",
|
||||
PAGER);
|
||||
|
||||
fields = mysql_fetch_fields(result);
|
||||
while ((cur = mysql_fetch_row(result)))
|
||||
|
|
|
@ -7,7 +7,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<resultset statement="select * from t1
|
||||
">
|
||||
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<row>
|
||||
<field name="a&b">1</field>
|
||||
<field name="a<b">2</field>
|
||||
|
@ -34,7 +34,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<resultset statement="select count(*) from t1
|
||||
">
|
||||
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<row>
|
||||
<field name="count(*)">1</field>
|
||||
</row>
|
||||
|
@ -42,7 +42,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<resultset statement="select 1 < 2 from dual
|
||||
">
|
||||
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<row>
|
||||
<field name="1 < 2">1</field>
|
||||
</row>
|
||||
|
@ -50,7 +50,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<resultset statement="select 1 > 2 from dual
|
||||
">
|
||||
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<row>
|
||||
<field name="1 > 2">0</field>
|
||||
</row>
|
||||
|
@ -58,7 +58,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<resultset statement="select 1 & 3 from dual
|
||||
">
|
||||
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<row>
|
||||
<field name="1 & 3">1</field>
|
||||
</row>
|
||||
|
@ -66,7 +66,7 @@ insert into t1 values (1, 2, 'a&b a<b a>b');
|
|||
<?xml version="1.0"?>
|
||||
|
||||
<resultset statement="select null from dual
|
||||
">
|
||||
" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<row>
|
||||
<field name="NULL" xsi:nil="true" />
|
||||
</row>
|
||||
|
|
Loading…
Reference in a new issue