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

rdb$set_context does NOT allow to overwrite any vars after encountering limit (default=1000) of them [CORE2969] #3351

Closed
firebird-automations opened this issue Apr 16, 2010 · 6 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

Is related to QA278

It is impossible to OVERWRITE any of previously assigned context variable if the number of them reaches the hard-coded limit (1000).
The following code will finished Ok only for the FIRST run. The error "Too many context variables" will occur if we run it second time - even if the limit will be decreased:

execute block returns(was_overwritten int, ctx_key varchar(30), ctx_val varchar(30))
as
declare variable k int;
begin
k = 0;
while (k < 1000) do
begin
ctx_key = 'var_' || k;

was\_overwritten=rdb$set\_context\('USER\_SESSION', :ctx\_key, rand\(\)\);
ctx\_val = rdb$get\_context\('USER\_SESSION', :ctx\_key\);
suspend;

k = k \+ 1;

end
end

Commits: c07eebd FirebirdSQL/fbt-repository@2488814

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

assignee: Vlad Khorsun [ hvlad ]

@firebird-automations
Copy link
Collaborator Author

Commented by: @hvlad

The fix was backported from v2.5 where it was fixed already

@firebird-automations
Copy link
Collaborator Author

Modified by: @hvlad

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

resolution: Fixed [ 1 ]

Fix Version: 2.1.4 [ 10361 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pcisar

Link: This issue is related to QA278 [ QA278 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pmakowski

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

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Closed [ 6 ] => Closed [ 6 ]

QA Status: Done successfully

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

No branches or pull requests

2 participants