Bug #79988 | ExtractValue return NULL instead empty string when do not find a XML path | ||
---|---|---|---|
Submitted: | 14 Jan 2016 15:38 | Modified: | 29 Jan 2016 18:46 |
Reporter: | Roni Gonzalez | Email Updates: | |
Status: | Closed | Impact on me: | |
Category: | MySQL Server: DML | Severity: | S1 (Critical) |
Version: | 5.6, 5.6.28 | OS: | Ubuntu (12.04 LTS) |
Assigned to: | CPU Architecture: | Any | |
Tags: | ExtractValue, mysql 5.6 |
[14 Jan 2016 15:38]
Roni Gonzalez
[15 Jan 2016 6:33]
MySQL Verification Team
Hello Roni Gonzalez, Thank you for the report and test case. Observed that 5.6.28 is affected. Thanks, Umesh
[15 Jan 2016 6:34]
MySQL Verification Team
-- 5.5/5.7 latest builds not affected -- 5.5.48 [umshastr@hod03]/export/umesh/server/binaries/mysql-5.5.48: bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.5.48 MySQL Community Server (GPL) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> drop database test; Query OK, 0 rows affected (0.00 sec) mysql> set @x = '<MESSAGE><DATA1>HOLA</DATA1></MESSAGE>'; Query OK, 0 rows affected (0.00 sec) mysql> set @y = 'Default Value'; Query OK, 0 rows affected (0.00 sec) mysql> select ExtractValue( @x, '/MESSAGE/DATA2' ) into @y; Query OK, 1 row affected (0.00 sec) mysql> select concat( 'test ' , @y ); +------------------------+ | concat( 'test ' , @y ) | +------------------------+ | test | +------------------------+ 1 row in set (0.00 sec) mysql> -- 5.6.28 [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.6.28: bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 1 Server version: 5.6.28-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> set @x = '<MESSAGE><DATA1>HOLA</DATA1></MESSAGE>'; Query OK, 0 rows affected (0.00 sec) mysql> set @y = 'Default Value'; Query OK, 0 rows affected (0.00 sec) mysql> select ExtractValue( @x, '/MESSAGE/DATA2' ) into @y; Query OK, 1 row affected (0.00 sec) mysql> select concat( 'test ' , @y ); +------------------------+ | concat( 'test ' , @y ) | +------------------------+ | NULL | +------------------------+ 1 row in set (0.00 sec) mysql> -- 5.7.10 [umshastr@hod03]/export/umesh/server/binaries/mysql-advanced-5.7.10: bin/mysql -uroot -S /tmp/mysql_ushastry.sock Welcome to the MySQL monitor. Commands end with ; or \g. Your MySQL connection id is 2 Server version: 5.7.10-enterprise-commercial-advanced MySQL Enterprise Server - Advanced Edition (Commercial) Copyright (c) 2000, 2015, Oracle and/or its affiliates. All rights reserved. Oracle is a registered trademark of Oracle Corporation and/or its affiliates. Other names may be trademarks of their respective owners. Type 'help;' or '\h' for help. Type '\c' to clear the current input statement. mysql> set @x = '<MESSAGE><DATA1>HOLA</DATA1></MESSAGE>'; Query OK, 0 rows affected (0.00 sec) mysql> set @y = 'Default Value'; Query OK, 0 rows affected (0.00 sec) mysql> select ExtractValue( @x, '/MESSAGE/DATA2' ) into @y; Query OK, 1 row affected (0.00 sec) mysql> select concat( 'test ' , @y ); +------------------------+ | concat( 'test ' , @y ) | +------------------------+ | test | +------------------------+ 1 row in set (0.00 sec) mysql>
[15 Jan 2016 8:55]
Tor Didriksen
Posted by developer: This is a duplicate of internal bug Bug #13358486 WEIGHT_STRING = MY_STRNXFRM_UNICODE: ASSERTION `SRC' FAILED. Which was fixed in mysql 5.7.6
[15 Jan 2016 10:14]
Roni Gonzalez
A fix will be provided for versión 5.6 ?
[28 Jan 2016 15:13]
Tor Didriksen
Posted by developer: commit c1cc22e38ee7b24bfd0856bb3a09de286d2ebf56 Author: Tor Didriksen <tor.didriksen@oracle.com> Date: Mon Jan 18 15:11:41 2016 +0100 Bug#22552615 EXTRACTVALUE RETURNS NULL WHEN NO MATCHING TEXT NODE IS FOUND FOR THE EXPRESSION This is a backport of the patch for Bug #13358486 WEIGHT_STRING = MY_STRNXFRM_UNICODE: ASSERTION `SRC' FAILED.
[29 Jan 2016 18:46]
Paul DuBois
Noted in 5.6.30 changelog. Certain queries could raise an assertion when a internal string operation produced a NULL pointer rather than an empty string.