summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--connectivity/source/drivers/macab/MacabResultSet.cxx5
-rw-r--r--connectivity/source/drivers/macab/MacabStatement.cxx2
2 files changed, 6 insertions, 1 deletions
diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx
index 35a8717254f2..73dd60d57c0a 100644
--- a/connectivity/source/drivers/macab/MacabResultSet.cxx
+++ b/connectivity/source/drivers/macab/MacabResultSet.cxx
@@ -86,6 +86,11 @@ void MacabResultSet::someMacabRecords(const MacabCondition *pCondition)
// maximum alloted size, which means that we'll never have to resize)
m_aMacabRecords = new MacabRecords(allRecords);
+ if(pCondition->isAlwaysFalse())
+ {
+ return;
+ }
+
MacabRecords::iterator iterator;
for (iterator = allRecords->begin();
diff --git a/connectivity/source/drivers/macab/MacabStatement.cxx b/connectivity/source/drivers/macab/MacabStatement.cxx
index 954252fb8b3e..78015335f954 100644
--- a/connectivity/source/drivers/macab/MacabStatement.cxx
+++ b/connectivity/source/drivers/macab/MacabStatement.cxx
@@ -329,7 +329,7 @@ void MacabCommonStatement::selectRecords(MacabResultSet *pResult) const throw(SQ
MacabCondition *pCondition = analyseWhereClause(pParseNode);
if (pCondition->isAlwaysTrue())
pResult->allMacabRecords();
- else if (!pCondition->isAlwaysFalse())
+ else
pResult->someMacabRecords(pCondition);
delete pCondition;
return;