Using slightly modified test case of
CORE-3011 :
inp.sql
with
nx as
(
select 0 i from rdb$database union all select 1 from rdb$database union all
select 2 from rdb$database union all select 3 from rdb$database union all
select 4 from rdb$database union all select 5 from rdb$database
)
select count(*) from nx n5, nx n4, nx n3, nx n2, nx n1, nx n0 where n5.i+n4.i+n3.i = n2.i+n1.i+n0.i;
select count(*) from mon$attachments;
with
nx as
(
select 0 i from rdb$database union all select 1 from rdb$database union all
select 2 from rdb$database union all select 3 from rdb$database union all
select 4 from rdb$database union all select 5 from rdb$database
)
select count(*) from nx n5, nx n4, nx n3, nx n2, nx n1, nx n0 where n5.i+n4.i+n3.i = n2.i+n1.i+n0.i;
exit;
test.bat
@echo off
SET FB=F:\FB2\fb25.clean\temp\Win32\Release\firebird\bin
SET DB=localhost:%FB%\a.fdb
rem -o out_%%i_%%j.txt
rem -o out_%%i.txt
for /L %%i in (1,1,%1) do (
echo %%i
for /L %%j in (1,1,%2) do start /MIN %FB%\isql %DB% -u SYSDBA -p masterke -i inp.sql -o out_%%i_%%j.txt -m -m2
%FB%\isql %DB% -u SYSDBA -p masterke -i inp.sql -o out_%%i_0.txt -m -m2
)
Run
test 250 25
and look into firebird.log after test ends. It will contain messages such as
Cannot initialize the shared memory region
operating system directive CreateFile failed
Access is denied.
Cannot initialize the shared memory region
operating system directive WaitForSingleObject failed
Cannot create a file when that file already exists.
Cannot initialize the shared memory region
operating system directive CreateFile failed
The process cannot access the file because it is being used by another process.