summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenry Castro <hcastro@collabora.com>2023-08-30 10:25:51 -0400
committerAron Budea <aron.budea@collabora.com>2023-09-01 23:21:01 +0200
commit29aeafb25efcba6c3dab3b7842f383fcb0eab700 (patch)
tree2b61d57a481cc9f8c3c75b501c927d93bebf8a87
parentc22c356cc1b7c08313a46a8269f4f43eb76ecf75 (diff)
connectiviy: fix to detect column data typemimo-7.3.7.2.M6
if Base SQL query: SELECT COUNT("test"."id") from Test If changed to Spanish UI, detect the column type from a neutral context parser. Signed-off-by: Henry Castro <hcastro@collabora.com> Change-Id: I1faa8ff8417a0fc4996b289bd2ce0baad52fc00c Reviewed-on: https://gerrit.libreoffice.org/c/core/+/156298 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com> (cherry picked from commit 0d579a1b8122eed6348ee4a512573277e2d5db77)
-rw-r--r--connectivity/source/parse/sqliterator.cxx4
1 files changed, 4 insertions, 0 deletions
diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx
index 662a000870b7..c9733477b2bf 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -2108,7 +2108,11 @@ sal_Int32 OSQLParseTreeIterator::getFunctionReturnType(const OSQLParseNode* _pNo
nType = DataType::DOUBLE;
}
else
+ {
nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, &m_rParser.getContext() );
+ if (nType == DataType::SQLNULL)
+ nType = ::connectivity::OSQLParser::getFunctionReturnType( sFunctionName, m_rParser.getNeutral() );
+ }
}
return nType;