Skip to content

Commit 1e7c5a6

Browse files
Fix ReloadSchema incorrectly using DisableBinlogs value in grpctmclient (#19085)
1 parent bb4d0b1 commit 1e7c5a6

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

go/test/endtoend/backup/vtctlbackup/backup_utils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *Comp
131131
return 1, err
132132
}
133133
newInitDBFile = path.Join(localCluster.TmpDirectory, "init_db_with_passwords.sql")
134-
err = os.WriteFile(newInitDBFile, []byte(sql), 0666)
134+
err = os.WriteFile(newInitDBFile, []byte(sql), 0o666)
135135
if err != nil {
136136
return 1, err
137137
}
@@ -543,10 +543,10 @@ func primaryBackup(t *testing.T) {
543543

544544
_, err = primary.VttabletProcess.QueryTablet("DROP TABLE vt_insert_test", keyspaceName, true)
545545
require.NoError(t, err)
546+
547+
restartPrimaryAndReplica(t)
546548
}
547549

548-
// Test a primary and replica from the same backup.
549-
//
550550
// Check that a replica and primary both restored from the same backup
551551
// can replicate successfully.
552552
func primaryReplicaSameBackup(t *testing.T) {

go/vt/vttablet/grpctmclient/client.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ func (client *Client) ExecuteFetchAsDba(ctx context.Context, tablet *topodatapb.
577577
DbName: topoproto.TabletDbName(tablet),
578578
MaxRows: req.MaxRows,
579579
DisableBinlogs: req.DisableBinlogs,
580-
ReloadSchema: req.DisableBinlogs,
580+
ReloadSchema: req.ReloadSchema,
581581
DisableForeignKeyChecks: req.DisableForeignKeyChecks,
582582
})
583583
if err != nil {
@@ -613,7 +613,7 @@ func (client *Client) ExecuteMultiFetchAsDba(ctx context.Context, tablet *topoda
613613
DbName: topoproto.TabletDbName(tablet),
614614
MaxRows: req.MaxRows,
615615
DisableBinlogs: req.DisableBinlogs,
616-
ReloadSchema: req.DisableBinlogs,
616+
ReloadSchema: req.ReloadSchema,
617617
DisableForeignKeyChecks: req.DisableForeignKeyChecks,
618618
})
619619
if err != nil {

0 commit comments

Comments
 (0)