Issue Details (XML | Word | Printable)

Key: CORE-185
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Alexander Peshkov
Reporter: boris00
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Firebird Core

DB crashes if trigger BU deletes own row

Created: 16/Jul/02 12:00 AM   Updated: 14/Jun/06 09:32 AM
Component/s: Engine
Affects Version/s: None
Fix Version/s: 1.5.0

Time Tracking:
Not Specified

SF_ID: 582425


 Description  « Hide
SFID: 582425#
Submitted By: boris00

Let's crash a DB together!

-------------------------- snipsnap ------------------------

/*
Attention: This test crashes the database.
Error "internal gds software consistency check (wrong record length
(183))"
will be raised
The database can't be used anymore without having it fixed before!
*/
 
/* Step 1: DDL */

SET SQL DIALECT 3;
 
CREATE DATABASE 'bstest.gdb' PAGE_SIZE 1024
 DEFAULT CHARACTER SET ISO8859_1;

CREATE TABLE "TEST" ("ID" INTEGER NOT NULL
);

COMMIT WORK;
SET AUTODDL OFF;
SET TERM ^ ;

CREATE TRIGGER "TEST_BU" FOR "TEST"
ACTIVE BEFORE UPDATE POSITION 0
AS
BEGIN
        delete from "TEST" where id=old.id;
END ^

COMMIT WORK ^
SET TERM ; ^


/* Step 2: DML */

insert into "TEST" values (1);
insert into "TEST" values (2);
insert into "TEST" values (3);
insert into "TEST" values (4);
insert into "TEST" values (5);
insert into "TEST" values (6);
commit;

/* fine so far */

update "TEST" set id=-1 where id=1;
rollback; /* error */

 All   Comments   Work Log   Change History   Version Control   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.