-
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.
Browse files
Browse the repository at this point in the history
137738: sql: fix including all related FK tables into the stmt bundle r=yuzefovich a=yuzefovich Earlier this year in 084a741 we made a change to include all tables referencing the table from the stmt bundle (i.e. those that we have an inbound FK relationship with). However, we forgot to include tables that the referencing table is dependent on, so this commit fixes that oversight. Namely, we now include all tables that we reference or that reference us via the FK relationship, and this rule is applied recursively to every table in consideration. (Previously, we didn't include inbound FKs when handling an outbound FK nor outbound FKs when handling an inbound FK.) Note that I believe we could have avoided including referencing tables (i.e. with an inbound FK relationship) that only have NO ACTION or RESTRICT actions in the ON DELETE and ON UPDATE, but I think those cases aren't very common, and it's unlikely to hurt including all "related" tables. The case of FK cycles is still not handled correctly on the stmt bundle recreation, but I think we have yet to run into one in a support ticket. Informs: https://github.com/cockroachlabs/support/issues/3146. Epic: None Release note: None 137739: sql: remove unused dropOwnedByNode r=mgartner a=mgartner `DROP OWNED BY` is supported only in the declarative schema changer and `dropOwnedByNode` is not used, so it has been removed. Epic: None Release note: None 137742: roachtest: use correct warehouse number in import r=yuzefovich a=yuzefovich In 0a94874 we introduced a bug which hard-coded that we'd always use 1 warehouse in tpcc import roachtests. This is now fixed. Epic: None Release note: None 137744: sql: allow CLOSE CURSOR in read-only txns r=yuzefovich a=yuzefovich This is allowed in PG, so we now will allow this too. The fix is similar to what we did for DECLARE and FETCH in 50a7999. Fixes: #137606. Release note (bug fix): CLOSE CURSOR statements are now allowed in read-only transactions, similat to Postgres. The bug has been present since at least 23.1 version. Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Marcus Gartner <[email protected]>
- Loading branch information
Showing
7 changed files
with
47 additions
and
59 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