Details
-
Bug
-
Status: Closed (View Workflow)
-
Major
-
Resolution: Fixed
-
10.0.22, 10.1.9, 10.0(EOL), 10.1(EOL)
-
None
-
I have reproduced the bug with 10.0.22 from official repository on debian Jessie ( 10.0.22-0+deb8u1) and 10.1.9 on Windows
-
10.2.0-9
Description
I have a stored procedure wich process an XML field to get some data. The first few times the procedure is executed it returns NULL or empty string, then it works fine. From HeidiSql, for example, it usually fails two times and then works right, and from ToadSql it fails about four times and then works everytime (the number of failures seems consistent, but could be luck).
The line that seems to be failing is a call to ExtractValue (here with some context):
DECLARE counter INT UNSIGNED DEFAULT 1;
WHILE (counter <= total_count) DO
SELECT ExtractValue(xml, '//service[$counter]/name') INTO service_name;
SET services = CONCAT(services, ',', service_name);
SET counter = counter + 1;
END WHILE;
Attachments
Issue Links
- relates to
-
MDEV-9123 Local variable TEXT has mangled data in stored procedure
- Closed