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
"no current record for fetch operation" [CORE3693] #4041
Comments
Modified by: @livius2Version: 2.1.5 [ 10420 ] Component: Engine [ 10000 ] environment: SuperServer Windows XP/Win2003 Server |
Commented by: @livius2 I test this now also on recent snapshot of FB 2.5.2.26397 and the same error occur |
Modified by: @livius2Version: 2.5.2 [ 10450 ] |
Commented by: @dyemanov The query is invalid and should be rewritten. The join inside the parenthesis is not allowed to reference outer contexts (in your example, this is KO). Firebird 3 will throw a parser error in this case, prior versions are likely to fail at runtime with "no current record to fetch". |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @livius2
Is related to CORE2812
when i work on query (not finall) i got error like in subject
i simplify situation to this 3 tables and one derived table (in my normal solution there are not derived tables then this is not corelated)
CREATE TABLE KAT_OBJ
(
ID INTEGER NOT NULL,
ID_KAT INTEGER NOT NULL,
ID_OBJ INTEGER NOT NULL,
CONSTRAINT PK_KAT_OBJ__ID PRIMARY KEY (ID),
CONSTRAINT UK_KAT_OBJ__ID_OBJ__ID_KAT UNIQUE (ID_OBJ,ID_KAT)
);
CREATE TABLE ZLEC_SERW
(
ID BIGINT NOT NULL,
ID_OBJ INTEGER,
CONSTRAINT PK_ZLEC_SERW__ID PRIMARY KEY (ID)
);
CREATE TABLE ZS_ZALACZNIK
(
ID BIGINT NOT NULL,
ID_ZLEC_SERW BIGINT,
ID_OBJ INTEGER,
CONSTRAINT PK_ZS_ZALACZNIK__ID PRIMARY KEY (ID)
);
CREATE INDEX IXA_KAT_OBJ__ID_KAT ON KAT_OBJ (ID_KAT);
CREATE INDEX IXA_KAT_OBJ__ID_OBJ ON KAT_OBJ (ID_OBJ);
CREATE INDEX IXA_ZS_ZALACZNIK__ID_OBJ ON ZS_ZALACZNIK (ID_OBJ);
CREATE INDEX IXA_ZS_ZALACZNIK__ID_ZLEC_SERW ON ZS_ZALACZNIK (ID_ZLEC_SERW);
INSERT INTO KAT_OBJ (ID, ID_KAT, ID_OBJ) VALUES ('1', '2', '456');
INSERT INTO ZLEC_SERW (ID, ID_OBJ) VALUES ('1', '2');
INSERT INTO ZLEC_SERW (ID, ID_OBJ) VALUES ('2', '456');
INSERT INTO ZS_ZALACZNIK (ID, ID_ZLEC_SERW, ID_OBJ) VALUES ('1', '1', NULL);
INSERT INTO ZS_ZALACZNIK (ID, ID_ZLEC_SERW, ID_OBJ) VALUES ('2', '2', NULL);
SELECT
*
SQL Message: -508
The cursor identified in the update or delete statement is not positionet on a row
Engine Code: 335544348
Engine Message:
no current record for fetch operation
The text was updated successfully, but these errors were encountered: