Skip to content

sql: (temporary) Hang when dropping unique index created after ALTER PRIMARY KEY #45150

@andy-kimball

Description

@andy-kimball

Run the following SQL script:

SET experimental_enable_primary_key_changes = true;
CREATE TABLE tdup (x INT PRIMARY KEY, y INT NOT NULL, z INT NOT NULL);
INSERT INTO tdup VALUES (1, 1, 1);
ALTER TABLE tdup ALTER PRIMARY KEY USING COLUMNS (y, z);
DROP INDEX tdup_x_key CASCADE;

EXPECTED: This should switch the primary key to columns (y, z) and drop the unique index synthesized by the ALTER PRIMARY KEY code.

ACTUAL: The DROP INDEX statement hangs.

NOTE: This happens with and without the #45093 fix.

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions