Issue Details (XML | Word | Printable)

Key: CORE-3024
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: Denis Nosov
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

Error "no current record for fetch operation" after ALTER VIEW

Created: 28/May/10 04:27 PM   Updated: 10/Jan/16 07:18 AM
Component/s: Engine
Affects Version/s: 2.5 RC2
Fix Version/s: 2.5.1, 3.0 Alpha 1

Environment:
OS: Windows Seven (win32)
FB 2.5.0.26024 Classic

Target: 2.5.1
QA Status: Done successfully
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.


 Description  « Hide
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


 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Adriano dos Santos Fernandes added a comment - 31/May/10 01:33 PM
Can you reproduce it in latest snapshot build?

Adriano dos Santos Fernandes added a comment - 31/May/10 01:35 PM
Also, what architecture: super or classic?

Adriano dos Santos Fernandes added a comment - 31/May/10 01:38 PM
Ooops, sorry! I now saw you reported Classic and the bug is presented in latest 2.5.

Alexander Peshkov made changes - 01/Jun/10 08:25 AM
Field Original Value New Value
Assignee Alexander Peshkov [ alexpeshkoff ]
Repository Revision Date User Message
Firebird #51253 Tue Jun 15 12:27:33 UTC 2010 alexpeshkoff Fixed CORE-3024: Error "no current record for fetch operation" after ALTER VIEW (and a lot of other possible inconsistencies)
Files Changed
MODIFY /firebird/trunk/src/jrd/Relation.h
MODIFY /firebird/trunk/src/jrd/cmp.cpp
MODIFY /firebird/trunk/src/jrd/dfw.epp
MODIFY /firebird/trunk/src/jrd/lck.h
MODIFY /firebird/trunk/src/jrd/met.epp
MODIFY /firebird/trunk/src/jrd/lck.cpp

Alexander Peshkov made changes - 15/Jun/10 12:28 PM
Status Open [ 1 ] Open [ 1 ]
Target 2.5.1 [ 10333 ]
Fix Version/s 3.0 Alpha 1 [ 10331 ]
Repository Revision Date User Message
Firebird #51666 Wed Oct 13 09:15:48 UTC 2010 alexpeshkoff Full fix for CORE-3024
Files Changed
MODIFY /firebird/trunk/src/msgs/messages2.sql
MODIFY /firebird/trunk/lang_helpers/gds_codes.ftn
MODIFY /firebird/trunk/src/include/gen/codetext.h
MODIFY /firebird/trunk/lang_helpers/gds_codes.pas
MODIFY /firebird/trunk/src/include/gen/sql_code.h
MODIFY /firebird/trunk/src/jrd/evl.cpp
MODIFY /firebird/trunk/src/include/gen/msgs.h
MODIFY /firebird/trunk/src/msgs/facilities2.sql
MODIFY /firebird/trunk/src/include/gen/iberror.h
MODIFY /firebird/trunk/src/include/gen/sql_state.h
MODIFY /firebird/trunk/src/msgs/system_errors2.sql

Alexander Peshkov added a comment - 13/Oct/10 09:30 AM
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

Alexander Peshkov made changes - 13/Oct/10 09:30 AM
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.5.1 [ 10333 ]
Resolution Fixed [ 1 ]
Pavel Cisar made changes - 04/Feb/11 01:05 PM
Status Resolved [ 5 ] Closed [ 6 ]
Pavel Zotov added a comment - 20/Jul/15 05:53 AM
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.

Pavel Zotov made changes - 20/Jul/15 06:15 AM
Status Closed [ 6 ] Closed [ 6 ]
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.
QA Status Deferred
Pavel Zotov added a comment - 09/Jan/16 07:41 AM
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".

Pavel Zotov made changes - 09/Jan/16 07:51 AM
Status Closed [ 6 ] Closed [ 6 ]
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.
===
QA Status Deferred Done with caveats
Repository Revision Date User Message
Firebird #62794 Sat Jan 09 17:10:14 UTC 2016 alexpeshkoff Backported fix for CORE-3024: Error "no current record for fetch operation" after ALTER VIEW
Files Changed
MODIFY /firebird/branches/B2_5_Release/src/jrd/met.epp
MODIFY /firebird/branches/B2_5_Release/src/jrd/Relation.h
MODIFY /firebird/branches/B2_5_Release/src/jrd/lck.cpp
MODIFY /firebird/branches/B2_5_Release/src/jrd/cmp.cpp
MODIFY /firebird/branches/B2_5_Release/src/jrd/dfw.epp
MODIFY /firebird/branches/B2_5_Release/src/jrd/lck.h
MODIFY /firebird/branches/B2_5_Release/src/jrd/evl.cpp

Alexander Peshkov added a comment - 09/Jan/16 05:14 PM
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.

Pavel Zotov added a comment - 10/Jan/16 07:17 AM
Checked on WI-V2.5.6.26963 - now all fine.

Pavel Zotov made changes - 10/Jan/16 07:18 AM
Status Closed [ 6 ] Closed [ 6 ]
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.
QA Status Done with caveats Done successfully
Repository Revision Date User Message
Firebird #63006 Tue Feb 23 13:38:04 UTC 2016 alexpeshkoff One more postfix for CORE-3024 - thanks to Dmitry
Files Changed
MODIFY /firebird/branches/B2_5_Release/src/jrd/evl.cpp