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

EXECUTE STATEMENT rise varchar char_length() size [CORE4604] #4919

Closed
firebird-automations opened this issue Nov 11, 2014 · 12 comments
Closed

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: Nickolay Ponomarev (raxta)

Is duplicated by CORE4825
Is related to QA615

Same UUID have different size between and after select in execute statement. Base locale: UTF8. With WIN1251 all OK.

Code:

execute block returns (tmp_res varchar(38), str_size integer)
as
declare variable tmp_guid varchar(38);
declare variable tmp_sqltext varchar(300);
begin
tmp_guid = uuid_to_char(gen_uuid());
tmp_res = tmp_guid;
str_size = char_length(tmp_guid);
suspend;
tmp_sqltext = 'select ''' || tmp_guid || ''' from rdb$database';
execute statement (:TMP_SQLTEXT) into :tmp_guid;
tmp_res = tmp_guid;
str_size = char_length(tmp_guid);
suspend;
end

Commits: 922aa06 3cde9ca FirebirdSQL/fbt-repository@9abc1f1 FirebirdSQL/fbt-repository@6e2a9b9

====== Test Details ======

Wrong results confirmed on WI-T3.0.0.31374.

@firebird-automations
Copy link
Collaborator Author

Modified by: Nickolay Ponomarev (raxta)

description: Same UUID have different size between and after select in execute statement.

Code:

execute block returns (tmp_res varchar(38), str_size integer)
as
declare variable tmp_guid varchar(38);
declare variable tmp_sqltext varchar(300);
begin
tmp_guid = uuid_to_char(gen_uuid());
tmp_res = tmp_guid;
str_size = char_length(tmp_guid);
suspend;
tmp_sqltext = 'select ''' || tmp_guid || ''' from rdb$database';
execute statement (:TMP_SQLTEXT) into :tmp_guid;
tmp_res = tmp_guid;
str_size = char_length(tmp_guid);
suspend;
end

=>

Same UUID have different size between and after select in execute statement. Base locale: UTF8. With WIN1251 all OK.

Code:

execute block returns (tmp_res varchar(38), str_size integer)
as
declare variable tmp_guid varchar(38);
declare variable tmp_sqltext varchar(300);
begin
tmp_guid = uuid_to_char(gen_uuid());
tmp_res = tmp_guid;
str_size = char_length(tmp_guid);
suspend;
tmp_sqltext = 'select ''' || tmp_guid || ''' from rdb$database';
execute statement (:TMP_SQLTEXT) into :tmp_guid;
tmp_res = tmp_guid;
str_size = char_length(tmp_guid);
suspend;
end

@firebird-automations
Copy link
Collaborator Author

Commented by: @dyemanov

What was the connection charset?

@firebird-automations
Copy link
Collaborator Author

Modified by: @dyemanov

security: Developers [ 10012 ] =>

@firebird-automations
Copy link
Collaborator Author

Commented by: Nickolay Ponomarev (raxta)

UTF8 for UTF8 base, WIN1251 for WIN1251 base.

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

I can reproduce in 2.5 with UTF-8.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @asfernandes

Problem also happens in 3.0 with external data source.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Version: 3.0 Alpha 2 [ 10560 ]

Version: 3.0 Beta 1 [ 10332 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

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

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

Fix Version: 2.5.4 [ 10585 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

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

QA Status: Done successfully

Test Details: Wrong results confirmed on WI-T3.0.0.31374.

@firebird-automations
Copy link
Collaborator Author

Modified by: @asfernandes

Link: This issue is duplicated by CORE4825 [ CORE4825 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA615 [ QA615 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment