You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
set term ^;
execute block as
declare n int = 3;
declare c int;
begin
while( n > 0 ) do
begin
execute statement ( 'select x from test where x = ? rows 1' ) ( 123 ) into c;
n = n - 1;
end
end^
set term ;^
quit;
The problem is that now user authentication used the same attachment that is established and attachment's trace manager initialized when current user is unknown.
Trace manager with unknown owner user can't use trace session started by any user.
When second attachment (by the same user) is established the users mapping cache is already populated and trace manager initialized later, when current user is known and confirmed.
Test Details: Checked manually - all OK.
But test can not be imlpemented until one may to restart FB service just before this test run (currently this is not so).
Submitted by: @pavel-zotov
Votes: 1
1. Create following trace config:
database = %[\\/]security4.fdb
{
enabled = false
}
database = #((%[\\/](e40).fdb)|(e40))
{
enabled = true
time_threshold = 0
include_filter = "%(select x from test where x = ?)%"
exclude_filter = "%(execute block)%"
log_statement_finish = true
}
2. ::: NB ::: RESTART Firebird instance.
3. Create .sql:
recreate table test(x int);
insert into test(x) values( 123 );
commit;
set term ^;
execute block as
declare n int = 3;
declare c int;
begin
while( n > 0 ) do
begin
execute statement ( 'select x from test where x = ? rows 1' ) ( 123 ) into c;
n = n - 1;
end
end^
set term ;^
quit;
4. Run trace session
C:\MIX\firebird\fb40\fbtracemgr -sta -c 1runtrace.conf -se localhost/3400:service_mgr
-- and wait until 1st message will appear there:
Trace session ID 1 started
5. Run .sql:
C:\MIX\firebird\fb40\isql localhost/3400:e40 -i test.sql
You will see in the trace window only this two lines (and nothing more):
2017-02-03T09:18:20.7650 (176:00CF25C8) TRACE_INIT
SESSION_1
6. Run .sql again . You will see in the trace window all info that was expected on previous step:
===
2017-02-03T09:19:10.8430 (176:00CF3820) TRACE_INIT
SESSION_1
2017-02-03T09:19:10.9210 (176:00CF3820) EXECUTE_STATEMENT_FINISH
e40 (ATT_99, SYSDBA:NONE, NONE, TCPv4:127.0.0.1/1166)
C:\MIX\firebird\fb40\isql.exe:1424
(TRA_237, CONCURRENCY | WAIT | READ_WRITE)
Statement 109:
-----------------------------------------------------------------
select x from test where x = ? rows 1
param0 = integer, "123"
1 records fetched
0 ms, 2 fetch(es)
PS.
Checked on WI-T4.0.0.519 (01-feb-2017), 32 bit, SuperServer.
It seems that only 4.0 is affected: no such problem on WI-V3.0.2.32677 (31-jan-2017).
Commits: 415fdc4
====== Test Details ======
Checked manually - all OK.
But test can not be imlpemented until one may to restart FB service just before this test run (currently this is not so).
The text was updated successfully, but these errors were encountered: