firebird
firebird copied to clipboard
The newly created users are not visible to execute statement in Classic / SuperClassic on Linux
The script below works in 3.0 (all architectures) and in 4+ (Supersever only). But 4+ Classic and Superclassic on Linux fail with the error "Your user name and password are not defined. Ask your database administrator to set up a Firebird login.". Although it will work fine if we wait 10 seconds before execute block.
create user test password 'test';
commit;
set term ^;
create or alter procedure sp_main(a_usr varchar(31), a_pwd varchar(31))
returns(x int) as
begin
for
execute statement
'select 1 from rdb$database'
as user a_usr password a_pwd into x
do
suspend;
end
^
set term ;^
commit;
grant execute on procedure sp_main to test;
commit;
-- wait 10 seconds and it will work
set term ^;
execute block returns(x int) as
begin
for execute statement ('select * from sp_main(:u, :p)') ( u := 'test', p := 'test' )
into x
do suspend;
end
^
set term ;^
commit;
drop user test;
commit;
Confirmed an issue
Renamed issue because actual error has much wider scope
QA issue: see notes in the test.