|
[
Permalink
| « Hide
]
Sean Leyne added a comment - 19/Sep/12 06:33 PM
The direct manipulation of system tables for the purpose described here is not supported.
Drop the constraint, change the domain and then re-add the constraint.
The issue is reproducible on v2.1.
It can be reproduced with a much smaller (on point) script: CREATE TABLE EVENTS ( ID_EVENT Integer NOT NULL , EVENT_NAME VARCHAR(255) CHARACTER SET WIN1251 NOT NULL COLLATE PXW_CYRL, ID_RE_EVENT Integer ); ALTER TABLE EVENTS ADD CONSTRAINT PK_EVENTS PRIMARY KEY (ID_EVENT); COMMIT; INSERT into events values (10, 'abcdefgh', 0); COMMIT; ALTER TABLE EVENTS ADD CONSTRAINT FK_EVENTS_ANSWERS FOREIGN KEY (ID_RE_EVENT) REFERENCES EVENTS(ID_EVENT) ON DELETE CASCADE ON UPDATE CASCADE; commit; /* violation of FOREIGN KEY constraint "". violation of FOREIGN KEY constraint "FK_EVENTS_ANSWERS" on table "EVENTS". Foreign key reference target does not exist. */ rollback; delete from events; Just checked Sean's script on FB win64 v.3.0rc2
after the last "delete..." statement we still have a bugcheck. SQL> delete from events; Statement failed, SQLSTATE = XX000 internal Firebird consistency check (partner index description not found (175), file: idx.cpp line: 1268) Please, fill the affected versions field with 2.1.7, 2.5.5, 3.0 After i run it in win64 3rc2 isql embedded server mode (fbserver service is not started) after i run this test and after i type "QUIT;" isql crashes with
Имя события проблемы: APPCRASH Имя приложения: isql.exe Версия приложения: 3.0.0.32366 Отметка времени приложения: 56d546bf Имя модуля с ошибкой: Engine12.DLL Версия модуля с ошибкой: 3.0.0.32366 Отметка времени модуля с ошибкой: 56d54715 Код исключения: c0000005 Смещение исключения: 0000000000255927 Версия ОС: 6.1.7601.2.1.0.256.48 Код языка: 1049 Дополнительные сведения 1: b6aa Дополнительные сведения 2: b6aa51008599888f9ba77660493a437d Дополнительные сведения 3: ebb8 Дополнительные сведения 4: ebb884e093773972e3d81a4a78b27908 still crashes FB 3.0.4 x64
Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements. internal Firebird consistency check (partner index description not found (175), file: idx.cpp line: 1273). Unsuccessful execution caused by a system error that precludes successful execution of subsequent statements. internal Firebird consistency check (can't continue after bugcheck). Consequent connections to FDB file lead to kind of random, inconsistent operations. Stopping Firebird Windows service becomes impossible, only killing it. Simplest primer:
create table test(key integer not null primary key, ref integer); insert into test(key,ref) values(1,-1); commit; alter table test add constraint fk_key_ref foreign key (ref) references test(key); delete from test; commit; And - no Firebird hang on service stop/restart (Windows 7 SP1 x64) WI-V3.0.4.33054 Firebird 3.0 WI-V3.0.4.33054 Firebird 3.0/tcp (basid)/P15:C WI-V3.0.4.33054 Firebird 3.0/tcp (basid)/P15:C Database: 'localhost/13040:employee', User: SYSDBA SQL> create table test(key integer not null primary key, ref integer); SQL> insert into test(key,ref) values(1,-1); SQL> commit; SQL> alter table test add constraint fk_key_ref foreign key (ref) references test(key); Statement failed, SQLSTATE = 23000 violation of FOREIGN KEY constraint "FK_KEY_REF" on table "TEST" -Foreign key reference target does not exist -Problematic key value is ("REF" = -1) SQL> delete from test; Statement failed, SQLSTATE = XX000 internal Firebird consistency check (partner index description not found (175), file: idx.cpp line: 1273) SQL> commit; Statement failed, SQLSTATE = XX000 internal Firebird consistency check (can't continue after bugcheck) |