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

Error "no current record for fetch operation" after ALTER VIEW [CORE3024] #3405

Closed
firebird-automations opened this issue May 28, 2010 · 15 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Denis Nosov (dens256)

When I add field in view (use ALTER VIEW), in parallel connections there is an error.
Use 2 windows isql.

1. In FIRST isql:

SET SQL DIALECT 3;
create database 'localhost:d:\Program Files\Firebird\bases\test_view.fdb' user 'SYSDBA' password 'masterke' page_size 16384;
create table t(a integer, b integer, c integer);
commit;
insert into t values(1,2,3);
commit;
create view v(a, b) as
select a, b from t;
commit;
select * from v;

       A            B

============ ============
1 2

2. In SECOND isql:

connect 'localhost:d:\Program Files\Firebird\bases\test_view.fdb' user 'SYSDBA' password 'masterke';
select * from v;

       A            B

============ ============
1 2
commit;

3. In FIRST isql:

commit;
alter view v(a, b, c) as
select a, b, c from t;
commit;

4. In SECOND isql:
select * from v;

       A            B            C

============ ============ ============
Statement failed, SQLSTATE = 22000
no current record for fetch operation

Commits: f7bcb1b ff108c2 c693282 f28f040 FirebirdSQL/fbt-repository@2252e75 FirebirdSQL/fbt-repository@a8c19cd

====== Test Details ======

Confirmed error on: WI-V2.5.6.26962 (SC), fixed on: WI-V2.5.6.26963.
Checked on WI-V3.0.0.32268 (SS, SC, CS).
Checked on fdb version 1.5.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Can you reproduce it in latest snapshot build?

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Also, what architecture: super or classic?

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Ooops, sorry! I now saw you reported Classic and the bug is presented in latest 2.5.

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

Target: 2.5.1 [ 10333 ]

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

2.5.1 is using conservative approach - use old format
3.0 is getting ready for requests cache - to support it better we should throw an error when format used in cached request is out of date

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

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

resolution: Fixed [ 1 ]

Fix Version: 2.5.1 [ 10333 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

The same result as in starting post one may see in WI-V2.5.5.26916 (SC):

SQL> select * from v;

       A            B            C

============ ============ ============
Statement failed, SQLSTATE = 22000
no current record for fetch operation

(this will be in second ISQL session).

No error in 3.0 - second attachment just see new columns and data also.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred

Test Details: Test implemented, but can run against FB-3.0 only when PATH variable points to fbclient.dll that of FB-2.5.
When PATH leads to fbclient of FB 3.0, fbt_run has either no output or produces

Exception WindowsError: 'exception: access violation reading 0x00000010' in <bound method PreparedStatement.__del__ of <fdb.fbcore
.PreparedStatement object at 0x0237A8F0>> ignored

In any case, file 'results.trf' is not created and one may not to check results of test.

Sent report to Pavel Cisar (2015-JUL-20 09:09), waiting for reply.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

Error still exists on SC:

ISQL Version: WI-V2.5.6.26962 Firebird 2.5
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.6.26962 Firebird 2.5"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.6.26962 Firebird 2.5/tcp (csprog)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.6.26962 Firebird 2.5/tcp (csprog)/P12"
on disk structure version 11.2

IMO, 2.5 should be removed from list of "Fix Version/s".

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Deferred => Done with caveats

Test Details: Test implemented, but can run against FB-3.0 only when PATH variable points to fbclient.dll that of FB-2.5.
When PATH leads to fbclient of FB 3.0, fbt_run has either no output or produces

Exception WindowsError: 'exception: access violation reading 0x00000010' in <bound method PreparedStatement.__del__ of <fdb.fbcore
.PreparedStatement object at 0x0237A8F0>> ignored

In any case, file 'results.trf' is not created and one may not to check results of test.

Sent report to Pavel Cisar (2015-JUL-20 09:09), waiting for reply.

=>

09.01.2016. BUG STILL EXISTS ON 2.5.6!
Confirmed error on: WI-V2.5.6.26962 (SC).
Origin value for 'min_versions' ('2.5.1') was replaced with 3.0 untill bug exists in 2.5.x.
Checked on WI-V3.0.0.32268 (SS, SC, CS) -- all fine, no more AV; but it seems that minimal fdb version must be >= 1.5.

=== prev:
Test implemented, but can run against FB-3.0 only when PATH variable points to fbclient.dll that of FB-2.5.
When PATH leads to fbclient of FB 3.0, fbt_run has either no output or produces
Exception WindowsError: 'exception: access violation reading 0x00000010' in <bound method PreparedStatement.__del__ of <fdb.fbcore
.PreparedStatement object at 0x0237A8F0>> ignored
In any case, file 'results.trf' is not created and one may not to check results of test.
Sent report to Pavel Cisar (2015-JUL-20 09:09), waiting for reply.

@firebird-automations
Copy link
Collaborator Author

Commented by: @AlexPeshkoff

Pavel, I backported fix to 2.5 release. Looking at history of changes of this issue looks like commit was lost by sourceforge.
Please recheck it once again when new snapshot is ready.

@firebird-automations
Copy link
Collaborator Author

Commented by: @pavel-zotov

Checked on WI-V2.5.6.26963 - now all fine.

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done with caveats => Done successfully

Test Details: 09.01.2016. BUG STILL EXISTS ON 2.5.6!
Confirmed error on: WI-V2.5.6.26962 (SC).
Origin value for 'min_versions' ('2.5.1') was replaced with 3.0 untill bug exists in 2.5.x.
Checked on WI-V3.0.0.32268 (SS, SC, CS) -- all fine, no more AV; but it seems that minimal fdb version must be >= 1.5.

=== prev:
Test implemented, but can run against FB-3.0 only when PATH variable points to fbclient.dll that of FB-2.5.
When PATH leads to fbclient of FB 3.0, fbt_run has either no output or produces
Exception WindowsError: 'exception: access violation reading 0x00000010' in <bound method PreparedStatement.__del__ of <fdb.fbcore
.PreparedStatement object at 0x0237A8F0>> ignored
In any case, file 'results.trf' is not created and one may not to check results of test.
Sent report to Pavel Cisar (2015-JUL-20 09:09), waiting for reply.

=>

Confirmed error on: WI-V2.5.6.26962 (SC), fixed on: WI-V2.5.6.26963.
Checked on WI-V3.0.0.32268 (SS, SC, CS).
Checked on fdb version 1.5.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment