diff options
author | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-02-03 16:12:50 +0100 |
---|---|---|
committer | Norbert Thiebaud <nthiebaud@gmail.com> | 2015-02-03 16:13:27 +0100 |
commit | 90c3e6905daefad3d57c14090cd30a0d280ec989 (patch) | |
tree | ad2c45717c05579989e5d886095799acdbcb4b6f /connectivity | |
parent | f5d305a605b9c8f8d22eebce7c5556ed9e134025 (diff) |
tdf#89048 Macab initialize record list even for never-match condition.
Change-Id: I323f6532d00f30cde50616e9399cad6bbe00cb8c
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/source/drivers/macab/MacabResultSet.cxx | 5 | ||||
-rw-r--r-- | connectivity/source/drivers/macab/MacabStatement.cxx | 2 |
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 2de3f3f74c25..654b029f473f 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; |