Skip to content

Commit b3db690

Browse files
lzmhhh123lidezhu
authored andcommitted
address comment
1 parent ca61089 commit b3db690

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

planner/core/logical_plan_builder.go

+1-3
Original file line numberDiff line numberDiff line change
@@ -2536,9 +2536,7 @@ func (b *PlanBuilder) buildDataSource(ctx context.Context, tn *ast.TableName, as
25362536
if err != nil {
25372537
return nil, err
25382538
}
2539-
if dbName.L != mysql.SystemDB {
2540-
possiblePaths, err = b.filterPathByIsolationRead(possiblePaths)
2541-
}
2539+
possiblePaths, err = b.filterPathByIsolationRead(possiblePaths, dbName)
25422540
if err != nil {
25432541
return nil, err
25442542
}

planner/core/planbuilder.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -725,8 +725,11 @@ func (b *PlanBuilder) getPossibleAccessPaths(indexHints []*ast.IndexHint, tbl ta
725725
return available, nil
726726
}
727727

728-
func (b *PlanBuilder) filterPathByIsolationRead(paths []*util.AccessPath) ([]*util.AccessPath, error) {
728+
func (b *PlanBuilder) filterPathByIsolationRead(paths []*util.AccessPath, dbName model.CIStr) ([]*util.AccessPath, error) {
729729
// TODO: filter paths with isolation read locations.
730+
if dbName.L == mysql.SystemDB {
731+
return paths, nil
732+
}
730733
isolationReadEngines := b.ctx.GetSessionVars().GetIsolationReadEngines()
731734
availableEngine := map[kv.StoreType]struct{}{}
732735
var availableEngineStr string

0 commit comments

Comments
 (0)