Issue Details (XML | Word | Printable)

Key: CORE-5773
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Dmitriy Starodubov
Votes: 0
Watchers: 4

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

PSQL cursor doesn't see inserted record

Created: 14/Mar/18 11:59 AM   Updated: 25/Mar/18 06:46 AM
Component/s: Engine
Affects Version/s: 3.0.3, 3.0.4
Fix Version/s: 3.0.4, 4.0 Beta 1

Issue Links:

QA Status: Done successfully

 Description  « Hide
Following script returns 0, i.e. PSQL cursor doesn't see the record that was inserted before cursor was opened.

create table test_table (id bigint);
set term ^;
create or alter procedure test_cursor
returns (
rowcount integer
declare variable id bigint;
declare crsr cursor for (
select id from test_table
insert into test_table(id) values(1);
-- suspend;

open crsr;
fetch crsr into :id;
rowcount = row_count;
close crsr;
set term ;^
select * from test_cursor;

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 20/Mar/18 11:09 AM
Cursor stability based on savepoints\undo-log can't be applied to the explicit cursors, unfortunately.
Therefore "undo" logic is disabled for explicit cursors.
Cursor stability for explicit cursors will be implemented using another way.