-
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.
backupccl: explicitly parse SHOW BACKUP options
Fixes: #82912 Release note (sql change): Previously, SHOW BACKUP options would get parsed as `kv_options`, which meant that a user could not pass multiple values to a show backup option, causing feature gaps in SHOW BACKUP relative to BACKUP and RESTORE. This patch rewrites the show backup option parser, closing the following feature gaps: 1. A user can now pass and check multiple KMS URIs in SHOW BACKUP 2. A user can pass locality aware incremental_locations, allowing a user to also pass the check_files parameter to a locality aware backup chain that also specifies the backup incremental location. Note that while this patch introduces a couple new words to the CRDB SQL syntax, the same SHOW BACKUP options should remain documented, specifically: - [public option] -> value - AS_JSON -> N/A - CHECK_FILES -> N/A - INCREMENTAL_LOCATION -> string, with potentially multiple uris - DEBUG_IDS -> N/A - KMS -> string, with potentially multiple uris - PRIVILEGES -> N/A - ENCRYPTION_PASSPHRASE -> string
- Loading branch information
Showing
9 changed files
with
427 additions
and
165 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,9 @@ | ||
show_backup_stmt ::= | ||
'SHOW' 'BACKUPS' 'IN' location_opt_list | ||
| 'SHOW' 'BACKUP' show_backup_details 'FROM' string_or_placeholder 'IN' string_or_placeholder_opt_list 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' show_backup_details 'FROM' string_or_placeholder 'IN' string_or_placeholder_opt_list 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' show_backup_details 'FROM' string_or_placeholder 'IN' string_or_placeholder_opt_list | ||
| 'SHOW' 'BACKUP' subdirectory 'IN' location_opt_list 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' subdirectory 'IN' location_opt_list 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' subdirectory 'IN' location_opt_list | ||
| 'SHOW' 'BACKUP' string_or_placeholder 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' string_or_placeholder 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' string_or_placeholder | ||
| 'SHOW' 'BACKUP' 'SCHEMAS' location 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' 'SCHEMAS' location 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' 'SCHEMAS' location | ||
| 'SHOW' 'BACKUP' 'FILES' string_or_placeholder 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' 'FILES' string_or_placeholder 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' 'FILES' string_or_placeholder | ||
| 'SHOW' 'BACKUP' 'RANGES' string_or_placeholder 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' 'RANGES' string_or_placeholder 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' 'RANGES' string_or_placeholder | ||
| 'SHOW' 'BACKUP' 'VALIDATE' string_or_placeholder 'WITH' kv_option_list | ||
| 'SHOW' 'BACKUP' 'VALIDATE' string_or_placeholder 'WITH' 'OPTIONS' '(' kv_option_list ')' | ||
| 'SHOW' 'BACKUP' 'VALIDATE' string_or_placeholder | ||
| 'SHOW' 'BACKUP' show_backup_details 'FROM' string_or_placeholder 'IN' string_or_placeholder_opt_list opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' subdirectory 'IN' location_opt_list opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' string_or_placeholder opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' 'SCHEMAS' location opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' 'FILES' string_or_placeholder opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' 'RANGES' string_or_placeholder opt_with_show_backup_options | ||
| 'SHOW' 'BACKUP' 'VALIDATE' string_or_placeholder opt_with_show_backup_options |
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.