-
-
Notifications
You must be signed in to change notification settings - Fork 233
Invalid parameter type when using it in CHAR_LENGTH function [CORE1379] #1797
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
Comments
Commented by: @asfernandes This is how the engine works, parameters of some expressions assume datatype of the other expression side, i.e., with char_length(?) = 1, the parameter type will be described as integer. This make sense for substring, for example, but don't for char_length, as you see. But as also you see, we have problems with parameters alone, i.e., char_length(?) in select list doesn't work, as our API can't describe strings of unknown size. Given that, I may live with the CHAR_LENGTH bug until we fix the datatype unknown error. |
Commented by: @asfernandes The incorrect parameter type description is fixed, and hence I'm closing this ticket, since we have others about "Data type unknown". |
Modified by: @asfernandesstatus: Open [ 1 ] => Resolved [ 5 ] resolution: Fixed [ 1 ] Fix Version: 2.1 Beta 2 [ 10190 ] assignee: Adriano dos Santos Fernandes [ asfernandes ] |
Modified by: @asfernandes |
Modified by: @asfernandes |
Commented by: @asfernandes Sorry, I want to say they are related. But since there is "relate to" and "is related to" and I couldn't differenciate :-), I removed the link now. |
Commented by: Kuznetsov Eugene (eugene) Sorry for pause. Adriano dos Santos Fernandes wrote With best regards, Eugene |
Commented by: @dyemanov Bad idea, actually, as the input message size is limited to 64K and hence you won't be able to use anything like two CHAR_LENGTH(?) calls. |
Commented by: Kuznetsov Eugene (eugene) To Dmitriy Yemanov Thanks for info. With best regards, Eugene |
Modified by: @pcisarWorkflow: jira [ 12674 ] => Firebird [ 14247 ] |
Commented by: @pavel-zotov > The incorrect parameter type description is fixed set term ^;
============ execute block returns(r int) as
============ execute block returns(r int) as
============ set term ;^ Is it correct ? PS. WI-T3.0.0.31789 |
Commented by: @asfernandes Fixed again in v3, to return "Data type unknown" error. |
Commented by: @pcisar Test created. |
Modified by: @pcisarstatus: Resolved [ 5 ] => Closed [ 6 ] |
Commented by: Arioch (arioch) DY> as the input message size is limited to 64K Is it still true for FB3 ? |
Commented by: @dyemanov Arioch> Is it still true for FB3 ? |
Submitted by: Kuznetsov Eugene (eugene)
Is related to QA178
After preparing query
select * from rdb$database
where char_length(:value1) = 1
the type of value1 will be INTEGER
Generally, if parameter is an argument of CHAR_LENGTH, then its type depends on other part's one in equality predicate. No doubt, this behavior is erroneous.
Also, server can't determine parameter type when meeting the single CHAR_LENGTH's call - preparing
select char_length(:value1) from rdb$database
returns ?Data type unknown?.
With best regards, Eugene
Commits: 3ed87ec 64f80d1 FirebirdSQL/fbt-repository@754823e
The text was updated successfully, but these errors were encountered: