Skip to content
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

release-20.1: sql: fix bug dropping shard column which is not the last column #55823

Merged
merged 1 commit into from
Nov 18, 2020

Conversation

ajwerner
Copy link
Contributor

Backport 1/1 commits from #55766.

/cc @cockroachdb/release


The bug was due to the fact that we were passing around the column descriptor
as a pointer to an entry in the Columns slice. When we overwrote that slice
we'd clobber the descriptor and, in the process, muck up the mutation which
pointed to it. We should look for more bugs like this. Prior to this change
the added logic test would fail with the below error:

testdata/logic_test/hash_sharded_index:589:
expected success, but found
(XXUUU) family "fam_1_k_j" contains unknown column "4"

Release note (bug fix): Fixed a bug which would prevent the dropping of hash
sharded indexes if they were added prior to other columns.

@cockroach-teamcity
Copy link
Member

This change is Reviewable

The bug was due to the fact that we were passing around the column descriptor
as a pointer to an entry in the `Columns` slice. When we overwrote that slice
we'd clobber the descriptor and, in the process, muck up the mutation which
pointed to it. We should look for more bugs like this. Prior to this change
the added logic test would fail with the below error:

```
testdata/logic_test/hash_sharded_index:589:
expected success, but found
(XXUUU) family "fam_1_k_j" contains unknown column "4"
```

Release note (bug fix): Fixed a bug which would prevent the dropping of hash
sharded indexes if they were added prior to other columns.
@ajwerner ajwerner merged commit fb3e12f into cockroachdb:release-20.1 Nov 18, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants