Skip to content

Commit ba2028e

Browse files
[release-23.0] Fix ReloadSchema incorrectly using DisableBinlogs value in grpctmclient (#19085) (#19130)
Co-authored-by: vitess-bot[bot] <108069721+vitess-bot[bot]@users.noreply.github.com>
1 parent eaf8b73 commit ba2028e

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
}
@@ -544,10 +544,10 @@ func primaryBackup(t *testing.T) {
544544

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

549-
// Test a primary and replica from the same backup.
550-
//
551551
// Check that a replica and primary both restored from the same backup
552552
// can replicate successfully.
553553
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
@@ -580,7 +580,7 @@ func (client *Client) ExecuteFetchAsDba(ctx context.Context, tablet *topodatapb.
580580
DbName: topoproto.TabletDbName(tablet),
581581
MaxRows: req.MaxRows,
582582
DisableBinlogs: req.DisableBinlogs,
583-
ReloadSchema: req.DisableBinlogs,
583+
ReloadSchema: req.ReloadSchema,
584584
DisableForeignKeyChecks: req.DisableForeignKeyChecks,
585585
})
586586
if err != nil {
@@ -616,7 +616,7 @@ func (client *Client) ExecuteMultiFetchAsDba(ctx context.Context, tablet *topoda
616616
DbName: topoproto.TabletDbName(tablet),
617617
MaxRows: req.MaxRows,
618618
DisableBinlogs: req.DisableBinlogs,
619-
ReloadSchema: req.DisableBinlogs,
619+
ReloadSchema: req.ReloadSchema,
620620
DisableForeignKeyChecks: req.DisableForeignKeyChecks,
621621
})
622622
if err != nil {

0 commit comments

Comments
 (0)