User: rt      
Date: 2008-01-30 08:04:43+0000
Modified:
   dba/connectivity/source/parse/sqlnode.cxx

Log:
 INTEGRATION: CWS dba24d (1.49.2); FILE MERGED
 2007/12/01 13:37:01 fs 1.49.2.2: RESYNC: (1.49-1.50); FILE MERGED
 2007/11/26 07:29:01 oj 1.49.2.1: #i83810# normalize nodes

File Changes:

Directory: /dba/connectivity/source/parse/
==========================================

File [changed]: sqlnode.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/connectivity/source/parse/sqlnode.cxx?r1=1.51&r2=1.52
Delta lines:  +17 -19
---------------------
--- sqlnode.cxx 2008-01-29 08:38:43+0000        1.51
+++ sqlnode.cxx 2008-01-30 08:04:40+0000        1.52
@@ -1938,7 +1938,7 @@
         disjunctiveNormalForm(pRight);
 
         OSQLParseNode* pNewNode = NULL;
-        // '(' search_condition ')'
+        // '(' search_condition ')' on left side
         if(pLeft->count() == 3 && SQL_ISRULE(pLeft,boolean_primary) && 
SQL_ISRULE(pLeft->getChild(1),search_condition))
         {
             // and-or tree  on left side
@@ -1958,10 +1958,9 @@
             disjunctiveNormalForm(pSearchCondition);
         }
         else if(pRight->count() == 3 && SQL_ISRULE(pRight,boolean_primary) && 
SQL_ISRULE(pRight->getChild(1),search_condition))
-        {
+        {   // '(' search_condition ')' on right side
             // and-or tree  on right side
-            if ( pRight->getChild(1)->getByRule(OSQLParseNode::boolean_term) )
-            {
+            // a and (b or c)
                 OSQLParseNode* pOr = pRight->getChild(1);
                 OSQLParseNode* pNewLeft = NULL;
                 OSQLParseNode* pNewRight = NULL;
@@ -1977,7 +1976,6 @@
                 replaceAndReset(pSearchCondition,pNewNode);
                 disjunctiveNormalForm(pSearchCondition);
             }
-        }
         else if(SQL_ISRULE(pLeft,boolean_primary) && 
(!SQL_ISRULE(pLeft->getChild(1),search_condition) || 
!SQL_ISRULE(pLeft->getChild(1),boolean_term)))
             pSearchCondition->replace(pLeft, pLeft->removeAt(1));
         else if(SQL_ISRULE(pRight,boolean_primary) && 
(!SQL_ISRULE(pRight->getChild(1),search_condition) || 
!SQL_ISRULE(pRight->getChild(1),boolean_term)))




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to