connectivity/source/drivers/file/FStatement.cxx | 7 +++++++ 1 file changed, 7 insertions(+)
New commits: commit d0efd1e280c2b9759dce120dff64e8bac1ab19c1 Author: Lionel Elie Mamane <lio...@mamane.lu> AuthorDate: Sat Mar 27 15:44:08 2021 +0100 Commit: Lionel Mamane <lio...@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 <serval2...@yahoo.fr> Reviewed-by: Lionel Mamane <lio...@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; } _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits