From 828de833bf3d981a28c94346121d99ef6efb30b4 Mon Sep 17 00:00:00 2001 From: unknown Date: Tue, 28 Feb 2006 13:59:16 +0400 Subject: Bug#16313 XML: extractvalue() ignores '!' in names xml.result, xml.test: Adding test case. item_xmlfunc.cc: Fixed that the "!" character written at the end was ignored. Now if we try to scan "!=", and if "!" is not followed by "=", we rollback lex scanner back to "!" token, so the parser will start to check the next rule from the "!" character again. Previously parser started from the next character, which was EOF in the example in xml.test, which led to query being successfully parsed, instead of producing a syntax error. sql/item_xmlfunc.cc: Bug#16313 XML: extractvalue() ignores '!' in names '!' at the end was ignored. Now if we try to scan "!=", and if "!" is not followed by "=", we rollback lex scanner back to "!" token, so the parser will start to check the next rule from the "!" character again. Previously it started from the next character, which was EOF in the example in xml.test, and which led to query being successfully parsed, instead of producing a syntax error. mysql-test/t/xml.test: Adding test case. mysql-test/r/xml.result: Adding test case. --- mysql-test/t/xml.test | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'mysql-test/t/xml.test') diff --git a/mysql-test/t/xml.test b/mysql-test/t/xml.test index 0e24692f0fa..e69ab5ee58b 100644 --- a/mysql-test/t/xml.test +++ b/mysql-test/t/xml.test @@ -237,3 +237,9 @@ select extractvalue('aB','a|/b'); # --error 1105 select extractvalue('A','/'); + +# +# Bug#16313 XML: extractvalue() ignores '!' in names +# +--error 1105 +select extractvalue('bb!','//b!'); -- cgit v1.2.1