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
Use of "? in (SELECT some_col FROM some_table)" subqueries results in error [CORE3842] #1424
Comments
Modified by: @mrotteveel |
Modified by: @mrotteveel |
Modified by: @mrotteveel |
Commented by: @asfernandes Marking this as duplicate. CORE2697 was fixed once but broken later. Now it's fixed again. |
Modified by: @asfernandes |
Commented by: @mrotteveel Checked it with WI-T3.0.0.29952 Firebird 3.0 Unstable and it is OK now. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Modified by: @pavel-zotovQA Status: No test |
Modified by: @pavel-zotovstatus: Closed [ 6 ] => Closed [ 6 ] QA Status: No test => Covered by another test(s) Test Details: See test for CORE2697 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Submitted by: @mrotteveel
Relate to JDBC94
Duplicates CORE2697
Using a query with the condition "? in (SELECT some_col FROM some_table)" results in an error -804 Data type unknown. This was suppossed to fixed by CORE2697 for version 3.0, but it appears this is not the case.
Synthetic reproduction script (see also JDBC94)
CREATE TABLE VALUE_TABLE
(
INT_COLUMN Integer NOT NULL,
PRIMARY KEY (INT_COLUMN)
);
COMMIT;
INSERT INTO VALUE_TABLE(INT_COLUMN) VALUES (1);
COMMIT;
set term #;
EXECUTE BLOCK
AS
DECLARE charResult CHAR(1);
BEGIN
EXECUTE STATEMENT ('SELECT ''x'' FROM RDB$DATABASE WHERE ? IN (SELECT INT_COLUMN FROM VALUE_TABLE)') (1) INTO charResult;
END#
set term ;#
Result:
Engine Code : 335544569
Engine Message :
Dynamic SQL Error
SQL error code = -804
Data type unknown
As stated in CORE2697 this could be rewritten to use EXISTS, but sometimes that is not an option if the query is generated.
====== Test Details ======
See test for CORE2697
The text was updated successfully, but these errors were encountered: