Skip to content

Commit b46ca54

Browse files
authored
Fix ReloadSchema incorrectly using DisableBinlogs value in grpctmclient (#19085)
1 parent 88609d6 commit b46ca54

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
@@ -132,7 +132,7 @@ func LaunchCluster(setupType int, streamMode string, stripes int, cDetails *Comp
132132
return 1, err
133133
}
134134
newInitDBFile = path.Join(localCluster.TmpDirectory, "init_db_with_passwords.sql")
135-
err = os.WriteFile(newInitDBFile, []byte(sql), 0666)
135+
err = os.WriteFile(newInitDBFile, []byte(sql), 0o666)
136136
if err != nil {
137137
return 1, err
138138
}
@@ -561,10 +561,10 @@ func primaryBackup(t *testing.T) {
561561

562562
_, err = primary.VttabletProcess.QueryTablet("DROP TABLE vt_insert_test", keyspaceName, true)
563563
require.NoError(t, err)
564+
565+
restartPrimaryAndReplica(t)
564566
}
565567

566-
// Test a primary and replica from the same backup.
567-
//
568568
// Check that a replica and primary both restored from the same backup
569569
// can replicate successfully.
570570
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
@@ -671,7 +671,7 @@ func (client *Client) ExecuteFetchAsDba(ctx context.Context, tablet *topodatapb.
671671
DbName: topoproto.TabletDbName(tablet),
672672
MaxRows: req.MaxRows,
673673
DisableBinlogs: req.DisableBinlogs,
674-
ReloadSchema: req.DisableBinlogs,
674+
ReloadSchema: req.ReloadSchema,
675675
DisableForeignKeyChecks: req.DisableForeignKeyChecks,
676676
})
677677
if err != nil {
@@ -707,7 +707,7 @@ func (client *Client) ExecuteMultiFetchAsDba(ctx context.Context, tablet *topoda
707707
DbName: topoproto.TabletDbName(tablet),
708708
MaxRows: req.MaxRows,
709709
DisableBinlogs: req.DisableBinlogs,
710-
ReloadSchema: req.DisableBinlogs,
710+
ReloadSchema: req.ReloadSchema,
711711
DisableForeignKeyChecks: req.DisableForeignKeyChecks,
712712
})
713713
if err != nil {

0 commit comments

Comments
 (0)