Skip to content

Commit

Permalink
executor: fix privilege issue on table `information_schema.tiflash_re…
Browse files Browse the repository at this point in the history
…plica` (#45319) (#45326)

close #45320
  • Loading branch information
ti-chi-bot authored Jul 13, 2023
1 parent 9f3aa80 commit 2db988e
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions executor/infoschema_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -2063,6 +2063,7 @@ func (e *memtableRetriever) setDataFromSequences(ctx sessionctx.Context, schemas

// dataForTableTiFlashReplica constructs data for table tiflash replica info.
func (e *memtableRetriever) dataForTableTiFlashReplica(ctx sessionctx.Context, schemas []*model.DBInfo) {
checker := privilege.GetPrivilegeManager(ctx)
var rows [][]types.Datum
progressMap, err := infosync.GetTiFlashTableSyncProgress(context.Background())
if err != nil {
Expand All @@ -2073,6 +2074,9 @@ func (e *memtableRetriever) dataForTableTiFlashReplica(ctx sessionctx.Context, s
if tbl.TiFlashReplica == nil {
continue
}
if checker != nil && !checker.RequestVerification(ctx.GetSessionVars().ActiveRoles, schema.Name.L, tbl.Name.L, "", mysql.AllPrivMask) {
continue
}
progress := 1.0
if !tbl.TiFlashReplica.Available {
if pi := tbl.GetPartitionInfo(); pi != nil && len(pi.Definitions) > 0 {
Expand Down

0 comments on commit 2db988e

Please sign in to comment.