[Libreoffice-commits] core.git: connectivity/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Mon Aug 27 14:49:10 UTC 2018
connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
New commits:
commit ff74bd33e5e3ef7514bb405e353acca25399f20f
Author: Caolán McNamara <caolanm at redhat.com>
AuthorDate: Mon Aug 27 11:55:05 2018 +0100
Commit: Caolán McNamara <caolanm at redhat.com>
CommitDate: Mon Aug 27 16:48:41 2018 +0200
coverity#1438783 Unchecked return value
Change-Id: Ice56d317087dd24d2eef27f2ace5fdf9f4da946d
Reviewed-on: https://gerrit.libreoffice.org/59654
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm at redhat.com>
Tested-by: Caolán McNamara <caolanm at redhat.com>
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx b/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
index 742b3c4f26f5..106ad775e7e5 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_resultsetmetadata.cxx
@@ -63,7 +63,9 @@ sal_Bool SAL_CALL OResultSetMetaData::isCaseSensitive(sal_Int32 column)
Reference<XResultSet> rs = stmt->executeQuery(sql.makeStringAndClear());
Reference<XRow> xRow(rs, UNO_QUERY_THROW);
- rs->next(); // fetch first and only row
+ if (!rs->next()) // fetch first and only row
+ return false;
+
rtl::OUString sColName = xRow->getString(1); // first column is Collation name
return !sColName.isEmpty() && !sColName.endsWith("_ci");
More information about the Libreoffice-commits
mailing list