Description:
The namespace is not included along with the new xsi usage within the --xml formatted output of the mysql command line client (and mysqldump as well). This breaks compatilibity for various tools that use things such as the SAXParser. For instance the new format of something like SHOW SLAVE STATUS:
<resultset statement="SHOW SLAVE STATUS">
<row>
<field name="Slave_IO_State"></field>
<field name="Master_Host">somehost.com</field>
<field name="Master_User">slave</field>
<field name="Master_Port">3306</field>
<field name="Connect_Retry">30</field>
<field name="Master_Log_File">log-bin.000001</field>
<field name="Read_Master_Log_Pos">1056</field>
<field name="Relay_Log_File">log-relay.000002</field>
<field name="Relay_Log_Pos">254</field>
<field name="Relay_Master_Log_File">log-bin.000001</field>
<field name="Slave_IO_Running">No</field>
<field name="Slave_SQL_Running">No</field>
<field name="Replicate_Do_DB"></field>
<field name="Replicate_Ignore_DB"></field>
<field name="Replicate_Do_Table"></field>
<field name="Replicate_Ignore_Table"></field>
<field name="Replicate_Wild_Do_Table"></field>
<field name="Replicate_Wild_Ignore_Table"></field>
<field name="Last_Errno">137</field>
<field name="Last_Error"></field>
<field name="Skip_Counter">0</field>
<field name="Exec_Master_Log_Pos">420</field>
<field name="Relay_Log_Space">1966</field>
<field name="Until_Condition">None</field>
<field name="Until_Log_File"></field>
<field name="Until_Log_Pos">0</field>
<field name="Master_SSL_Allowed">No</field>
<field name="Master_SSL_CA_File"></field>
<field name="Master_SSL_CA_Path"></field>
<field name="Master_SSL_Cert"></field>
<field name="Master_SSL_Cipher"></field>
<field name="Master_SSL_Key"></field>
<field name="Seconds_Behind_Master" xsi:nil="true" />
</row>
</resultset>
Now breaks parsers with errors such as:
"The prefix "xsi" for attribute "xsi:nil" associated with an element type "field" is not bound."
How to repeat:
No test case immediately available, easy to see where the issue is.
Suggested fix:
Provide the correct namespace within the XML output, such as:
<resultset statement="SHOW SLAVE STATUS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" >
<row>
<field name="Slave_IO_State"></field>
<field name="Master_Host">somehost.com</field>
<field name="Master_User">slave</field>
<field name="Master_Port">3306</field>
<field name="Connect_Retry">30</field>
<field name="Master_Log_File">log-bin.000001</field>
<field name="Read_Master_Log_Pos">1056</field>
<field name="Relay_Log_File">log-relay.000002</field>
<field name="Relay_Log_Pos">254</field>
<field name="Relay_Master_Log_File">log-bin.000001</field>
<field name="Slave_IO_Running">No</field>
<field name="Slave_SQL_Running">No</field>
<field name="Replicate_Do_DB"></field>
<field name="Replicate_Ignore_DB"></field>
<field name="Replicate_Do_Table"></field>
<field name="Replicate_Ignore_Table"></field>
<field name="Replicate_Wild_Do_Table"></field>
<field name="Replicate_Wild_Ignore_Table"></field>
<field name="Last_Errno">137</field>
<field name="Last_Error"></field>
<field name="Skip_Counter">0</field>
<field name="Exec_Master_Log_Pos">420</field>
<field name="Relay_Log_Space">1966</field>
<field name="Until_Condition">None</field>
<field name="Until_Log_File"></field>
<field name="Until_Log_Pos">0</field>
<field name="Master_SSL_Allowed">No</field>
<field name="Master_SSL_CA_File"></field>
<field name="Master_SSL_CA_Path"></field>
<field name="Master_SSL_Cert"></field>
<field name="Master_SSL_Cipher"></field>
<field name="Master_SSL_Key"></field>
<field name="Seconds_Behind_Master" xsi:nil="true" />
</row>
</resultset>