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

"Invalid BLOB ID" in IBX insert operation [CORE1417] #1835

Closed
firebird-issue-importer opened this issue Aug 20, 2007 · 13 comments
Closed

"Invalid BLOB ID" in IBX insert operation [CORE1417] #1835

firebird-issue-importer opened this issue Aug 20, 2007 · 13 comments

Comments

@firebird-issue-importer

Submitted by: michalk1 (michalk1)

Attachments:
InsBlob.zip

When executing two subsequent insert operations into a blob field, first one with arbitrary not null value and the second one with null value, "Invalid BLOB ID" error arises on condition that transaction is restarted between the two calls. It seems (my presumption) that when parameter is assigned a null value, IBX just sets some flag and leaves rest of the parameter structure intact, which allows the old "BLOB ID" to survive to the next call. Unlike previous Firebird versions, FB2.1 Beta1 probably tests validity of the "BLOB ID" even if the parameter contains null value, which fails after commit of the original transaction.

CREATE TABLE TESTTAB
(
MEMOFLD BLOB CHARACTER SET ASCII
);

Tsc.StartTransaction;
Ibsql.SQL.Text := 'INSERT INTO TESTTAB (MEMOFLD) VALUES (:MEMOFLD)';
Ibsql.ParamByName('MEMOFLD').AsString := 'AAA'; // any not null value
Ibsql.ExecQuery;
Tsc.Commit;

Tsc.StartTransaction;
Ibsql.ParamByName('MEMOFLD').Clear; // null value
Ibsql.ExecQuery; // "Invalid BLOB ID" raised here
Tsc.Commit;

The same code runs ok if
- ran against FB1.5 or FB2.0 OR
- inserts are executed within the same transaction OR
- CHARACTER SET is not specified in field definiton

Commits: 0b76787

@firebird-issue-importer
Copy link
Author

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

Modified by: @dyemanov

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

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

Commented by: Sean Leyne (seanleyne)

IBX does not directly support Firebird, never has.

v2.1 contains changes to the treatment/definition of Blob's at the API level, which is the likely why the application no longer runs correctly.

You are advised to:

- investigate other database connection components (IBObjects or FIBPlus), or
- use the older FBClient/GDS32 DLLs for your client application

@firebird-issue-importer
Copy link
Author

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

Commented by: @asfernandes

No, Sean!

There is already a similar problem using .Net Provider, but I wasn't able to reproduce it using fbclient.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 21, 2007

Commented by: @asfernandes

Michal, could you please attach here a simple test case, that I can configure database location to test?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 21, 2007

Commented by: michalk1 (michalk1)

Test case application

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 21, 2007

Modified by: michalk1 (michalk1)

Attachment: InsBlob.zip [ 10530 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 21, 2007

Commented by: michalk1 (michalk1)

Sean, I know that IBX officially doesn't support Firebird and in long term its better to switch to a different component set, but so far it works ok. After all, IBX gurantees support of older interbase versions and FB API is said to be backward compatible as well, so theoretically this could work as long as I don't use new FB features. Since Delphi includes IBX sources, it is also possible to build modified IBX version.

Change of client library (IBX uses GDS32.DLL) doesn't help, the exception is still raised.

Adriano, I attached a test case. Just run the exe file, fill in database name, click at "Create Db" (once) and then at "Run insert". This should lead to the exception in FB2.1 Beta1.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 22, 2007

Commented by: @asfernandes

Thanks for the test case.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Aug 22, 2007

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 2.1 Beta 2 [ 10190 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Dec 26, 2007

Modified by: @pcisar

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

@firebird-issue-importer
Copy link
Author

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

Modified by: @pcisar

Workflow: jira [ 12850 ] => Firebird [ 14621 ]

@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 Sep 19, 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