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

INSERT statement with RETURNING clause raises error 504 ("Unknown cursor from isc_dsql_fetch command") [CORE2903] #3287

Closed
firebird-automations opened this issue Mar 3, 2010 · 7 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Grenzi Lucio (seawolf)

Relate to CORE3203

CREATE TABLE STRING_VALUES
(
S_ID Integer NOT NULL,
S_CHAR Char(255),
S_VARCHAR Varchar(255),
S_NCHAR Char(255),
S_NVARCHAR Varchar(255),
S_BIT Blob sub_type 1,
S_VARBIT Blob sub_type 0,
PRIMARY KEY (S_ID)
);

create this table with no data
Do the following operations:

DELETE FROM STRING_VALUES WHERE S_ID=1
INSERT INTO string_values VALUES (1,'''', '''', '''', '''', NULL, NULL) RETURNING S_ID

It works correctly on FB 2.1 .. with FB 2.5 RC1 and FB 2.5 RC 2
we receviced Error 504: Unknown cursor from isc_dsql_fetch command

This error is caused because of INSERT operation returns no data

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

I can't reproduce it :

SQL> create database '2903.fdb';
SQL>
SQL> show version;
ISQL Version: WI-V2.5.0.25920 Firebird 2.5 Release Candidate 2
Server version:
Firebird/x86/Windows NT (access method), version "WI-V2.5.0.25920 Firebird 2.5 Release Candidate 2"
Firebird/x86/Windows NT (remote server), version "WI-V2.5.0.25920 Firebird 2.5 Release Candidate 2/XNet (W2K3-X64)/P12"
Firebird/x86/Windows NT (remote interface), version "WI-V2.5.0.25920 Firebird 2.5 Release Candidate 2/XNet (W2K3-X64)/P12"
on disk structure version 11.2
SQL>
SQL> CREATE TABLE STRING_VALUES
CON> (
CON> S_ID Integer NOT NULL,
CON> S_CHAR Char(255),
CON> S_VARCHAR Varchar(255),
CON> S_NCHAR Char(255),
CON> S_NVARCHAR Varchar(255),
CON> S_BIT Blob sub_type 1,
CON> S_VARBIT Blob sub_type 0,
CON> PRIMARY KEY (S_ID)
CON> );
SQL> DELETE FROM STRING_VALUES WHERE S_ID=1;
SQL> INSERT INTO string_values VALUES (1,'''', '''', '''', '''', NULL, NULL) RETURNING S_ID;

S_ID 1

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

AFAIR, the statement should be described like an execute procedure, and you shouldn't use isc_dsql_fetch.

@firebird-automations
Copy link
Collaborator Author

Commented by: Sean Leyne (seanleyne)

It seems the current functionality is "As Designed" and operating correctly.

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

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

resolution: Won't Fix [ 2 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: Sean Leyne (seanleyne)

summary: Returning clause raise an 504 error => INSERT statement with RETURNING clause raises error 504 ("Unknown cursor from isc_dsql_fetch command")

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue relate to CORE3203 [ CORE3203 ]

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

1 participant