Skip to content

Commit f153ff2

Browse files
craig[bot]yuzefovichkvolichengxiong-ruanAndrew Baptist
committed
107279: sql: remove isInternalPlanner boolean r=yuzefovich a=yuzefovich This boolean is very confusing and can mislead people, so let's remove it. It was introduced in bf9ffe9 with one specific use case in mind: lease management for user defined types when the execution flow occurs in the context of a user transaction. In that scenario, the execution engine uses the planner's `descs.Collection` when running the local plan. However, I don't see the reason why we cannot do the same thing for queries outside of the user transaction (where we have the "internal planner" object), so this commit removes that extra conditional. That said, I don't quite understand how these things work, but we can always go back to not using the planner's collection for "internal planners" (we'd name the boolean differently though) if we see any fallout. Epic: None Release note: None 107834: roachtest: require stability in rebalance by load roachtests r=andrewbaptist a=kvoli The `rebalance/by-load` roachtests collect timeseries data from the cluster. If these tests started quickly enough, no datapoints could exist which would cause a out of bounds array exception. Handle the no datapoints case, and log a message without failing the test. Informs: cockroachdb#107247 ---- The `rebalance/by-load` roachtests would immediately pass once the balance target was hit. However, it was possible that the cluster was only transiently balanced. Bump the timeout of all tests to be uniformly 10 minutes, from a previous 5 minutes, require that the load remains balanced for at least 1 minute to pass. Informs: cockroachdb#107247 Release note: None 107892: sql: fix formatting of import, backup and create tenant r=chengxiong-ruan a=chengxiong-ruan Informs: cockroachdb#99185 This commit cherry-picked changes from cockroachdb#107723 and add fixes for formatting `EXPORT` and `CHANGEFEED` options. Release note: None 107955: roachtest: increase the concurrency for gracefuldraining r=kvoli a=andrewbaptist This set of commits changes gracefuldraining to use the `measureQPS` method instead of looking at the stats from the stats database and additionally increases the concurrency so it no longer fails. Co-authored-by: Yahor Yuzefovich <[email protected]> Co-authored-by: Austen McClernon <[email protected]> Co-authored-by: Chengxiong Ruan <[email protected]> Co-authored-by: Andrew Baptist <[email protected]>
5 parents 70a5801 + b84f2fd + e1f4739 + 2468ed7 + 260ed7a commit f153ff2

40 files changed

+434
-1455
lines changed

pkg/ccl/backupccl/alter_backup_schedule_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,8 +133,8 @@ INSERT INTO t1 values (1), (10), (100);
133133
require.Equal(t, []string{"PAUSED: Waiting for initial backup to complete", "ACTIVE"}, statuses)
134134
require.Equal(t, []string{"@daily", "@weekly"}, schedules)
135135
require.Equal(t, []string{
136-
"BACKUP TABLE mydb.public.t1 INTO LATEST IN 'nodelocal://1/backup/alter-schedule' WITH detached",
137-
"BACKUP TABLE mydb.public.t1 INTO 'nodelocal://1/backup/alter-schedule' WITH detached",
136+
"BACKUP TABLE mydb.public.t1 INTO LATEST IN 'nodelocal://1/backup/alter-schedule' WITH OPTIONS (detached)",
137+
"BACKUP TABLE mydb.public.t1 INTO 'nodelocal://1/backup/alter-schedule' WITH OPTIONS (detached)",
138138
},
139139
backupStmts)
140140

pkg/ccl/backupccl/backup_test.go

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ func TestBackupAndRestoreJobDescription(t *testing.T) {
808808
sqlDB.Exec(t, "BACKUP TO ($1,$2,$3) INCREMENTAL FROM $4", append(incrementals, backups[0])...)
809809
sqlDB.Exec(t, "BACKUP INTO ($1, $2, $3)", collections...)
810810
sqlDB.Exec(t, "BACKUP INTO LATEST IN ($1, $2, $3)", collections...)
811-
sqlDB.Exec(t, "BACKUP INTO LATEST IN ($1, $2, $3) WITH incremental_location = ($4, $5, $6)",
811+
sqlDB.Exec(t, "BACKUP INTO LATEST IN ($1, $2, $3) WITH OPTIONS (incremental_location = ($4, $5, $6))",
812812
append(collections, incrementals...)...)
813813

814814
sqlDB.ExpectErr(t, "the incremental_location option must contain the same number of locality",
@@ -848,7 +848,7 @@ func TestBackupAndRestoreJobDescription(t *testing.T) {
848848
collections[1], collections[2])},
849849
{fmt.Sprintf("BACKUP INTO '%s' IN ('%s', '%s', '%s')", full1,
850850
collections[0], collections[1], collections[2])},
851-
{fmt.Sprintf("BACKUP INTO '%s' IN ('%s', '%s', '%s') WITH incremental_location = ('%s', '%s', '%s')",
851+
{fmt.Sprintf("BACKUP INTO '%s' IN ('%s', '%s', '%s') WITH OPTIONS (incremental_location = ('%s', '%s', '%s'))",
852852
full1, collections[0], collections[1], collections[2], incrementals[0],
853853
incrementals[1], incrementals[2])},
854854
{fmt.Sprintf("BACKUP INTO '%s' IN ('%s', '%s', '%s') AS OF SYSTEM TIME '-1s'", asOf1, collections[0],
@@ -904,7 +904,7 @@ func TestBackupAndRestoreJobDescription(t *testing.T) {
904904
{fmt.Sprintf("RESTORE DATABASE data FROM ('%s', '%s', '%s')",
905905
resolvedCollectionURIs[0], resolvedCollectionURIs[1],
906906
resolvedCollectionURIs[2])},
907-
{fmt.Sprintf("RESTORE DATABASE data FROM ('%s', '%s', '%s') WITH incremental_location = ('%s', '%s', '%s')",
907+
{fmt.Sprintf("RESTORE DATABASE data FROM ('%s', '%s', '%s') WITH OPTIONS (incremental_location = ('%s', '%s', '%s'))",
908908
resolvedCollectionURIs[0], resolvedCollectionURIs[1], resolvedCollectionURIs[2],
909909
resolvedIncURIs[0], resolvedIncURIs[1], resolvedIncURIs[2])},
910910
{fmt.Sprintf("RESTORE DATABASE data FROM ('%s', '%s', '%s')",
@@ -1308,7 +1308,7 @@ func TestBackupRestoreSystemJobs(t *testing.T) {
13081308
if err := jobutils.VerifySystemJob(t, sqlDB, 0, jobspb.TypeRestore, jobs.StatusSucceeded, jobs.Record{
13091309
Username: username.RootUserName(),
13101310
Description: fmt.Sprintf(
1311-
`RESTORE TABLE bank FROM '%s', '%s' WITH into_db = 'restoredb'`,
1311+
`RESTORE TABLE bank FROM '%s', '%s' WITH OPTIONS (into_db = 'restoredb')`,
13121312
sanitizedFullDir+"redacted", sanitizedIncDir+"redacted",
13131313
),
13141314
DescriptorIDs: descpb.IDs{
@@ -1395,7 +1395,7 @@ func TestEncryptedBackupRestoreSystemJobs(t *testing.T) {
13951395
jobs.Record{
13961396
Username: username.RootUserName(),
13971397
Description: fmt.Sprintf(
1398-
`BACKUP DATABASE data TO '%s' WITH %s`,
1398+
`BACKUP DATABASE data TO '%s' WITH OPTIONS (%s)`,
13991399
backupLoc1, sanitizedEncryptionOption),
14001400
DescriptorIDs: descpb.IDs{
14011401
descpb.ID(backupDatabaseID),
@@ -1414,7 +1414,7 @@ into_db='restoredb', %s)`, encryptionOption), backupLoc1)
14141414
if err := jobutils.VerifySystemJob(t, sqlDB, 0, jobspb.TypeRestore, jobs.StatusSucceeded, jobs.Record{
14151415
Username: username.RootUserName(),
14161416
Description: fmt.Sprintf(
1417-
`RESTORE TABLE data.bank FROM '%s' WITH %s, into_db = 'restoredb'`,
1417+
`RESTORE TABLE data.bank FROM '%s' WITH OPTIONS (%s, into_db = 'restoredb')`,
14181418
backupLoc1, sanitizedEncryptionOption,
14191419
),
14201420
DescriptorIDs: descpb.IDs{
@@ -5700,8 +5700,8 @@ func TestBackupRestoreShowJob(t *testing.T) {
57005700
sqlDB.CheckQueryResults(
57015701
t, "SELECT description FROM [SHOW JOBS] WHERE job_type != 'MIGRATION' AND description != 'updating privileges' ORDER BY description",
57025702
[][]string{
5703-
{"BACKUP DATABASE data TO 'nodelocal://1/foo' WITH revision_history = true"},
5704-
{"RESTORE TABLE data.bank FROM 'nodelocal://1/foo' WITH into_db = 'data 2', skip_missing_foreign_keys"},
5703+
{"BACKUP DATABASE data TO 'nodelocal://1/foo' WITH OPTIONS (revision_history = true)"},
5704+
{"RESTORE TABLE data.bank FROM 'nodelocal://1/foo' WITH OPTIONS (into_db = 'data 2', skip_missing_foreign_keys)"},
57055705
},
57065706
)
57075707
}

pkg/ccl/backupccl/create_scheduled_backup_test.go

Lines changed: 36 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -251,57 +251,57 @@ CREATE TABLE other_db.t1(a int);
251251
{
252252
name: "fully-qualified-table-name",
253253
query: "CREATE SCHEDULE FOR BACKUP mydb.public.t1 INTO $1 RECURRING '@hourly'",
254-
expectedBackupStmt: "BACKUP TABLE mydb.public.t1 INTO '%s' WITH detached",
254+
expectedBackupStmt: "BACKUP TABLE mydb.public.t1 INTO '%s' WITH OPTIONS (detached)",
255255
},
256256
{
257257
name: "schema-qualified-table-name",
258258
query: "CREATE SCHEDULE FOR BACKUP public.t1 INTO $1 RECURRING '@hourly'",
259-
expectedBackupStmt: "BACKUP TABLE mydb.public.t1 INTO '%s' WITH detached",
259+
expectedBackupStmt: "BACKUP TABLE mydb.public.t1 INTO '%s' WITH OPTIONS (detached)",
260260
},
261261
{
262262
name: "uds-qualified-table-name",
263263
query: "CREATE SCHEDULE FOR BACKUP myschema.mytbl INTO $1 RECURRING '@hourly'",
264-
expectedBackupStmt: "BACKUP TABLE mydb.myschema.mytbl INTO '%s' WITH detached",
264+
expectedBackupStmt: "BACKUP TABLE mydb.myschema.mytbl INTO '%s' WITH OPTIONS (detached)",
265265
},
266266
{
267267
name: "db-qualified-table-name",
268268
query: "CREATE SCHEDULE FOR BACKUP mydb.t1 INTO $1 RECURRING '@hourly'",
269-
expectedBackupStmt: "BACKUP TABLE mydb.public.t1 INTO '%s' WITH detached",
269+
expectedBackupStmt: "BACKUP TABLE mydb.public.t1 INTO '%s' WITH OPTIONS (detached)",
270270
},
271271
{
272272
name: "unqualified-table-name",
273273
query: "CREATE SCHEDULE FOR BACKUP t1 INTO $1 RECURRING '@hourly'",
274-
expectedBackupStmt: "BACKUP TABLE mydb.public.t1 INTO '%s' WITH detached",
274+
expectedBackupStmt: "BACKUP TABLE mydb.public.t1 INTO '%s' WITH OPTIONS (detached)",
275275
},
276276
{
277277
name: "unqualified-table-name-with-symbols",
278278
query: `CREATE SCHEDULE FOR BACKUP "my.tbl" INTO $1 RECURRING '@hourly'`,
279-
expectedBackupStmt: `BACKUP TABLE mydb.public."my.tbl" INTO '%s' WITH detached`,
279+
expectedBackupStmt: `BACKUP TABLE mydb.public."my.tbl" INTO '%s' WITH OPTIONS (detached)`,
280280
},
281281
{
282282
name: "table-names-from-different-db",
283283
query: "CREATE SCHEDULE FOR BACKUP t1, other_db.t1 INTO $1 RECURRING '@hourly'",
284-
expectedBackupStmt: "BACKUP TABLE mydb.public.t1, other_db.public.t1 INTO '%s' WITH detached",
284+
expectedBackupStmt: "BACKUP TABLE mydb.public.t1, other_db.public.t1 INTO '%s' WITH OPTIONS (detached)",
285285
},
286286
{
287287
name: "unqualified-all-tables-selectors",
288288
query: "CREATE SCHEDULE FOR BACKUP * INTO $1 RECURRING '@hourly'",
289-
expectedBackupStmt: "BACKUP TABLE mydb.public.* INTO '%s' WITH detached",
289+
expectedBackupStmt: "BACKUP TABLE mydb.public.* INTO '%s' WITH OPTIONS (detached)",
290290
},
291291
{
292292
name: "all-tables-selectors-with-user-defined-schema",
293293
query: "CREATE SCHEDULE FOR BACKUP myschema.* INTO $1 RECURRING '@hourly'",
294-
expectedBackupStmt: "BACKUP TABLE mydb.myschema.* INTO '%s' WITH detached",
294+
expectedBackupStmt: "BACKUP TABLE mydb.myschema.* INTO '%s' WITH OPTIONS (detached)",
295295
},
296296
{
297297
name: "partially-qualified-all-tables-selectors-with-different-db",
298298
query: "CREATE SCHEDULE FOR BACKUP other_db.* INTO $1 RECURRING '@hourly'",
299-
expectedBackupStmt: "BACKUP TABLE other_db.public.* INTO '%s' WITH detached",
299+
expectedBackupStmt: "BACKUP TABLE other_db.public.* INTO '%s' WITH OPTIONS (detached)",
300300
},
301301
{
302302
name: "fully-qualified-all-tables-selectors-with-multiple-dbs",
303303
query: "CREATE SCHEDULE FOR BACKUP *, other_db.* INTO $1 RECURRING '@hourly'",
304-
expectedBackupStmt: "BACKUP TABLE mydb.public.*, other_db.public.* INTO '%s' WITH detached",
304+
expectedBackupStmt: "BACKUP TABLE mydb.public.*, other_db.public.* INTO '%s' WITH OPTIONS (detached)",
305305
},
306306
}
307307

@@ -359,8 +359,8 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
359359
expectedSchedules: []expectedSchedule{
360360
{
361361
nameRe: "BACKUP .+",
362-
backupStmt: "BACKUP INTO 'nodelocal://1/backup?AWS_SECRET_ACCESS_KEY=neverappears' WITH detached",
363-
shownStmt: "BACKUP INTO 'nodelocal://1/backup?AWS_SECRET_ACCESS_KEY=redacted' WITH detached",
362+
backupStmt: "BACKUP INTO 'nodelocal://1/backup?AWS_SECRET_ACCESS_KEY=neverappears' WITH OPTIONS (detached)",
363+
shownStmt: "BACKUP INTO 'nodelocal://1/backup?AWS_SECRET_ACCESS_KEY=redacted' WITH OPTIONS (detached)",
364364
period: time.Hour,
365365
},
366366
},
@@ -372,7 +372,7 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
372372
expectedSchedules: []expectedSchedule{
373373
{
374374
nameRe: "my-backup",
375-
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH detached",
375+
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH OPTIONS (detached)",
376376
period: time.Hour,
377377
},
378378
},
@@ -384,7 +384,7 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
384384
expectedSchedules: []expectedSchedule{
385385
{
386386
nameRe: "BACKUP .+",
387-
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH detached",
387+
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH OPTIONS (detached)",
388388
period: time.Hour,
389389
},
390390
},
@@ -396,14 +396,14 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
396396
expectedSchedules: []expectedSchedule{
397397
{
398398
nameRe: "BACKUP .*",
399-
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH detached",
399+
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH OPTIONS (detached)",
400400
period: time.Hour,
401401
paused: true,
402402
chainProtectedTimestampRecord: true,
403403
},
404404
{
405405
nameRe: "BACKUP .+",
406-
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH detached",
406+
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH OPTIONS (detached)",
407407
period: 24 * time.Hour,
408408
runsNow: true,
409409
chainProtectedTimestampRecord: true,
@@ -417,14 +417,14 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
417417
expectedSchedules: []expectedSchedule{
418418
{
419419
nameRe: "my-backup",
420-
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH detached",
420+
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH OPTIONS (detached)",
421421
period: time.Hour,
422422
paused: true,
423423
chainProtectedTimestampRecord: true,
424424
},
425425
{
426426
nameRe: "my-backup",
427-
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH detached",
427+
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH OPTIONS (detached)",
428428
period: 24 * time.Hour,
429429
runsNow: true,
430430
chainProtectedTimestampRecord: true,
@@ -438,7 +438,7 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
438438
expectedSchedules: []expectedSchedule{
439439
{
440440
nameRe: "BACKUP .+",
441-
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH revision_history = true, detached",
441+
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
442442
period: time.Hour,
443443
},
444444
},
@@ -450,14 +450,14 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
450450
expectedSchedules: []expectedSchedule{
451451
{
452452
nameRe: "BACKUP .*",
453-
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH detached, incremental_location = 'nodelocal://1/incremental'",
453+
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH OPTIONS (detached, incremental_location = 'nodelocal://1/incremental')",
454454
period: time.Hour,
455455
paused: true,
456456
chainProtectedTimestampRecord: true,
457457
},
458458
{
459459
nameRe: "BACKUP .+",
460-
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH detached",
460+
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH OPTIONS (detached)",
461461
period: 24 * time.Hour,
462462
runsNow: true,
463463
chainProtectedTimestampRecord: true,
@@ -475,15 +475,15 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
475475
nameRe: "BACKUP .*",
476476
backupStmt: "BACKUP TABLE system.public.jobs, " +
477477
"system.public.scheduled_jobs INTO LATEST IN 'nodelocal://1/backup' WITH" +
478-
" revision_history = true, detached",
478+
" OPTIONS (revision_history = true, detached)",
479479
period: time.Hour,
480480
paused: true,
481481
chainProtectedTimestampRecord: true,
482482
},
483483
{
484484
nameRe: "BACKUP .+",
485485
backupStmt: "BACKUP TABLE system.public.jobs, " +
486-
"system.public.scheduled_jobs INTO 'nodelocal://1/backup' WITH revision_history = true, detached",
486+
"system.public.scheduled_jobs INTO 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
487487
period: 24 * time.Hour,
488488
runsNow: true,
489489
chainProtectedTimestampRecord: true,
@@ -499,14 +499,14 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
499499
expectedSchedules: []expectedSchedule{
500500
{
501501
nameRe: "BACKUP .*",
502-
backupStmt: "BACKUP DATABASE system INTO LATEST IN 'nodelocal://1/backup' WITH revision_history = true, detached",
502+
backupStmt: "BACKUP DATABASE system INTO LATEST IN 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
503503
period: time.Hour,
504504
paused: true,
505505
chainProtectedTimestampRecord: true,
506506
},
507507
{
508508
nameRe: "BACKUP .+",
509-
backupStmt: "BACKUP DATABASE system INTO 'nodelocal://1/backup' WITH revision_history = true, detached",
509+
backupStmt: "BACKUP DATABASE system INTO 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
510510
period: 24 * time.Hour,
511511
runsNow: true,
512512
chainProtectedTimestampRecord: true,
@@ -522,14 +522,14 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
522522
expectedSchedules: []expectedSchedule{
523523
{
524524
nameRe: "BACKUP .*",
525-
backupStmt: "BACKUP TABLE system.public.* INTO LATEST IN 'nodelocal://1/backup' WITH revision_history = true, detached",
525+
backupStmt: "BACKUP TABLE system.public.* INTO LATEST IN 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
526526
period: time.Hour,
527527
paused: true,
528528
chainProtectedTimestampRecord: true,
529529
},
530530
{
531531
nameRe: "BACKUP .+",
532-
backupStmt: "BACKUP TABLE system.public.* INTO 'nodelocal://1/backup' WITH revision_history = true, detached",
532+
backupStmt: "BACKUP TABLE system.public.* INTO 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
533533
period: 24 * time.Hour,
534534
runsNow: true,
535535
chainProtectedTimestampRecord: true,
@@ -562,14 +562,14 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
562562
expectedSchedules: []expectedSchedule{
563563
{
564564
nameRe: "my_backup_name",
565-
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH revision_history = true, detached",
565+
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
566566
period: time.Hour,
567567
paused: true,
568568
chainProtectedTimestampRecord: true,
569569
},
570570
{
571571
nameRe: "my_backup_name",
572-
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH revision_history = true, detached",
572+
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
573573
period: 24 * time.Hour,
574574
runsNow: true,
575575
chainProtectedTimestampRecord: true,
@@ -584,14 +584,14 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
584584
expectedSchedules: []expectedSchedule{
585585
{
586586
nameRe: "my_backup_name",
587-
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH revision_history = true, detached",
587+
backupStmt: "BACKUP INTO LATEST IN 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
588588
period: time.Hour,
589589
paused: true,
590590
chainProtectedTimestampRecord: true,
591591
},
592592
{
593593
nameRe: "my_backup_name",
594-
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH revision_history = true, detached",
594+
backupStmt: "BACKUP INTO 'nodelocal://1/backup' WITH OPTIONS (revision_history = true, detached)",
595595
period: 24 * time.Hour,
596596
runsNow: true,
597597
chainProtectedTimestampRecord: true,
@@ -609,10 +609,10 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
609609
nameRe: "BACKUP .*",
610610
backupStmt: "BACKUP TABLE system.public.jobs, " +
611611
"system.public.scheduled_jobs INTO 'nodelocal://1/backup' WITH" +
612-
" revision_history = true, encryption_passphrase = 'secret', detached",
612+
" OPTIONS (revision_history = true, encryption_passphrase = 'secret', detached)",
613613
shownStmt: "BACKUP TABLE system.public.jobs, " +
614614
"system.public.scheduled_jobs INTO 'nodelocal://1/backup' WITH" +
615-
" revision_history = true, encryption_passphrase = '*****', detached",
615+
" OPTIONS (revision_history = true, encryption_passphrase = '*****', detached)",
616616
period: 7 * 24 * time.Hour,
617617
},
618618
},
@@ -634,7 +634,7 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
634634
nameRe: "BACKUP .+",
635635
backupStmt: "BACKUP DATABASE system INTO " +
636636
"('nodelocal://1/backup?COCKROACH_LOCALITY=x%3Dy', 'nodelocal://1/backup2?COCKROACH_LOCALITY=default') " +
637-
"WITH revision_history = true, detached",
637+
"WITH OPTIONS (revision_history = true, detached)",
638638
period: 24 * time.Hour,
639639
},
640640
},
@@ -655,7 +655,7 @@ func TestSerializesScheduledBackupExecutionArgs(t *testing.T) {
655655
{
656656
nameRe: "BACKUP .+",
657657
backupStmt: "BACKUP DATABASE system INTO 'nodelocal://1/backup' " +
658-
"WITH revision_history = true, detached, execution locality = 'region=of-france'",
658+
"WITH OPTIONS (revision_history = true, detached, execution locality = 'region=of-france')",
659659
period: 24 * time.Hour,
660660
},
661661
},

0 commit comments

Comments
 (0)