-
Notifications
You must be signed in to change notification settings - Fork 4.1k
sql: dropping a sequence with a sequence owners corrupts the table that owns the sequence #50649
Copy link
Copy link
Closed
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code 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 lossHigh impact: many users impacted, serious risk of high unavailability or data loss
Description
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.Code 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 lossHigh impact: many users impacted, serious risk of high unavailability or data loss