Bug #16242 XML: crash if Xpath expression has '='
Submitted: 6 Jan 2006 1:25 Modified: 15 Mar 2006 15:09
Reporter: Peter Gulutzan Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: XML functions Severity:S3 (Non-critical)
Version:5.1.5-alpha-debug OS:Linux (SUSE 10.0)
Assigned to: Sergei Glukhov CPU Architecture:Any

[6 Jan 2006 1:25] Peter Gulutzan
Description:
I have an XML document. I search it with ExtractValue().
If the XPath part of ExtractValue() has an '=' operator, crash.

How to repeat:
mysql> set @xml = "<a><b><c>1</c></b></a>";
Query OK, 0 rows affected (0.05 sec)

mysql> select extractvalue(@xml,'a/b/c="1"');
ERROR 2013 (HY000): Lost connection to MySQL server during query
[6 Jan 2006 9:51] MySQL Verification Team
miguel@hegel:~/dbs/5.1> bin/mysql -uroot test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 1 to server version: 5.1.5-alpha-debug

Type 'help;' or '\h' for help. Type '\c' to clear the buffer.

mysql> set @xml = "<a><b><c>1</c></b></a>";
Query OK, 0 rows affected (0.00 sec)

mysql> select extractvalue(@xml,'a/b/c="1"');
ERROR 2013 (HY000): Lost connection to MySQL server during query
mysql>
[6 Mar 2006 12:06] Sergei Glukhov
Fixed by Bar(fix for Bug #16234	XML: Crash if ExtractValue() )
Changeset:
http://lists.mysql.com/commits/2430
[15 Mar 2006 15:09] Jon Stephens
Thank you for your bug report. This issue has already been fixed
in the latest released version of that product, which you can download at 
http://www.mysql.com/downloads/

Additional info:

Documented bugfix in 5.1.7 changelog. Closed.