Commits

Anonymous committed ce8a6dd

dba33f: #i107654# like corrected

Comments (0)

Files changed (2)

connectivity/source/parse/sqlbison.y

 				$$ = SQL_NEW_RULE;
 				$$->append(pColumnRef);
 				$$->append($1);
-				OSQLParseNode* p2nd = $1->getChild(2);
-				if ( !xxx_pGLOBAL_SQLPARSER->buildLikeRule($1,p2nd,$1->getChild(3)) )
+				OSQLParseNode* p2nd = $1->removeAt(2);
+				OSQLParseNode* p3rd = $1->removeAt(2);
+				if ( !xxx_pGLOBAL_SQLPARSER->buildLikeRule($1,p2nd,p3rd) )
 				{
 					delete $$;
 					YYABORT;
 				}
+				$1->append(p3rd);
 			}
 			else
 				YYERROR;
 				$$ = SQL_NEW_RULE;
 				$$->append(pColumnRef);
 				$$->append($1);
-				OSQLParseNode* p2nd = $1->getChild(2);
-				if ( !xxx_pGLOBAL_SQLPARSER->buildLikeRule($1,p2nd,$1->getChild(3)) )
+				OSQLParseNode* p2nd = $1->removeAt(2);
+				OSQLParseNode* p3rd = $1->removeAt(2);
+				if ( !xxx_pGLOBAL_SQLPARSER->buildLikeRule($1,p2nd,p3rd) )
 				{
 					delete $$;
 					YYABORT;
 				}
+				$1->append(p3rd);
 			}
 			else
 				YYERROR;

connectivity/source/parse/sqlnode.cxx

 		m_aChildren[0]->impl_parseNodeToString_throw( rString, aNewParam );
 
     const OSQLParseNode* pPart2 = m_aChildren[1];
+	pPart2->getChild(0)->impl_parseNodeToString_throw( rString, aNewParam );
 	pPart2->getChild(1)->impl_parseNodeToString_throw( rString, aNewParam );
-	if (SQL_ISTOKEN(pPart2->getChild(0), NOT))
-		pPart2->getChild(2)->impl_parseNodeToString_throw( rString, aNewParam );
-
-	sal_Int32 nCurentPos = pPart2->count() - 2;
-    pParaNode = pPart2->getChild(nCurentPos);
-	pEscNode  = pPart2->getChild(nCurentPos+1);
+    pParaNode = pPart2->getChild(2);
+	pEscNode  = pPart2->getChild(3);
 
 	if (pParaNode->isToken())
 	{