summaryrefslogtreecommitdiff
path: root/connectivity/source/drivers
diff options
context:
space:
mode:
authorTamas Bunth <tamas.bunth@collabora.co.uk>2017-12-09 13:38:39 +0100
committerAndras Timar <andras.timar@collabora.com>2018-03-19 14:56:18 +0100
commit2465c979f229c2440e6440e90380b433384c0c83 (patch)
treefa9f5dbcc0b72b6447da1f88d205cc01bbf8910e /connectivity/source/drivers
parent8eb9b0544fa36b15e9e70403da401dea9a858c83 (diff)
Firebird: Revert not closing cursor,..
..but suppress error of closing closed cursor Change-Id: I58f96f02f3f600a089bde361ed3e46a03a4902d4 Reviewed-on: https://gerrit.libreoffice.org/46141 Reviewed-by: Tamás Bunth <btomi96@gmail.com> Tested-by: Tamás Bunth <btomi96@gmail.com> (cherry picked from commit 032a3e3713af3e308229bd8e1ada17d6d24072f3)
Diffstat (limited to 'connectivity/source/drivers')
-rw-r--r--connectivity/source/drivers/firebird/PreparedStatement.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/connectivity/source/drivers/firebird/PreparedStatement.cxx b/connectivity/source/drivers/firebird/PreparedStatement.cxx
index 445a2b114b89..37441d5c6b1f 100644
--- a/connectivity/source/drivers/firebird/PreparedStatement.cxx
+++ b/connectivity/source/drivers/firebird/PreparedStatement.cxx
@@ -250,6 +250,21 @@ sal_Bool SAL_CALL OPreparedStatement::execute()
if (m_xResultSet.is()) // Checks whether we have already run the statement.
{
disposeResultSet();
+ // Closes the cursor from the last run.
+ // This doesn't actually free the statement -- using DSQL_close closes
+ // the cursor and keeps the statement, using DSQL_drop frees the statement
+ // (and associated cursors).
+ aErr = isc_dsql_free_statement(m_statusVector,
+ &m_aStatementHandle,
+ DSQL_close);
+ if (aErr)
+ {
+ // Do not throw error. Trying to close a closed cursor is not a
+ // critical mistake.
+ OUString sErrMsg = StatusVectorToString(m_statusVector,
+ "isc_dsql_free_statement: close cursor");
+ SAL_WARN("connectivity.firebird", sErrMsg);
+ }
}
aErr = isc_dsql_execute(m_statusVector,