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
Parameters doesn't work with NOT IN from a selectable procedure [CORE3094] #3473
Comments
Modified by: @kattungaenvironment: Windows XP, Client compiled with delphi 7, connector with UIB => Windows XP |
Commented by: @hvlad Reproducible test case required |
Modified by: @kattungaAttachment: CONT_SIG.FDB [ 11693 ] |
Modified by: @kattungadescription: The following query works fine in Firebird 2.1 and before. SELECT FCUENTA, FNOMBRE => Attached is database example The following query with parameter :GROUP = 100 return incorrect result: SELECT FCUENTA, FNOMBRE instead the followin query return correct result: SELECT FCUENTA, FNOMBRE This was working fine in previous Firebird versions |
Modified by: @kattungadescription: Attached is database example The following query with parameter :GROUP = 100 return incorrect result: SELECT FCUENTA, FNOMBRE instead the followin query return correct result: SELECT FCUENTA, FNOMBRE This was working fine in previous Firebird versions => Attached is database example The following query with parameter :GROUP = 100 return incorrect result: SELECT FCUENTA, FNOMBRE instead the following query return correct result: SELECT FCUENTA, FNOMBRE This was working fine in previous Firebird versions |
Modified by: @kattungadescription: Attached is database example The following query with parameter :GROUP = 100 return incorrect result: SELECT FCUENTA, FNOMBRE instead the following query return correct result: SELECT FCUENTA, FNOMBRE This was working fine in previous Firebird versions => Attached is database example The following query, with parameter :GROUP = 100, return incorrect result: SELECT FCUENTA, FNOMBRE instead, the following query return correct result: SELECT FCUENTA, FNOMBRE This was working fine in previous Firebird versions |
Commented by: @hvlad Confirmed. Note, NOT EXISTS works correctly despite of usage of parameter\literal. |
Commented by: @asfernandes I'm trying: execute block returns (fcuenta integer, fnombre varchar(10)) And it returns no rows, like passing 100 directly. AFAIK, in most cases this should work as passing the parameter from the client. I've no tool to do that now. What is the incorrect result? |
Commented by: @hvlad Adriano, SELECT with parameter returns 474 rows, as if it have no WHERE clause. I.e. SELECT FCUENTA, FNOMBRE and SELECT FCUENTA, FNOMBRE returns the same number of rows (474) Also, both queries reads only CON_CUEN table, i.e. first query never call procedure SP_TEST |
Modified by: @asfernandesassignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandessummary: parameters doesn't work in select procedures used for subselects => Parameters doesn't work with NOT IN from a selectable procedure |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.5.0 [ 10221 ] Fix Version: 3.0 Alpha 1 [ 10331 ] |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Submitted by: @kattunga
Attachments:
CONT_SIG.FDB
Attached is database example
The following query, with parameter :GROUP = 100, return incorrect result:
SELECT FCUENTA, FNOMBRE
FROM CON_CUEN
WHERE FCUENTA NOT IN (SELECT FCUENTA FROM SP_TEST(:GROUP))
instead, the following query return correct result:
SELECT FCUENTA, FNOMBRE
FROM CON_CUEN
WHERE FCUENTA NOT IN (SELECT FCUENTA FROM SP_TEST(100))
This was working fine in previous Firebird versions
Commits: 7adb129 fc5c390
The text was updated successfully, but these errors were encountered: