-
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/catalog/dbdesc: repair descriptors corrupted due to a dropped schema
This commit adds a mechanism to delete wrong schema-info entries from database descriptors as part of post-deserialization changes. Release note: None
- Loading branch information
Sajjad Rizvi
committed
Aug 14, 2021
1 parent
ee3efd6
commit 2e209bb
Showing
12 changed files
with
126 additions
and
1 deletion.
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
14 changes: 14 additions & 0 deletions
14
pkg/ccl/backupccl/testdata/restore_with_dropped_schema/create.sql
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
-- The below SQL is used to create a backup of a database that | ||
-- contains a corrupted database descriptor. Data is produced | ||
-- using version 20.2.7. This backup is used in | ||
-- TestRestoreWithDroppedSchemaCorruption test. | ||
|
||
CREATE DATABASE foo; | ||
|
||
SET DATABASE = foo; | ||
|
||
CREATE SCHEMA bar; | ||
|
||
DROP SCHEMA bar; | ||
|
||
BACKUP DATABASE foo to 'nodelocal://0/foo_backup'; |
1 change: 1 addition & 0 deletions
1
...restore_with_dropped_schema/exports/v20.2.7/BACKUP-CHECKPOINT-683775825115512833-CHECKSUM
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
���T |
1 change: 1 addition & 0 deletions
1
...backupccl/testdata/restore_with_dropped_schema/exports/v20.2.7/BACKUP-CHECKPOINT-CHECKSUM
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
���T |
Empty file.
Binary file added
BIN
+335 Bytes
pkg/ccl/backupccl/testdata/restore_with_dropped_schema/exports/v20.2.7/BACKUP_MANIFEST
Binary file not shown.
1 change: 1 addition & 0 deletions
1
...l/backupccl/testdata/restore_with_dropped_schema/exports/v20.2.7/BACKUP_MANIFEST-CHECKSUM
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
=�f |
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