[Libreoffice-commits] core.git: connectivity/source
Lionel Elie Mamane (via logerrit)
logerrit at kemper.freedesktop.org
Sat Mar 27 16:34:47 UTC 2021
connectivity/source/drivers/file/FStatement.cxx | 7 +++++++
1 file changed, 7 insertions(+)
New commits:
commit d0efd1e280c2b9759dce120dff64e8bac1ab19c1
Author: Lionel Elie Mamane <lionel at mamane.lu>
AuthorDate: Sat Mar 27 15:44:08 2021 +0100
Commit: Lionel Mamane <lionel at mamane.lu>
CommitDate: Sat Mar 27 17:34:13 2021 +0100
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
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/113207
Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>
Reviewed-by: Lionel Mamane <lionel at mamane.lu>
Tested-by: Jenkins
diff --git a/connectivity/source/drivers/file/FStatement.cxx b/connectivity/source/drivers/file/FStatement.cxx
index e04e4fbe5d1b..d181798b2f1e 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