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-issue-importer opened this issue Nov 11, 2014 · 12 comments
Closed

Comments

@firebird-issue-importer

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 11, 2014

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 11, 2014

Commented by: @dyemanov

What was the connection charset?

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 11, 2014

Modified by: @dyemanov

security: Developers [ 10012 ] =>

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 11, 2014

Commented by: Nickolay Ponomarev (raxta)

UTF8 for UTF8 base, WIN1251 for WIN1251 base.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 11, 2014

Commented by: @asfernandes

I can reproduce in 2.5 with UTF-8.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 11, 2014

Modified by: @asfernandes

assignee: Adriano dos Santos Fernandes [ asfernandes ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 11, 2014

Commented by: @asfernandes

Problem also happens in 3.0 with external data source.

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 11, 2014

Modified by: @asfernandes

Version: 3.0 Alpha 2 [ 10560 ]

Version: 3.0 Beta 1 [ 10332 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Nov 12, 2014

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented May 27, 2015

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-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Jun 8, 2015

Modified by: @asfernandes

Link: This issue is duplicated by CORE4825 [ CORE4825 ]

@firebird-issue-importer
Copy link
Author

@firebird-issue-importer firebird-issue-importer commented Sep 25, 2015

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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants