Bug #9657 mysqldump xml ( -x ) does not format NULL fields correctly
Submitted: 5 Apr 2005 18:18 Modified: 10 Jul 2005 16:23
Reporter: Douglas Flanzer Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: XML functions Severity:S3 (Non-critical)
Version:4.1.7 OS:Linux (Linux ES 4.0)
Assigned to: Magnus Blåudd CPU Architecture:Any

[5 Apr 2005 18:18] Douglas Flanzer
Description:
Hello, mysqldump --xml does not seem to tag NULL fields correctly. This is for mysqldump version 10.8 with distribution 4.1.7 over Linux.

NULL rows are written out without any surrounding field-name tags.

How to repeat:

+------------

mysql> create table mytable (a int(10));
Query OK, 0 rows affected (0.00 sec)

mysql> insert into mytable values (NULL);
Query OK, 1 row affected (0.00 sec)

mysql> select * from mytable;
+------+
| a      |
+------+
| NULL |
+------+
1 row in set (0.00 sec)

+------------------

[dflanzer@devws70 multistock]$ mysqldump -u root -pxxx --xml --no-create-info testing_acme_data mytable
<?xml version="1.0"?>
<mysqldump>
<database name="testing_acme_data">
        <table_data name="mytable">
        <row>
NULL    </row>
        </table_data>
</database>
</mysqldump>

Suggested fix:
NULL rows should be handled the same as rows without nulls. XML should be well-formed.
[5 Apr 2005 18:19] Douglas Flanzer
Changed severity to S3.
[14 Jun 2005 9:28] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/25968
[20 Jun 2005 10:47] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/26186
[22 Jun 2005 17:53] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/26329
[22 Jun 2005 18:23] Bugs System
A patch for this bug has been committed. After review, it may
be pushed to the relevant source trees for release in the next
version. You can access the patch from:

  http://lists.mysql.com/internals/26333
[27 Jun 2005 10:52] Magnus Blåudd
Pushed to 4.1.13 and 5.0.9
[10 Jul 2005 16:23] Jon Stephens
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Documented bugfix in 4.1.13 and 5.0.9 change history; closed.