You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
All following is done with SET AUTODDL ON (default setting).
Test-1:
recreate table t(x int not null);
alter table t add constraint cx check(x>0), drop constraint cx; -- i.e. NO index will be created for this constraint
Result: OK, no errors.
Test-2:
recreate table t(x int not null);
alter table t add constraint t_unq unique(x), drop constraint t_unq;
Result:
2.1) in 2.1.7:
Statement failed, SQLCODE = -607
unsuccessful metadata update
-too few key columns found for index T_UNQ (incorrect column name?)
2.2) in 2.5.5:
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-cannot create index T_UNQ
2.3) in 3.0:
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ALTER TABLE T failed
-CONSTRAINT T_UNQ does not exist.
Similar results will be for
recreate table t(x int not null);
alter table t add constraint t_pk primary key(x), drop constraint t_pk;
and
recreate table t(x int not null);
alter table t add constraint t_pk primary key(x), add constraint t_fk foreign key(x) references t(x), drop constraint t_fk;
PS. Yes, all these statements can be done separately and w/o any errors. I've made this ticket only to illustrate minor problem that exists when ALTER TABLE consists of several statements and some of them cancels previous which are issued in the same statement.
The text was updated successfully, but these errors were encountered:
… raises when attempt to create table with PK and immediatelly drop this PK within the same transaction
This commit also fixesFirebirdSQL#5173 and FirebirdSQL#3886.
The situation when the record is not found in RDB$INDICES was not handled correctly in create_index DFW.
… raises when attempt to create table with PK and immediatelly drop this PK within the same transaction
This commit also fixesFirebirdSQL#5173 and FirebirdSQL#3886.
The situation when the record is not found in RDB$INDICES was not handled correctly in create_index DFW.
Submitted by: @pavel-zotov
Is related to CORE4947
All following is done with SET AUTODDL ON (default setting).
Test-1:
recreate table t(x int not null);
alter table t add constraint cx check(x>0), drop constraint cx; -- i.e. NO index will be created for this constraint
Result: OK, no errors.
Test-2:
recreate table t(x int not null);
alter table t add constraint t_unq unique(x), drop constraint t_unq;
Result:
2.1) in 2.1.7:
Statement failed, SQLCODE = -607
unsuccessful metadata update
-too few key columns found for index T_UNQ (incorrect column name?)
2.2) in 2.5.5:
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-cannot create index T_UNQ
2.3) in 3.0:
Statement failed, SQLSTATE = 42000
unsuccessful metadata update
-ALTER TABLE T failed
-CONSTRAINT T_UNQ does not exist.
Similar results will be for
recreate table t(x int not null);
alter table t add constraint t_pk primary key(x), drop constraint t_pk;
and
recreate table t(x int not null);
alter table t add constraint t_pk primary key(x), add constraint t_fk foreign key(x) references t(x), drop constraint t_fk;
PS. Yes, all these statements can be done separately and w/o any errors. I've made this ticket only to illustrate minor problem that exists when ALTER TABLE consists of several statements and some of them cancels previous which are issued in the same statement.
The text was updated successfully, but these errors were encountered: