Open arpang opened 6 days ago
Simpler repro:
CREATE TABLE pk(a int primary key);
INSERT INTO pk values (1);
CREATE TABLE fk(a int);
INSERT INTO fk values (2);
ALTER TABLE fk ADD FOREIGN KEY (a) REFERENCES pk; -- fails due to FK constraint violation
BEGIN;
SELECT * from pk; -- throws schema mismatch error
COMMIT;
Jira Link: DB-14126
Description
With revision D37933, FK referencing partitioned tables will be supported for YB. Consider the following example which is expected to work with that.
The last two alters are expected to throw "removing partition violates foreign key constraint". But the last alter throws "schema version mismatch" error.
Issue Type
kind/bug
Warning: Please confirm that this issue does not contain any sensitive information