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" when table inner join procedure inner join table [CORE4344] #4666
Comments
Modified by: @dyemanovassignee: Dmitry Yemanov [ dimitr ] |
Commented by: Sean Leyne (seanleyne) This is a historical issue/limitation. At the very least, this is not a "Major" priority -- there are simple workarounds. |
Commented by: @sim1984 Sean Leyne, in Firebird 3 was declared that INNER JOIN can be done now with dependent procedures and for simpler cases it really works. For this reason this ticket was created. I know that this historical restriction and never worked. |
Commented by: Sean Leyne (seanleyne) Sorry, haven't yet read the v3 release notes. It would have been appropriate to note that the case was about new feature... |
Modified by: @dyemanovVersion: 3.0 Alpha 1 [ 10331 ] summary: "no current record for fetch operation" when table inner join procedure inner join table => Error "no current record for fetch operation" when table inner join procedure inner join table |
Modified by: @dyemanovstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 3.0 Beta 1 [ 10332 ] |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @sim1984
Is related to QA592
SET SQL DIALECT 3;
SET NAMES WIN1251;
CREATE DATABASE 'localhost:d:\fb\fb30\data\test.fdb'
USER 'SYSDBA' PASSWORD 'masterkey'
PAGE_SIZE 16384
DEFAULT CHARACTER SET WIN1251;
CREATE TABLE T (
ID INTEGER NOT NULL,
A INTEGER,
B INTEGER
);
INSERT INTO T (ID, A, B) VALUES (1, 2, 3);
INSERT INTO T (ID, A, B) VALUES (2, 1, 3);
INSERT INTO T (ID, A, B) VALUES (3, 3, 2);
COMMIT WORK;
ALTER TABLE T ADD PRIMARY KEY (ID);
SET TERM ^ ;
CREATE PROCEDURE MYPROC (
A INTEGER,
C INTEGER)
RETURNS (
B INTEGER)
AS
begin
b = a + c;
suspend;
end^
SET TERM ; ^
SQL> select t3.*
CON> from t t1
CON> join t t2 on http://t1.id = t2.a
CON> left join myproc(t1.a, t2.a) p on 1=1
CON> join t t3 on p.b = t3.b;
============ ============ ============
1 2 3
1 2 3
2 1 3
2 1 3
SQL> select t3.*
CON> from t t1
CON> join t t2 on http://t1.id = t2.a
CON> join myproc(t1.a, t2.a) p on 1=1
CON> join t t3 on p.b = t3.b;
============ ============ ============
Statement failed, SQLSTATE = 22000
no current record for fetch operation <-- Why?
SQL> select p.*
CON> from t t1
CON> join t t2 on http://t1.id = t2.a
CON> join myproc(t1.a, t2.a) p on 1=1;
============
3
3
6
Commits: 0719295 FirebirdSQL/fbt-repository@8762d53
====== Test Details ======
See also: CORE2155
The text was updated successfully, but these errors were encountered: