[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-6.0' - connectivity/source
Tamas Bunth (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jun 3 16:45:45 UTC 2019
connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx | 11 ++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
New commits:
commit 1489620499d25a8f5188cc83f6a3558e9a1f9b61
Author: Tamas Bunth <tamas.bunth at collabora.co.uk>
AuthorDate: Thu May 30 18:34:03 2019 +0200
Commit: Andras Timar <andras.timar at collabora.com>
CommitDate: Mon Jun 3 18:44:38 2019 +0200
mysqlc: Add support for mysql type INT24
Which is mapped to sal_Int32.
Change-Id: Ibf12e92a20034440fa990ed0c6f1196f4ca3f40f
Reviewed-on: https://gerrit.libreoffice.org/73218
Reviewed-by: Andras Timar <andras.timar at collabora.com>
Tested-by: Andras Timar <andras.timar at collabora.com>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
index cc9348860d7a..7d261160bfae 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_prepared_resultset.cxx
@@ -31,6 +31,7 @@
#include <com/sun/star/sdbcx/CompareBookmark.hpp>
#include <cppuhelper/supportsservice.hxx>
#include <cppuhelper/typeprovider.hxx>
+#include <sal/log.hxx>
using namespace rtl;
#include <comphelper/string.hxx>
@@ -66,6 +67,7 @@ const std::type_index getTypeFromMysqlType(enum_field_types type)
case MYSQL_TYPE_SHORT:
return std::type_index(typeid(sal_Int16));
case MYSQL_TYPE_LONG:
+ case MYSQL_TYPE_INT24:
return std::type_index(typeid(sal_Int32));
case MYSQL_TYPE_LONGLONG:
return std::type_index(typeid(sal_Int64));
@@ -88,7 +90,6 @@ const std::type_index getTypeFromMysqlType(enum_field_types type)
case MYSQL_TYPE_BLOB:
case MYSQL_TYPE_YEAR:
case MYSQL_TYPE_BIT:
- case MYSQL_TYPE_INT24:
case MYSQL_TYPE_SET:
case MYSQL_TYPE_ENUM:
case MYSQL_TYPE_GEOMETRY:
@@ -269,6 +270,7 @@ ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 nColumnIndex)
case MYSQL_TYPE_SHORT:
return getShort(nColumnIndex);
case MYSQL_TYPE_LONG:
+ case MYSQL_TYPE_INT24:
return getInt(nColumnIndex);
case MYSQL_TYPE_LONGLONG:
return getLong(nColumnIndex);
@@ -288,9 +290,10 @@ ORowSetValue OPreparedResultSet::getRowSetValue(sal_Int32 nColumnIndex)
case MYSQL_TYPE_NEWDECIMAL:
return getString(nColumnIndex);
default:
- mysqlc_sdbc_driver::throwFeatureNotImplementedException(
- "OPreparedResultSet::getRowSetValue", *this);
- return ORowSetValue();
+ SAL_WARN("connectivity.mysqlc", "OPreparedResultSet::getRowSetValue: unknown type: "
+ << m_aFields[nColumnIndex - 1].type);
+ throw SQLException("Unknown column type when fetching result", *this, OUString(), 1,
+ Any());
}
}
More information about the Libreoffice-commits
mailing list