Skip to content

Commit 99c4dbc

Browse files
committed
parser: add SHOW BACKUP...NOWAIT hidden alias for SKIP SIZE
SKIP SIZE cannot backport to 22.2 due to 22.2 using string k/v options, rather than first class syntax. NOWAIT is added as a hidden alias that will be able to be used in both 23.1 backports and a 22.2 backport, as the single keyword will also be usable as a string k/v in in the old option parsing. Release note: none. Epic: none.
1 parent 142b971 commit 99c4dbc

File tree

2 files changed

+21
-0
lines changed

2 files changed

+21
-0
lines changed

pkg/sql/parser/sql.y

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7665,6 +7665,11 @@ show_backup_options:
76657665
{
76667666
$$.val = &tree.ShowBackupOptions{SkipSize: true}
76677667
}
7668+
| NOWAIT
7669+
{
7670+
/* SKIP DOC */
7671+
$$.val = &tree.ShowBackupOptions{SkipSize: true}
7672+
}
76687673
| DEBUG_IDS
76697674
{
76707675
$$.val = &tree.ShowBackupOptions{DebugIDs: true}

pkg/sql/parser/testdata/show

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2059,3 +2059,19 @@ SHOW BACKUP 'family' IN ('string', 'placeholder', 'placeholder', 'placeholder',
20592059
SHOW BACKUP ('family') IN (('string'), ('placeholder'), ('placeholder'), ('placeholder'), ('string'), ('placeholder'), ('string'), ('placeholder')) WITH incremental_location = ('nullif'), privileges, debug_dump_metadata_sst -- fully parenthesized
20602060
SHOW BACKUP '_' IN ('_', '_', '_', '_', '_', '_', '_', '_') WITH incremental_location = '_', privileges, debug_dump_metadata_sst -- literals removed
20612061
SHOW BACKUP 'family' IN ('string', 'placeholder', 'placeholder', 'placeholder', 'string', 'placeholder', 'string', 'placeholder') WITH incremental_location = 'nullif', privileges, debug_dump_metadata_sst -- identifiers removed
2062+
2063+
parse
2064+
SHOW BACKUP 'abc' WITH SKIP SIZE
2065+
----
2066+
SHOW BACKUP 'abc' WITH skip size -- normalized!
2067+
SHOW BACKUP ('abc') WITH skip size -- fully parenthesized
2068+
SHOW BACKUP '_' WITH skip size -- literals removed
2069+
SHOW BACKUP 'abc' WITH skip size -- identifiers removed
2070+
2071+
parse
2072+
SHOW BACKUP 'abc' WITH NOWAIT
2073+
----
2074+
SHOW BACKUP 'abc' WITH skip size -- normalized!
2075+
SHOW BACKUP ('abc') WITH skip size -- fully parenthesized
2076+
SHOW BACKUP '_' WITH skip size -- literals removed
2077+
SHOW BACKUP 'abc' WITH skip size -- identifiers removed

0 commit comments

Comments
 (0)