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-02 02:09:09 +0200
commit17186d0da18c54b4ad9aea05a2643fb95a125a4f (patch)
tree9bdc04f2e1a6f8f53daefe7e908ea79716301323
parent06e4d7d2ad6b9343603f33d740bf3b30432dc483 (diff)
connectiviy: fix to detect column data type
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) (cherry picked from commit 29aeafb25efcba6c3dab3b7842f383fcb0eab700)
-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 94df96d39628..7478300c4e3f 100644
--- a/connectivity/source/parse/sqliterator.cxx
+++ b/connectivity/source/parse/sqliterator.cxx
@@ -2101,7 +2101,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;