New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
status_exception thrown and caught on every access due to trying to close already closed cursor (patch) [ODBC29] #30
Comments
Commented by: Vaclav Slavik (vslavik) Patch with the fix. |
Modified by: Vaclav Slavik (vslavik)Attachment: IscStatement.cpp.HEAD.patch [ 10490 ] |
Commented by: Vladimir Tsvigun (praktik) Hi! > + USHORT option = 0; It's bad variant. If the execute connection->commitAuto(); and Check up And please use FbODBC ver 2.0 |
Commented by: Vaclav Slavik (vslavik) Works for me, thanks! |
Commented by: Pabloj (pabloj_sourceforge) Did this go into the official code? |
Commented by: @samofatov Yes, it seems so. cvs diff -u -r 1.18.2.15 -r 1.18.2.16 IscStatement.cpp Index: IscStatement.cppRCS file: /cvsroot/firebird/OdbcJdbc/IscDbc/IscStatement.cpp,v |
Modified by: @alexpotapchenkostatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.0 Beta [ 10043 ] |
Modified by: @alexpotapchenkostatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Vaclav Slavik (vslavik)
Assigned to: Vladimir Tsvigun (praktik)
Attachments:
IscStatement.cpp.HEAD.patch
When using ODBC driver against embedded Firebird server, my application would throw and catch status_exception during every ODBC query. The exception was caught, so this was only annoying because it polluted debug log when running under VC++ debugger, plus it has performance impact, but it's not fatal.
Turns out that it happens because for auto-commit transactions, IscStatement::deleteResultSet() first calls commitAuto(), which closes the cursor, and then calls _dsql_free_statement() with DSQL_close flag, i.e. it requests that the cursor is closed. This fails because the cursor was already closed and status_exception is thrown.
Attached patch (against CVS HEAD) fixes this.
Commits: f06d8f2
The text was updated successfully, but these errors were encountered: