forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 1
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
45347: sql: make secondary indexes not write empty k/v's + bugfixes for primary key changes r=jordanlewis a=rohany Fixes cockroachdb#45223. Depends on cockroachdb#45226 to land first. This PR fixes many bugs around secondary index encodings and CRUD operations k/v reads and writes. * Fixes a problem secondary indexes would write empty k/v's if it contained a family that had all null values. * Fix multiple bugs where updates to a table during an online primary key change could result an inconsistent new primary key. * Fix an assumption in the updater that assumed indexes always had the same number of k/v's. The logic has been updated to perform a sort of merge operation to decide what k/v's to insert/delete during the update operation. * Increased testing around secondary indexes k/vs and schema change operations. The release note is None because these are all bugs introduced in 20.1. Release note: None 45502: sql: allow rename database for sequences without a db name reference r=rohany a=otan Resolves immediate concern from cockroachdb#45411 Refs: cockroachdb#34416 See release note for description. This PR should be included ahead of the more "general" fix of changing the DefaultExpr with the new database as it unblocks people using `experimental_serial_normalization=sql_sequence` from using the database rename feature. Release note (sql change): Previously, when we renamed a database, any table referencing a sequence would be blocked from being able to rename the table. This is to block cases where if the table's reference to the sequence contains the database name, and the database name changes, we have no way of overwriting the table's reference to the sequence in the new database. However, if no database name is included in the sequence reference, we should continue to allow the database to rename, as is implemented with this change. Co-authored-by: Rohan Yadav <rohany@alumni.cmu.edu> Co-authored-by: Oliver Tan <otan@cockroachlabs.com>
- Loading branch information
Showing
16 changed files
with
824 additions
and
79 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
Oops, something went wrong.