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: 04/Feb/11 01:05 PM
Component/s: Engine
Affects Version/s: 2.5 RC2
Fix Version/s: 2.5.1, 3.0 Alpha 1

Time Tracking:
Not Specified

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

Target: 2.5.1
Planning Status: Unspecified


 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   Work Log   Change History   Version Control   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 GMT+00:00 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 GMT+00:00 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 ]