Subject Deadlock during Alter Table
Author burmair
My original schema had a composite primary key (columns FV_UUID and
FV_ROW) for table VALUE_BUNDLE. I changed the schema to use a single
column (UUID) as the primary key. I used Database Comparer V3.2 (from
Clever Components) to compare the original and revised schemas, and
generate a script that will update a DB with the original schema to
the new schema. When running the script, isql reports a deadlock when
trying to execute the Alter Table command. Here's the isql log:

========================
/* Server version: WI-V6.3.3.12981 Firebird 2.0
SQLDialect: 3. ODS: 11.0. Forced writes: On. Sweep inteval: 20000.
Page size: 16384. Cache pages: 2048 (32768 Kb). Read-only: False. */
SET NAMES UTF8;

SET SQL DIALECT 3;

SET AUTODDL ON;

ALTER TABLE VALUE_BUNDLE DROP CONSTRAINT INTEG_28;

/* Alter Field (Null / Not Null)... */
UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = 1 WHERE
RDB$FIELD_NAME='UUID' AND RDB$RELATION_NAME='VALUE_BUNDLE';

/* Alter Field (Null / Not Null)... */
UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = NULL WHERE
RDB$FIELD_NAME='FV_UUID' AND RDB$RELATION_NAME='VALUE_BUNDLE';

/* Alter Field (Null / Not Null)... */
UPDATE RDB$RELATION_FIELDS SET RDB$NULL_FLAG = NULL WHERE
RDB$FIELD_NAME='FV_ROW' AND RDB$RELATION_NAME='VALUE_BUNDLE';


/* Create Primary Key... */
ALTER TABLE VALUE_BUNDLE ADD PRIMARY KEY (UUID);
Statement failed, SQLCODE = -913
deadlock
=====================

Can anyone tell me what the problem is here?