Skip to content
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

Closed
firebird-issue-importer opened this issue Sep 5, 2007 · 14 comments

Comments

@firebird-issue-importer
Copy link

@firebird-issue-importer firebird-issue-importer commented Sep 5, 2007

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

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 5, 2007

Commented by: @hvlad

I don't understand why engine must return error code (isc_net_write_err) if database file is read only ?
In this case engine worked with database in readonly mode.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

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)?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

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.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

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"?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

Modified by: @dyemanov

Version: 2.0.2 [ 10130 ]

Version: 2.1 Beta 1 [ 10141 ]

Version: 2.0.3 [ 10200 ]

Fix Version: 2.0.4 [ 10211 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

Modified by: @dyemanov

Component: Engine [ 10000 ]

Version: 2.1 Beta 1 [ 10141 ] =>

Component: API / Client Library [ 10040 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

Modified by: @dyemanov

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

Commented by: @dyemanov

This is a bug and it's already fixed.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 6, 2007

Commented by: Daniel Bauten (danielbauten)

That's really fast. Thanks, Dmitry.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 28, 2008

Modified by: @pcisar

Workflow: jira [ 12971 ] => Firebird [ 14620 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 18, 2008

Modified by: @pcisar

status: Resolved [ 5 ] => Closed [ 6 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jan 19, 2016

Modified by: @pavel-zotov

QA Status: No test

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 20, 2016

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: No test => Cannot be tested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants