We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When using the SQL shell, if there is a UNIQUE constraint that is violated due to an INSERT, the table continues to fail for all future writes.
UNIQUE
INSERT
Repro:
$ dolt init Successfully initialized dolt data repository. $ dolt sql # Welcome to the DoltSQL shell. # Statements must be terminated with ';'. # "exit" or "quit" (or Ctrl-D) to exit. doltplay> CREATE TABLE person( -> id INT NOT NULL PRIMARY KEY, -> whole_name VARCHAR(50) UNIQUE, -> age INT -> ); doltplay> INSERT INTO person(id, whole_name, age) VALUES -> (1, 'John Smith', 31), -> (2, 'Jane Cooper', 42), -> (3, 'Kate Lee', 25), -> (4, 'Andrew Black', 37); Query OK, 4 rows affected doltplay> INSERT INTO person(id, whole_name, age) VALUES (5, 'tutu', 45); Query OK, 1 row affected doltplay> SELECT * FROM person; +----+--------------+-----+ | id | whole_name | age | +----+--------------+-----+ | 1 | John Smith | 31 | | 2 | Jane Cooper | 42 | | 3 | Kate Lee | 25 | | 4 | Andrew Black | 37 | | 5 | tutu | 45 | +----+--------------+-----+ doltplay> INSERT INTO person(id, whole_name, age) VALUES (6, 'tutu', 56); Query OK, 1 row affected failed to update indexes doltplay> SELECT * FROM person; +----+--------------+-----+ | id | whole_name | age | +----+--------------+-----+ | 1 | John Smith | 31 | | 2 | Jane Cooper | 42 | | 3 | Kate Lee | 25 | | 4 | Andrew Black | 37 | | 5 | tutu | 45 | +----+--------------+-----+ doltplay> INSERT INTO person(id, whole_name, age) VALUES (6, 'somebody else', 67); Query OK, 1 row affected failed to update indexes doltplay> SELECT * FROM person; +----+--------------+-----+ | id | whole_name | age | +----+--------------+-----+ | 1 | John Smith | 31 | | 2 | Jane Cooper | 42 | | 3 | Kate Lee | 25 | | 4 | Andrew Black | 37 | | 5 | tutu | 45 | +----+--------------+-----+
The text was updated successfully, but these errors were encountered:
Hydrocharged
Successfully merging a pull request may close this issue.
When using the SQL shell, if there is a
UNIQUE
constraint that is violated due to anINSERT
, the table continues to fail for all future writes.Repro:
The text was updated successfully, but these errors were encountered: