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

Bidirectional cursor is not positioned by the first call of FETCH LAST [CORE4229] #4553

Closed
firebird-issue-importer opened this issue Sep 20, 2013 · 3 comments

Comments

@firebird-issue-importer

Submitted by: @sim1984

Bidirectional cursor is not positioned by the first call of FETCH LAST

EXECUTE BLOCK
RETURNS (
NAME CHAR(31),
RC INT)
AS
DECLARE C SCROLL CURSOR FOR (
SELECT RDB$FIELD_NAME
FROM RDB$FIELDS);
BEGIN
OPEN C;
FETCH FIRST FROM C
INTO :NAME;
RC = ROW_COUNT;
SUSPEND;
FETCH LAST FROM C
INTO :NAME;
RC = ROW_COUNT;
SUSPEND;
CLOSE C;
END

Result:

NAME RC
--------------------------------
RDB$VIEW_CONTEXT 1
RDB$19775 1

EXECUTE BLOCK
RETURNS (
NAME CHAR(31),
RC INT)
AS
DECLARE C SCROLL CURSOR FOR (
SELECT RDB$FIELD_NAME
FROM RDB$FIELDS);
BEGIN
OPEN C;
/*
FETCH FIRST FROM C
INTO :NAME;
RC = ROW_COUNT;
SUSPEND;
*/
FETCH LAST FROM C
INTO :NAME;
RC = ROW_COUNT;
SUSPEND;
CLOSE C;
END

Result:

NAME RC
----------------------
<null> 0

Commits: ffbc33c FirebirdSQL/fbt-repository@735d29f

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 20, 2013

Modified by: @dyemanov

assignee: Dmitry Yemanov [ dimitr ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented Sep 20, 2013

Modified by: @dyemanov

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Alpha 2 [ 10560 ]

@firebird-issue-importer
Copy link
Author

firebird-issue-importer commented May 29, 2015

Modified by: @pavel-zotov

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

QA Status: Done successfully

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

No branches or pull requests

2 participants