Unable to connect to database when DML with multiple delete+insert statements
is runnning. Also can`t forcely delete this attachment.
-------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-4632
URL: http://tracker.firebirdsql.org/browse/CORE-4632
Project: Firebird Core
Issue Type: Bug
Affects Versions: 2.5.3
Reporter: Pavel Zotov
LI-V2.5.3.26790, SuperClassic.
Script (file = 'del_ins.sql'):
=====
recreate global temporary table gtt(id int) on commit delete rows;
commit;
select current_timestamp start_msg from rdb$database;
set term ^;
execute block as
declare n int = 20000;
declare i int = 0;
begin
while( i < n) do begin
i = i + 1;
delete from gtt;
insert into gtt(id) values(:i);
end
end
^ set term ;^
select current_timestamp finish_msg from rdb$database;
commit;
Test N1
----------
Session #1
isql 192.168.0.220/3252:oltp25 -i del_ins.sql
Session #2
isql 192.168.0.220/3252:oltp25
Result: session #2 can NOT attach to database until session #1 will finish its
work.
Test N2
----------
Session #1
isql 192.168.0.220/3252:oltp25
SQL> _
Session #2
isql 192.168.0.220/3252:oltp25 -i del_ins.sql
... start work ...
Session #1
SQL> set list on; commit; select * from mon$attachments where
mon$attachment_id<>current_connection;
MON$ATTACHMENT_ID 1767
MON$SERVER_PID 28096
MON$STATE 1
MON$ATTACHMENT_NAME oltp25
MON$USER SYSDBA
MON$ROLE NONE
MON$REMOTE_PROTOCOL TCPv4
MON$REMOTE_ADDRESS 192.168.43.96
MON$REMOTE_PID 1680
MON$CHARACTER_SET_ID 0
MON$TIMESTAMP 2014-12-04 15:29:17.4160
MON$GARBAGE_COLLECTION 1
MON$REMOTE_PROCESS C:\MIX\firebird\fb25\bin\isql.exe
MON$STAT_ID 6
SQL> commit; delete from mon$attachments where
mon$attachment_id<>current_connection; commit;
Result: session #1 can NOT forcely detach session #2 until it finish its work.
PS. No such problem in Firebird 3.0.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://tracker.firebirdsql.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel