connectivity/source/drivers/macab/MacabResultSet.cxx | 5 +++++ connectivity/source/drivers/macab/MacabStatement.cxx | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-)
New commits: commit 35892dfbbc1779306e11d2ea87c5aaead43356d2 Author: Norbert Thiebaud <nthieb...@gmail.com> Date: Tue Feb 3 16:12:50 2015 +0100 tdf#89048 Macab initialize record list even for never-match condition. Change-Id: I323f6532d00f30cde50616e9399cad6bbe00cb8c Reviewed-on: https://gerrit.libreoffice.org/14309 Reviewed-by: Lionel Elie Mamane <lio...@mamane.lu> Tested-by: Lionel Elie Mamane <lio...@mamane.lu> diff --git a/connectivity/source/drivers/macab/MacabResultSet.cxx b/connectivity/source/drivers/macab/MacabResultSet.cxx index 35a8717..73dd60d 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 954252f..7801533 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; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits