Bug #27608 XML output is not well-formed
Submitted: 3 Apr 2007 9:40 Modified: 24 Apr 2007 3:01
Reporter: Ruvim Pinka Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: XML functions Severity:S3 (Non-critical)
Version:5.2.3-falcon-alpha, 4.1, 5.0, 5.1 OS:Linux (Linux)
Assigned to: Alexander Barkov CPU Architecture:Any
Tags: XML

[3 Apr 2007 9:40] Ruvim Pinka
Description:
1. Bug #25946 is not fixed in this version.
2. If a result set is empty, the output XML document is utterly blank while it must include at least one empty root element.

How to repeat:
mysql --database=test -X -B -e "select null as nnn limit 1"
mysql --database=test -X -B -e "select null as nnn limit 0"

Suggested fix:
In the second case an output must be like a following:
<resultset statement="select null as nnn limit 0"></resultset>
[3 Apr 2007 10:10] Sveta Smirnova
Thank you for the report.

Verified as desribed. All versions are affected.
[6 Apr 2007 6:06] 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/commits/23966
[9 Apr 2007 12:56] 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/commits/24050
[9 Apr 2007 13:06] Alexander Barkov
Pushed into 5.0.40-rpl
[9 Apr 2007 13:30] Alexander Barkov
Pushed into 5.1.18-rpl
[20 Apr 2007 17:16] Bugs System
Pushed into 5.0.42
[20 Apr 2007 17:16] Bugs System
Pushed into 5.1.18-beta
[24 Apr 2007 3:01] 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 bug fix. More information about accessing the source trees is available at

    http://dev.mysql.com/doc/en/installing-source.html

Documented bugfix in 5.0.24 and 5.1.18 changelogs.