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

Support the "? in (SELECT some_col FROM some_table)" subqueries [CORE2697] #3097

Closed
firebird-automations opened this issue Oct 19, 2009 · 10 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Roman Rokytskyy (rrokytskyy)

Is related to JDBC94
Is duplicated by CORE3842
Is related to QA647

The query that does not work is of the following kind:

SELECT <columns> FROM table_1 t1
WHERE <conditions on table_1>
AND (? IN (SELECT some_col FROM table_2 t2 WHERE http://t1.id = t2.ref_id))

Firebird complains that the data type of the parameter is unknown, however it could be derived from the some_col data type.

I understand that this query can be rewritten using EXISTS clause, but according to the bug description it was generated by Hibernate, so the Java developers hardly have any possibility to fix it themselves.

Commits: ed9ec00 fb1e53f

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Link: This issue is related to JDBC94 [ JDBC94 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

Fix Version: 3.0 Alpha 1 [ 10331 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

I just tried this against Firebird 3.0.0.29934 (with Jaybird native, and a Firebird 2.5 fbclient.dll) using the table structure and query in JDBC94, it still returns:
335544569. Dynamic SQL Error
SQL error code = -804
Data type unknown

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue is duplicated by CORE3842 [ CORE3842 ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @mrotteveel

Checked it with WI-T3.0.0.29952 Firebird 3.0 Unstable and it is OK now.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

description: The query that does not work is of the following kind:

SELECT <columns> FROM table_1 t1
WHERE <conditions on table_1>
AND (? IN SELECT some_col FROM table_2 t2 WHERE http://t1.id = t2.ref_id)

Firebird complains that the data type of the parameter is unknown, however it could be derived from the some_col data type.

I understand that this query can be rewritten using EXISTS clause, but according to the bug description it was generated by Hibernate, so the Java developers hardly have any possibility to fix it themselves.

=>

The query that does not work is of the following kind:

SELECT <columns> FROM table_1 t1
WHERE <conditions on table_1>
AND (? IN (SELECT some_col FROM table_2 t2 WHERE http://t1.id = t2.ref_id))

Firebird complains that the data type of the parameter is unknown, however it could be derived from the some_col data type.

I understand that this query can be rewritten using EXISTS clause, but according to the bug description it was generated by Hibernate, so the Java developers hardly have any possibility to fix it themselves.

summary: Support the "? in SELECT some_col FROM some_table" subqueries => Support the "? in (SELECT some_col FROM some_table)" subqueries

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA647 [ QA647 ]

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