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
Cant' delete a table when another read only connection is conneted to the database [CORE1823] #2253
Comments
Commented by: @dyemanov Make sure you finished the transaction used to perform that query. Also, make sure that the query handle is actually released upon close (some components could require an extra operation for that). |
Commented by: Pascal (webpac) I verified and the the query is closed et destructed, only the connection to the database is subsisting. I develop an ETL and it's a big problem for me. |
Commented by: @dyemanov Provided that I cannot reproduce this issue with two ISQL instances, I still believe the problem is on your side (handle management, etc). |
Commented by: @hvlad Pascal, get Firebird 2.1 and use monitoring tables to ensure you didn't release query handle. Note, you need to call isc_dsql_free with DSQL_drop option (DSQL_close is not enough) |
Commented by: Pascal (webpac) I installed Firebird 2.1 but I don't know where is the monitoring. Thanks, |
Commented by: @dyemanov What connectivity layer do you use to access FB? |
Commented by: Pascal (webpac) I work with Delphi 7 and the dbExpress componants developped by Borland (TSQLConnection, TSQLQuery) and the IBX componants( TIBDatabase, TIBQuery). |
Commented by: @dyemanov Please make a test case for Delphi. |
Commented by: Pascal (webpac) Hi, |
Commented by: Pascal (webpac) Do you reproduce the problem ? |
Commented by: @dyemanov DBX doesn't seem to close the statement handle properly. Also, I don't know how it manages transactions. I've changed your example to use IBX and the test works fine with no lockups. |
Commented by: Pascal (webpac) Hello, |
Commented by: Pascal (webpac) What is scheduled for this issue ? Thanks |
Commented by: @dyemanov After more testing your test case, I tend to conclude that the issue is actually SS vs CS and not v1.5 vs 2.0. In all versions, CS don't allow you to drop the table. Can you confirm that? |
Commented by: Pascal (webpac) What does CS and SS mean ? |
Commented by: @dyemanov classic server / superserver |
Commented by: Pascal (webpac) I made the tests and theses the results : 1.5.4 Classic Server : table dropped. 2.0.3 Classic Server : can't drop the table. 2.1.0 Classic Server : can't drop the table. So Cs allows to drop the table in 1.5.4 version but doesn't allow it in 2.0.3 version. Most of clients have installed classic server because most have hyperthreading or multi processors or dual core computers. |
Commented by: @dyemanov Your issues are caused by two independent factors: 1) Buggy FB 1.5 which doesn't maintain usage counters for tables and hence allows to drop objects actually being used by compiled requests. I have found two solutions: 1) Use Upscene DBX driver instead of Borland one. It does auto-commit the select properly. Both these solutions work without problems for all FB versions and architectures. BTW, I've noticed that your test case doesn't actually work with v2.0 / 2.1 SuperServer either. The engine returns the "object in use" error on commit for DROP TABLE and it is proved to be delivered to the client side, but Borland's DBX driver seems to ignore it. If you would comment out the CREATE TABLE call, then you'll get a message box "Table deleted" but in fact the table still exists in the database. The only real issue with FB I've found is that v2.x SS reports the "object in use" error immediately while CS locks up until the concurrent resource is released. But this is a known issue, registered as CORE1032. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: Pascal (webpac)
When an application opens a connection to a database, opens a SELECT query, closes the query but keep open the connection to the database, it is impossible to delete the table used in the query.
With Firebird version 1.5, it was possible to delete it and the other databases (Oracle, MySQL,...) let enable to delete it.
The text was updated successfully, but these errors were encountered: