diff options
author | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-03-16 13:25:41 +0100 |
---|---|---|
committer | Ocke Janssen [oj] <Ocke.Janssen@oracle.com> | 2011-03-16 13:25:41 +0100 |
commit | 1705149aa69a9e38313986bd7bef2ac565b35af9 (patch) | |
tree | 7fb7ced810e39cef8f5e9fdf524629a04f0adfea | |
parent | 975cb5d465b09d9f6d5bedfdb594a3ee7f5deab9 (diff) |
dba34d: #i32633# fix for lcase and ucase
-rw-r--r-- | connectivity/source/drivers/file/fcomp.cxx | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/connectivity/source/drivers/file/fcomp.cxx b/connectivity/source/drivers/file/fcomp.cxx index 9a303d1f1d27..28cdb41931d6 100644 --- a/connectivity/source/drivers/file/fcomp.cxx +++ b/connectivity/source/drivers/file/fcomp.cxx @@ -297,10 +297,19 @@ OOperand* OPredicateCompiler::execute_LIKE(OSQLParseNode* pPredicateNode) throw( OSQLParseNode* pAtom = pPart2->getChild(pPart2->count()-2); OSQLParseNode* pOptEscape = pPart2->getChild(pPart2->count()-1); - if (!(pAtom->getNodeType() == SQL_NODE_STRING || SQL_ISRULE(pAtom,parameter))) + if (!(pAtom->getNodeType() == SQL_NODE_STRING || + SQL_ISRULE(pAtom,parameter) || + // odbc date + SQL_ISRULE(pAtom,set_fct_spec) || + SQL_ISRULE(pAtom,position_exp) || + SQL_ISRULE(pAtom,char_substring_fct) || + // upper, lower etc. + SQL_ISRULE(pAtom,fold)) ) { - m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_INVALID_LIKE_STRING,NULL); + m_pAnalyzer->getConnection()->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,NULL); + return NULL; } + if (pOptEscape->count() != 0) { if (pOptEscape->count() != 2) |