diff options
author | Rüdiger Timm <rt@openoffice.org> | 2008-06-06 12:22:45 +0000 |
---|---|---|
committer | Rüdiger Timm <rt@openoffice.org> | 2008-06-06 12:22:45 +0000 |
commit | 76f9d397c93569c2947a0cbc8fcd3349ebede5a1 (patch) | |
tree | 0d973572c9628d6fc4c993bad4607b0cb4fd46f3 /connectivity | |
parent | 96a73ad78830a4ec6a1ce49a00fdccaffa0bea66 (diff) |
INTEGRATION: CWS dba30c (1.29.10); FILE MERGED
2008/05/06 10:32:28 oj 1.29.10.1: #i75557# accept functions where column name may be used
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/file/fcomp.cxx | 33 |
1 files changed, 3 insertions, 30 deletions
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 39a0b26186ff..fecb7f3e2b12 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -7,7 +7,7 @@ * OpenOffice.org - a multi-platform office productivity suite * * $RCSfile: fcomp.cxx,v $ - * $Revision: 1.29 $ + * $Revision: 1.30 $ * * This file is part of OpenOffice.org. * @@ -325,24 +325,15 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( { DBG_ASSERT(pPredicateNode->count() >= 4,"OFILECursor: Fehler im Parse Tree"); - if (!SQL_ISRULE(pPredicateNode->getChild(0),column_ref)) - { - ::dbtools::throwGenericSQLException(::rtl::OUString::createFromAscii("Invalid Statement"),NULL); - return NULL; - } - sal_Int32 ePredicateType; - OSQLParseNode *pAtom; - OSQLParseNode *pOptEscape; sal_Unicode cEscape = L'\0'; - if (pPredicateNode->count() == 5) ePredicateType = SQLFilterOperator::NOT_LIKE; else ePredicateType = SQLFilterOperator::LIKE; - pAtom = pPredicateNode->getChild(pPredicateNode->count()-2); - pOptEscape = pPredicateNode->getChild(pPredicateNode->count()-1); + OSQLParseNode* pAtom = pPredicateNode->getChild(pPredicateNode->count()-2); + OSQLParseNode* pOptEscape = pPredicateNode->getChild(pPredicateNode->count()-1); if (!(pAtom->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(pAtom,parameter))) { @@ -381,12 +372,6 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr { DBG_ASSERT(pPredicateNode->count() == 6,"OFILECursor: Fehler im Parse Tree"); - if (!SQL_ISRULE(pPredicateNode->getChild(0),column_ref)) - { - ::dbtools::throwGenericSQLException(::rtl::OUString::createFromAscii("Invalid Statement"),NULL); - return NULL; - } - OSQLParseNode* pColumn = pPredicateNode->getChild(0); OSQLParseNode* p1stValue = pPredicateNode->getChild(3); OSQLParseNode* p2ndtValue = pPredicateNode->getChild(5); @@ -465,12 +450,6 @@ OOperand* OPredicateCompiler::execute_BETWEEN(OSQLParseNode* pPredicateNode) thr //------------------------------------------------------------------ OOperand* OPredicateCompiler::execute_ISNULL(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { - if (!SQL_ISRULE(pPredicateNode->getChild(0),column_ref)) - { - ::dbtools::throwGenericSQLException(::rtl::OUString::createFromAscii("Invalid Statement"),NULL); - return NULL; - } - DBG_ASSERT(pPredicateNode->count() >= 3,"OFILECursor: Fehler im Parse Tree"); DBG_ASSERT(SQL_ISTOKEN(pPredicateNode->getChild(1),IS),"OFILECursor: Fehler im Parse Tree") @@ -665,12 +644,6 @@ void OPredicateInterpreter::evaluateSelection(OCodeList& rCodeList,ORowSetValueD // ----------------------------------------------------------------------------- OOperand* OPredicateCompiler::execute_Fold(OSQLParseNode* pPredicateNode) throw(SQLException, RuntimeException) { - /*if (!SQL_ISRULE(pPredicateNode->getChild(0),column_ref)) - { - ::dbtools::throwGenericSQLException(::rtl::OUString::createFromAscii("Invalid Statement"),NULL); - return NULL; - }*/ - DBG_ASSERT(pPredicateNode->count() >= 4,"OFILECursor: Fehler im Parse Tree"); sal_Bool bUpper = SQL_ISTOKEN(pPredicateNode->getChild(0),UPPER); |