Describe the bug
When a table with an auto_increment column is dropped, the corresponding sequence created for this column is not dropped. This results in at least one left-over dependency of this sequence on the schema to which the table belonged. So the schema can't be dropped.
Also, this implicit sequence can't be dropped with drop sequence seq_nnnn, so there seems to be no way to clean up this.
To Reproduce
create schema s1;
create table s1.t (i int not null auto_increment);
drop table s1.t;
drop schema s1; -- DROP SCHEMA: unable to drop schema 's1' (there are database objects which depend on it)
select sq.id as sequence_id, sq.name as sequence_name, sc.id as schema_id, sc.name as schema_name from sequences sq, schemas sc where sq.schema_id = sc.id; -- shows the left-over dependency
Expected behavior
The auto_increment sequence should have been removed as part of the drop table, and drop schema s1 should succeed.
Software versions
MonetDB version number [v11.39.8 (hg id: e6eb722152e3)]
OS and version: [e.g. Ubuntu 20.04]
Mercurial source
The text was updated successfully, but these errors were encountered:
Describe the bug
When a table with an
auto_incrementcolumn is dropped, the correspondingsequencecreated for this column is not dropped. This results in at least one left-over dependency of thissequenceon the schema to which the table belonged. So the schema can't be dropped.Also, this implicit sequence can't be dropped with
drop sequence seq_nnnn, so there seems to be no way to clean up this.To Reproduce
Expected behavior
The
auto_incrementsequence should have been removed as part of thedrop table, anddrop schema s1should succeed.Software versions
The text was updated successfully, but these errors were encountered: