forked from cockroachdb/cockroach
-
Notifications
You must be signed in to change notification settings - Fork 0
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
59410: sql: change SHOW ZONE CONFIGURATION to use FROM instead of FOR r=otan a=andyyang890 The SHOW ZONE CONFIGURATION statements were changed to use FROM instead of FOR to standardize the use of FROM with SHOW. Refs: cockroachdb#57638 Release note (sql change): This patch overrides the release note added in cockroachdb#58740. The SHOW ZONE CONFIGURATION statement has been changed to use FROM instead of FOR. 59730: backupccl: fix rare failure in reading backup file r=dt a=pbardea BackupManifests are compresed when written to ExternalStorage. When reading backup manifests, we check if the content type indicates that the backup manifest is compressed (and thus needs to be decompressed). We do this because some previous backups were not compressed, so backup needs to be able to detect if the backup manfiest has been compressed. However, very rarely (1 in 60000 attempts in my case), the compressed data might be detected as "application/vnd.ms-fontobject", rather than a gzipped file. This causes backup to not decompress the file, and thus try to unmarshall the compressed data. The file is misdetected because the defined sniffing algorithm in http.DetectContentType first looks at the 35th byte to see if it matches a "magic pattern", before checking if the data is in gzip format. And, sometimes, the 35th byte happens to match up. This commit updates the check so that we only check if the GZip magic bytes header is present or not, rather than checking all possible content types. The gzip header is not expected to conflict with the first 6 bytes of normally generated protobuf messages that are compressed. Closes cockroachdb#59685. Closes cockroachdb#54550. Release note (bug fix): Fixes a bug where backups would fail with an error when trying to read a backup that was written. Co-authored-by: Andy Yang <[email protected]> Co-authored-by: Paul Bardea <[email protected]>
- Loading branch information
Showing
7 changed files
with
78 additions
and
75 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,14 +1,14 @@ | ||
show_zone_stmt ::= | ||
'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'RANGE' zone_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'DATABASE' database_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'TABLE' table_name 'PARTITION' partition_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'TABLE' table_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'PARTITION' partition_name 'OF' 'TABLE' table_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'INDEX' table_name '@' index_name 'PARTITION' partition_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'INDEX' table_name '@' index_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'INDEX' standalone_index_name 'PARTITION' partition_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'INDEX' standalone_index_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'PARTITION' partition_name 'OF' 'INDEX' table_name '@' index_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' for_or_from 'PARTITION' partition_name 'OF' 'INDEX' standalone_index_name | ||
'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'RANGE' zone_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'DATABASE' database_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'TABLE' table_name 'PARTITION' partition_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'TABLE' table_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'PARTITION' partition_name 'OF' 'TABLE' table_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'INDEX' table_name '@' index_name 'PARTITION' partition_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'INDEX' table_name '@' index_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'INDEX' standalone_index_name 'PARTITION' partition_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'INDEX' standalone_index_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'PARTITION' partition_name 'OF' 'INDEX' table_name '@' index_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATION' from_with_implicit_for_alias 'PARTITION' partition_name 'OF' 'INDEX' standalone_index_name | ||
| 'SHOW' 'ZONE' 'CONFIGURATIONS' | ||
| 'SHOW' 'ALL' 'ZONE' 'CONFIGURATIONS' |
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