summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers/evoab2/NStatement.cxx
diff options
context:
space:
mode:
authorFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-16 13:55:24 +0200
committerFrank Schoenheit [fs] <frank.schoenheit@sun.com>2010-04-16 13:55:24 +0200
commit9157048fbcfeb07b19781fa48b834aef43fe8b70 (patch)
tree12752e5df5af0c63898a4942bdca88b9e49a2ec3 /connectivity/source/drivers/evoab2/NStatement.cxx
parentb90b03e6d52d9627a59724125ef705181f57caf8 (diff)
parent933751b26402df56c714b9584e6ae574c2a36241 (diff)
dba33f: merge with m76-branch
Diffstat (limited to 'connectivity/source/drivers/evoab2/NStatement.cxx')
-rw-r--r--connectivity/source/drivers/evoab2/NStatement.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/connectivity/source/drivers/evoab2/NStatement.cxx b/connectivity/source/drivers/evoab2/NStatement.cxx
index b0a92dc609..7dd3621e93 100644
--- a/connectivity/source/drivers/evoab2/NStatement.cxx
+++ b/connectivity/source/drivers/evoab2/NStatement.cxx
@@ -381,15 +381,16 @@ EBookQuery *OCommonStatement::whereAnalysis( const OSQLParseNode* parseTree )
// SQL like
else if( SQL_ISRULE( parseTree, like_predicate ) )
{
- ENSURE_OR_THROW( parseTree->count() >= 4, "unexpected like_predicate structure" );
+ ENSURE_OR_THROW( parseTree->count() == 2, "unexpected like_predicate structure" );
+ const OSQLParseNode* pPart2 = parseTree->getChild(1);
if( ! SQL_ISRULE( parseTree->getChild( 0 ), column_ref) )
m_pConnection->throwGenericSQLException(STR_QUERY_INVALID_LIKE_COLUMN,*this);
::rtl::OUString aColumnName( impl_getColumnRefColumnName_throw( *parseTree->getChild( 0 ) ) );
- OSQLParseNode *pAtom = parseTree->getChild( parseTree->count() - 2 ); // Match String
- bool bNotLike = parseTree->count() == 5;
+ OSQLParseNode *pAtom = pPart2->getChild( pPart2->count() - 2 ); // Match String
+ bool bNotLike = pPart2->getChild(0)->isToken();
if( !( pAtom->getNodeType() == SQL_NODE_STRING ||
pAtom->getNodeType() == SQL_NODE_NAME ||