Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Describe the bug The PRIMARY KEY constraint is ignored when the server restarts, allowing multiples rows with the same key.
To Reproduce
Create a table with primary key
CREATE TABLE Test (k int PRIMARY KEY, v int); \d Test CREATE TABLE "sys"."test" ( "k" INTEGER NOT NULL, "v" INTEGER, CONSTRAINT "test_k_pkey" PRIMARY KEY ("k") );
Check that the PRIMARY KEY constraint is respected:
INSERT INTO Test VALUES(1, 1); 1 affected row INSERT INTO Test VALUES(1, 1); INSERT INTO: PRIMARY KEY constraint 'test.test_k_pkey' violated
Restart the server
Check that the PRIMARY KEY constraint is ignored:
\d Test CREATE TABLE "sys"."test" ( "k" INTEGER NOT NULL, "v" INTEGER, CONSTRAINT "test_k_pkey" PRIMARY KEY ("k") -- still here ); INSERT INTO Test VALUES(1, 1); 1 affected row INSERT INTO Test VALUES(1, 1); 1 affected row INSERT INTO Test VALUES(1, 1); 1 affected row SELECT * FROM Test; +------+------+ | k | v | +======+======+ | 1 | 1 | | 1 | 1 | | 1 | 1 | | 1 | 1 | +------+------+
Software versions
The text was updated successfully, but these errors were encountered:
I can reproduce this with Jan2022-SP1
Sorry, something went wrong.
Added test for bug #7263 Looking into it
926099a
Fix for bug #7263 Don't set a hash index as 'no_idx'
7c92507
No branches or pull requests
Describe the bug
The PRIMARY KEY constraint is ignored when the server restarts, allowing multiples rows with the same key.
To Reproduce
Create a table with primary key
Check that the PRIMARY KEY constraint is respected:
Restart the server
Check that the PRIMARY KEY constraint is ignored:
Software versions
The text was updated successfully, but these errors were encountered: