EXECUTE BLOCK parameters definitions are not respected and may cause wrong behavior related to character sets [CORE3737] #4082
Labels
affect-version: 2.0.5
affect-version: 2.0.6
affect-version: 2.1.0
affect-version: 2.1.1
affect-version: 2.1.2
affect-version: 2.1.3
affect-version: 2.1.4
affect-version: 2.5.0
affect-version: 2.5.1
affect-version: 3.0 Initial
component: engine
fix-version: 3.0 Alpha 1
priority: major
qa: done successfully
type: bug
Submitted by: @asfernandes
Is related to QA571
Suppose you want to execute this block using an API function, and the attachment charset is UTF8.
execute block (c varchar(10) character set win1252 = ?) returns (n integer)
as
begin
n = octet_length(c);
suspend;
end
You then pass a parameter with the value '123áé456'. It returns 10 but the correct is 8, as the string must be converted to WIN1252 and evaluated as it.
But now the engine replaces the character set and insert some casts (when needed) to validate domain-based parameters.
I suppose problems could also appear if the parameters uses insensitive collations.
Commits: e2f2a24
The text was updated successfully, but these errors were encountered: