Skip to content

sql: dropping a sequence with a sequence owners corrupts the table that owns the sequence #50649

@jordanlewis

Description

@jordanlewis

Repro:

root@:26257/defaultdb> create table a (a int primary key);
CREATE TABLE

Time: 49.454ms

root@:26257/defaultdb> create sequence foo owned by a.a;
CREATE SEQUENCE

Time: 162.234ms

root@:26257/defaultdb> drop sequence foo;
DROP SEQUENCE

Time: 251.705ms

root@:26257/defaultdb> drop table a;
ERROR: table is being dropped

It looks like there is no code to remove the sequence owner ID from the column descriptor that owns the sequence when the sequence is dropped.

Metadata

Metadata

Labels

C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.S-1High impact: many users impacted, serious risk of high unavailability or data loss

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions