Issue Details (XML | Word | Printable)

Key: CORE-2969
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Vlad Khorsun
Reporter: Pavel Zotov
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

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

Created: 16/Apr/10 09:02 AM   Updated: 20/Jul/15 06:20 AM
Component/s: Engine
Affects Version/s: 2.1.3
Fix Version/s: 2.1.4

Issue Links:

QA Status: Done successfully

 Description  « Hide
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))
  declare variable k int;
  k = 0;
  while (k < 1000) do
    ctx_key = 'var_' || k;

    was_overwritten=rdb$set_context('USER_SESSION', :ctx_key, rand());
    ctx_val = rdb$get_context('USER_SESSION', :ctx_key);

    k = k + 1;

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Vlad Khorsun added a comment - 16/Apr/10 10:43 AM
The fix was backported from v2.5 where it was fixed already