From 38fd186721416536b0d61b816920005c8ac5a1f7 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 27 Dec 2006 18:14:28 +0400 Subject: Bug#24747 XPath error with the node name "Text" mysql-test/r/xml.result: Adding test case mysql-test/t/xml.test: Adding test case sql/item_xmlfunc.cc: Bug#24747 XPath error with the node name "Text" Problem: keywords, nodetype names and axis names didn't work in node name context. Fix: 1. Changes in lexem scanner behaviour when an identifier has been read: - search through axis names and return MY_XPATH_AXIS_xxx only when identifier is followed by two semicolons. Don't check axis names and return MY_XPATH_IDENT of not followed by two semicolons. - search through nodetype names and return MY_XPATH_LEX_NODETYPE only when identifier is followed by left parenthesis. Don't check nodetype names and return MY_XPATH_LEX_IDENT when not followed by parenthesis 2. Change in syntax analizer: QName scanner now accepts keywords AND, OR, MOD, DIV as valid node names. --- mysql-test/r/xml.result | 75 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) (limited to 'mysql-test/r/xml.result') diff --git a/mysql-test/r/xml.result b/mysql-test/r/xml.result index bb7f84d0287..3991c97626a 100644 --- a/mysql-test/r/xml.result +++ b/mysql-test/r/xml.result @@ -809,3 +809,78 @@ ExtractValue(@xml, "/entry[(50test','/a/b/Text'); +ExtractValue('test','/a/b/Text') +test +select ExtractValue('test','/a/b/comment'); +ExtractValue('test','/a/b/comment') +test +select ExtractValue('test','/a/b/node'); +ExtractValue('test','/a/b/node') +test +select ExtractValue('test','/a/b/processing-instruction'); +ExtractValue('test','/a/b/processing-instruction') +test +select ExtractValue('test', '/a/and'); +ExtractValue('test', '/a/and') +test +select ExtractValue('test', '/a/or'); +ExtractValue('test', '/a/or') +test +select ExtractValue('test', '/a/mod'); +ExtractValue('test', '/a/mod') +test +select ExtractValue('
test
', '/a/div'); +ExtractValue('
test
', '/a/div') +test +select ExtractValue('test', '/a/and:and'); +ExtractValue('test', '/a/and:and') +test +select ExtractValue('test', '/a/or:or'); +ExtractValue('test', '/a/or:or') +test +select ExtractValue('test', '/a/mod:mod'); +ExtractValue('test', '/a/mod:mod') +test +select ExtractValue('test', '/a/div:div'); +ExtractValue('test', '/a/div:div') +test +select ExtractValue('test', '/a/ancestor'); +ExtractValue('test', '/a/ancestor') +test +select ExtractValue('test', '/a/ancestor-or-self'); +ExtractValue('test', '/a/ancestor-or-self') +test +select ExtractValue('test', '/a/attribute'); +ExtractValue('test', '/a/attribute') +test +select ExtractValue('test', '/a/child'); +ExtractValue('test', '/a/child') +test +select ExtractValue('test', '/a/descendant'); +ExtractValue('test', '/a/descendant') +test +select ExtractValue('test', '/a/descendant-or-self'); +ExtractValue('test', '/a/descendant-or-self') +test +select ExtractValue('test', '/a/following'); +ExtractValue('test', '/a/following') +test +select ExtractValue('test', '/a/following-sibling'); +ExtractValue('test', '/a/following-sibling') +test +select ExtractValue('test', '/a/namespace'); +ExtractValue('test', '/a/namespace') +test +select ExtractValue('test', '/a/parent'); +ExtractValue('test', '/a/parent') +test +select ExtractValue('test', '/a/preceding'); +ExtractValue('test', '/a/preceding') +test +select ExtractValue('test', '/a/preceding-sibling'); +ExtractValue('test', '/a/preceding-sibling') +test +select ExtractValue('test', '/a/self'); +ExtractValue('test', '/a/self') +test -- cgit v1.2.1