summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_statement.cxx7
-rw-r--r--connectivity/source/drivers/mysqlc/mysqlc_statement.hxx1
2 files changed, 3 insertions, 5 deletions
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
index 6b35b236361f..2301d040511b 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.cxx
@@ -57,7 +57,6 @@ void OCommonStatement::closeResultSet()
css::uno::Reference<css::sdbc::XCloseable> xClose(m_xResultSet, UNO_QUERY_THROW);
xClose->close();
m_xResultSet.clear();
- m_pMysqlResult = nullptr; // it is freed by XResultSet
}
}
@@ -155,15 +154,15 @@ Reference<XResultSet> SAL_CALL OCommonStatement::executeQuery(const OUString& sq
mysql_errno(pMySql), *this,
m_xConnection->getConnectionEncoding());
- m_pMysqlResult = mysql_store_result(pMySql);
- if (m_pMysqlResult == nullptr)
+ MYSQL_RES* pMysqlResult = mysql_store_result(pMySql);
+ if (pMysqlResult == nullptr)
{
mysqlc_sdbc_driver::throwSQLExceptionWithMsg(mysql_error(pMySql), mysql_sqlstate(pMySql),
mysql_errno(pMySql), *this,
m_xConnection->getConnectionEncoding());
}
- m_xResultSet = new OResultSet(*getOwnConnection(), this, m_pMysqlResult,
+ m_xResultSet = new OResultSet(*getOwnConnection(), this, pMysqlResult,
m_xConnection->getConnectionEncoding());
return m_xResultSet;
}
diff --git a/connectivity/source/drivers/mysqlc/mysqlc_statement.hxx b/connectivity/source/drivers/mysqlc/mysqlc_statement.hxx
index 9595c596401a..2ce417259b24 100644
--- a/connectivity/source/drivers/mysqlc/mysqlc_statement.hxx
+++ b/connectivity/source/drivers/mysqlc/mysqlc_statement.hxx
@@ -65,7 +65,6 @@ protected:
rtl::Reference<OConnection> m_xConnection; // The owning Connection object
css::uno::Reference<css::sdbc::XResultSet> m_xResultSet;
- MYSQL_RES* m_pMysqlResult = nullptr;
// number of rows affected by an UPDATE, DELETE or INSERT statement.
sal_Int32 m_nAffectedRows = 0;