-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
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
schema: Unexpected error when dropping an index + column, then inserting/upserting #46276
Comments
This is low priority, since it's all in same transaction. But thought I'd file it anyway, in case it's something simple to fix and/or something that might cause more serious effects in some other scenario. |
The actual error reported should be
|
This is a stacktrace:
|
The original unexpected error cockroach/pkg/sql/sqlbase/table.go Line 298 in 3426ece
because |
I'm adding slightly more detail to this issue so that we don't forget what's happening when we revisit it later. The problem is that the writes are happening in a state where column |
Release note (bug fix): If NewUniquenessConstraintViolationError cannot initialize a row fetcher it will only report this error to the client without wrappibng it with information about the actual constraint violation which can be confusing. Old error: `ERROR: column-id "2" does not exist` New Error: ``` ERROR: duplicate key value (b)=(couldn't fetch value: column-id "2" does not exist) violates unique constraint "t_secondary" ``` See cockroachdb#46276.
45831: sql: add a comment that JSON behaviour is similar to JSONB r=jordanlewis a=giorgosp Closes #44465 Release note : None 50369: sql: fix NewUniquenessConstraintViolationError reporting r=spaskob a=spaskob Release note (bug fix): If NewUniquenessConstraintViolationError cannot initialize a row fetcher it will only report this error to the client without wrapping it with information about the actual constraint violation. This is confusing. See #46276. Old error: `ERROR: column-id "2" does not exist` New Error: ``` ERROR: duplicate key value (b)=(couldn't fetch value: column-id "2" does not exist) violates unique constraint "t_secondary" ``` 50744: sql: fix drop database - sequence ownership bug r=solongordon a=arulajmani Previously, `DROP DATABASE CASCADE` would not work if the database contained a sequence owned by a table in the database. This would happen because of two separate reasons: - If the sequence was dropped before the table, the table would try to "double drop" the sequence as it owned it; this would result in an error. - If the table was dropped before the sequence, the sequence would try to remove the ownership dependency from the table descriptor, which had already been dropped; this would also result in an error. This PR addresses both these issues separately. Sequences are no longer double dropped when dropping tables. Additionally, no attempt is made to remove the ownership dependency from the table descriptor if the table descriptor has already been dropped. Fixes #50712 Release note (bug fix): `DROP DATABASE CASCADE` now works as expected even when the database has a sequence with an owner in it. 50961: cmd/roachtest: fix --zones flag to work on AWS r=petermattis a=petermattis Previously the `--zones` flag only worked on GCE and Azure and was silently ignored on AWS. Noticed in passing while trying to run a roachtest on a different AWS zone. Release note: None 51000: acceptance: skip TestDockerCLI/test_demo_partitioning r=knz a=tbg See: #50970 Release note: None Co-authored-by: George Papadrosou <[email protected]> Co-authored-by: Spas Bojanov <[email protected]> Co-authored-by: arulajmani <[email protected]> Co-authored-by: Peter Mattis <[email protected]> Co-authored-by: Tobias Schottdorf <[email protected]>
REPRO:
EXPECTED: No error.
Jira issue: CRDB-5097
The text was updated successfully, but these errors were encountered: