-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
118440: sql: add autocommit_before_ddl setting r=rafiss a=rafiss fixes #87236 informs #87233 This setting can be used to improve compatibility with some tools that do not work well due to our limitations with schema changes in explicit transactions. It also can be used to use schema changes under READ COMMITTED more easily, without needing to teach the schema changer about READ COMMITTED. Release note (sql change): Added the autocommit_before_ddl session variable. When set to true, any schema change statement that is sent during an explicit transaction will cause the transaction to commit before executing the schema change. --- ### sql: handle COMMIT outside of txn when autocommit_before_ddl is on With this setting on, COMMIT, ROLLBACK, and other statements that normally cause errors when used outside of an explicit transaction are instead treated as warnings. This is because the setting can cause a transaction to end earlier than an application may expect. ### sql: add hint to use autocommit_before_ddl setting Update the error message returned when using schema changes under READ COMMITTED to hint towards using the autocommit_before_ddl setting. Co-authored-by: Rafi Shamim <rafi@cockroachlabs.com>
- Loading branch information
Showing
14 changed files
with
141 additions
and
29 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
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
Oops, something went wrong.