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
fbclient.dll / gds32.dll : readonly database files on isc_attach_database (error code 0 instead of 335544727) [CORE1442] #1860
Comments
Commented by: @hvlad I don't understand why engine must return error code (isc_net_write_err) if database file is read only ? |
Commented by: Daniel Bauten (danielbauten) Firebird 2.0.0 (and Firebird 1.x, too) do return isc_net_write_err which is used by database components like IBX and FIBPlus to raise an exception. This exception is then used to tell the user "I/O error for file ?...". Error while trying to write to file". I don't know if a readonly database file works (even if the user wants a readonly access) - since no transaction information can be written into the database file. Nevertheless, as a developer I need a way to recognize that a database file is readonly. Until Firebird 2.0.1 I got this information via the mentioned error code returned by the client library. Since Firebird 2.0.1, this information isn't provided anymore by the client library. In my opinion, the handling up to Firebird 2.0.0 was "more useful". If it's rather a "new feature" than a bug, why was it changed in 2.0.1? What can I do to recognize a readonly database file (without opening)? |
Commented by: @dyemanov It appears that you're talking about read-only file (at the filesystem level) while Vlad is talking about read-only database (at the Firebird on-disk structure level). If so, it seems I can confirm the issue. With v2.0.0 and IBExpert, I see an error dialog box: "no permission for read-write access to database <path>". With v2.0.1, the attachment succeeds but immediately after that I get: "Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements. I/O error for file <path>. Error while trying to write to file. Access is denied." This isn't a crash, but the behavior is definitely different. |
Commented by: Daniel Bauten (danielbauten) Yes, Dmitry. I am talking about the file system attribute "read-only". I thougt, that "database file" is clearly the file in the "file system". Sorry if my notions mislead anyone. As the behaviour is different - is it a "bug" or a "feature"? |
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Modified by: @dyemanovVersion: 2.0.2 [ 10130 ] Version: 2.1 Beta 1 [ 10141 ] Version: 2.0.3 [ 10200 ] Fix Version: 2.0.4 [ 10211 ] |
Modified by: @dyemanovComponent: Engine [ 10000 ] Version: 2.1 Beta 1 [ 10141 ] => Component: API / Client Library [ 10040 ] => |
Commented by: @dyemanov This is a bug and it's already fixed. |
Commented by: Daniel Bauten (danielbauten) That's really fast. Thanks, Dmitry. |
Modified by: @pcisarWorkflow: jira [ 12971 ] => Firebird [ 14620 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: No test => Cannot be tested |
Submitted by: Daniel Bauten (danielbauten)
Since 2.0.1 in case that the database file is READONLY, the error code (335544727) isn't returned anymore (on 'isc_attach_database').
Node: As an result, IBX and even FIBPlus try to open the database. This leads in a "crash" right after connecting (e.g. on starting the first transaction)...
Commits: 372fee8
The text was updated successfully, but these errors were encountered: