SQLite

View Ticket
Login
Ticket Hash: bc8d94f0fbd633fd9a051e385022190e3f5511ee
Title: RENAME COLUMN fails on tables with redundant UNIQUE constraints
Status: Fixed Type: Code_Defect
Severity: Severe Priority: Immediate
Subsystem: Unknown Resolution: Fixed
Last Modified: 2019-01-09 02:04:12
Version Found In: 3.26.0
User Comments:
drh added on 2019-01-09 01:51:02:

If a CREATE TABLE statement has redundant UNIQUE constraints, then an ALTER TABLE RENAME COLUMN fails.

CREATE TABLE t1(aaa, UNIQUE(aaA), UNIQUE(aAa), UNIQUE(aAA), CHECK(Aaa>0));
ALTER TABLE t1 RENAME aaa TO bbb; --- fails


drh added on 2019-01-09 02:04:12:

The problem was detected by a fuzzer run by the Chrome developers. There have been no reports of this problem causing problems in the wild, perhaps because few applications have redundant UNIQUE constraints.