[Libreoffice-commits] core.git: Branch 'libreoffice-7-1' - connectivity/source
Lionel Elie Mamane (via logerrit)
logerrit at kemper.freedesktop.org
Tue Mar 30 09:29:53 UTC 2021
connectivity/source/drivers/file/FStatement.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit 3e0714839d3c8cecbe02dea80b372364f4712373
Author: Lionel Elie Mamane <lionel at mamane.lu>
AuthorDate: Sat Mar 27 15:44:08 2021 +0100
Commit: Michael Stahl <michael.stahl at allotropia.de>
CommitDate: Tue Mar 30 11:29:21 2021 +0200
tdf#141115 semi-userfriendly message on UNION query on file driver
Rather than silently returning only the first (left) part of the
UNION, error out.
Change-Id: I6ed1eba55ad33f149d9010933a3c7a835fce0451
(cherry picked from commit d0efd1e280c2b9759dce120dff64e8bac1ab19c1)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113216
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at allotropia.de>
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index 08c4f7fdd844..31d435b62aab 100644
--- a/connectivity/source/drivers/file/FStatement.cxx
+++ b/connectivity/source/drivers/file/FStatement.cxx
@@ -394,6 +394,13 @@ void OStatement_Base::construct(const OUString& sql)
case OSQLStatementType::Unknown:
m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX,*this);
break;
+ case OSQLStatementType::Select:
+ if(SQL_ISRULE(m_aSQLIterator.getParseTree(), union_statement))
+ {
+ m_pConnection->throwGenericSQLException(STR_QUERY_TOO_COMPLEX, *this);
+ }
+ assert(SQL_ISRULE(m_aSQLIterator.getParseTree(), select_statement));
+ break;
default:
break;
}
More information about the Libreoffice-commits
mailing list