forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: stop mutating AST in AlterPrimaryKey
The code in cockroachdb#61345 added a test that, under stress, nicely revealed a bug. The bug is that we're mutating the AST in place and then, on retries, we hit an error. The fix is to not mutate the AST. I wish I had a more comprehensive testing strategy to ensure this didn't happen. On some level, we could clone the AST when passing it to various DDL plan node constructors. That's very defensive but also probably fine. Another thing that would be cool would be to just assert that after planning the AST did not change. Touches cockroachdb#60824. Release note: None
- Loading branch information
Showing
5 changed files
with
45 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters