-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sql: disallow some schema changes in transactions
Not all schema changes require extra work after executing in a transaction. For example CREATE TABLE without foreign keys goes into effect immediately. This change affects schema changes that require extra work after the transaction they are in is committed. e.g. CREATE INDEX, DROP TABLE, etc. This change affects these types of schema changes in the following way: 1. any statement in the same txn following a schema change that requires further work, is disallowed. Since the schema change is not really complete, running a statement after it makes no sense. 2. A schema change that requires further work is allowed at the end of a transaction IIF the preceeding statements in the transaction are READ_ONLY. This is because the schema change needs to anchor the transaction on the system range, and it is unable to do so thanks to #7570 fixes #14280
- Loading branch information
1 parent
1ff15ce
commit 45614b6
Showing
5 changed files
with
83 additions
and
125 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