Subject | Firebird 2.5 SuperClassic - Can't drop table - A bug? |
---|---|
Author | Thomas Steinmaurer |
Post date | 2010-12-09T12:49:54Z |
Hello,
someone in a German newsgroup reported a problem where he can't drop a
table due to an AFTER INSERT trigger updating records in the same table.
Test case:
CREATE TABLE TESTIT (
ID INTEGER NOT NULL,
SEQ BIGINT NOT NULL,
TEXT VARCHAR(100)
);
SET TERM ^ ;
CREATE OR ALTER TRIGGER TESTIT_AI0 FOR TESTIT
ACTIVE AFTER INSERT POSITION 0
AS
begin
UPDATE TESTIT SET TEXT=new.TEXT WHERE SEQ=new.SEQ and ID<>NEW.ID;
end
^
SET TERM ; ^
commit;
Open a first isql session, connect and execute:
insert into testit values (1, 1, 'Test 1');
commit;
Open a second isql session, connect and execute:
drop table testit;
At this place, the second isql session "hangs", so possibly a deadlock,
object in use thingy or whatever.
I found various open issues in the tracker in respect to object in use
problems etc., but I'm not sure if the above falls into the same category.
Platform: Win7Prof 64-bit, Firebird 2.5 64-bit, SuperClassic.
Thanks!
--
With regards,
Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/
Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!
someone in a German newsgroup reported a problem where he can't drop a
table due to an AFTER INSERT trigger updating records in the same table.
Test case:
CREATE TABLE TESTIT (
ID INTEGER NOT NULL,
SEQ BIGINT NOT NULL,
TEXT VARCHAR(100)
);
SET TERM ^ ;
CREATE OR ALTER TRIGGER TESTIT_AI0 FOR TESTIT
ACTIVE AFTER INSERT POSITION 0
AS
begin
UPDATE TESTIT SET TEXT=new.TEXT WHERE SEQ=new.SEQ and ID<>NEW.ID;
end
^
SET TERM ; ^
commit;
Open a first isql session, connect and execute:
insert into testit values (1, 1, 'Test 1');
commit;
Open a second isql session, connect and execute:
drop table testit;
At this place, the second isql session "hangs", so possibly a deadlock,
object in use thingy or whatever.
I found various open issues in the tracker in respect to object in use
problems etc., but I'm not sure if the above falls into the same category.
Platform: Win7Prof 64-bit, Firebird 2.5 64-bit, SuperClassic.
Thanks!
--
With regards,
Thomas Steinmaurer
Upscene Productions
http://www.upscene.com
http://blog.upscene.com/thomas/
Download LogManager Series, FB TraceManager today!
Continuous Database Monitoring Solutions supporting
Firebird, InterBase, Advantage Database, MS SQL Server
and NexusDB!