Skip to content

Commit

Permalink
br: refine IsLogBackupEnabled
Browse files Browse the repository at this point in the history
  • Loading branch information
tangenta committed Nov 9, 2022
1 parent ce62915 commit 055e10c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion br/pkg/utils/db.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ func CheckLogBackupEnabled(ctx sessionctx.Context) bool {
// we use `sqlexec.RestrictedSQLExecutor` as parameter because it's easy to mock.
// it should return error.
func IsLogBackupEnabled(ctx sqlexec.RestrictedSQLExecutor) (bool, error) {
valStr := "show config where name = 'log-backup.enable'"
valStr := "show config where name = 'log-backup.enable' and type = 'tikv'"
internalCtx := kv.WithInternalSourceType(context.Background(), kv.InternalTxnBR)
rows, fields, errSQL := ctx.ExecRestrictedSQL(internalCtx, nil, valStr)
if errSQL != nil {
Expand Down

0 comments on commit 055e10c

Please sign in to comment.