test: fix random "IsolationRead" fails (#14615)
Co-authored-by: pingcap-github-bot <sre-bot@pingcap.com>
This commit is contained in:
committed by
GitHub
parent
43b8e133e7
commit
d7654e3c93
@ -264,16 +264,14 @@ func (s *testIntegrationSuite) TestNoneAccessPathsFoundByIsolationRead(c *C) {
|
||||
|
||||
_, err = tk.Exec("select * from t")
|
||||
c.Assert(err, NotNil)
|
||||
c.Assert(err.Error(), Equals, "[planner:1815]Internal : Can not find access path matching 'tidb_isolation_read_engines'(value: '[tikv tiflash tidb]') and tidb-server config isolation-read(engines: 'tiflash'). Available values are 'tikv'.")
|
||||
c.Assert(err.Error(), Equals, "[planner:1815]Internal : Can not find access path matching 'tidb_isolation_read_engines'(value: 'tiflash') and tidb-server config isolation-read(engines: '[tikv tiflash tidb]'). Available values are 'tikv'.")
|
||||
|
||||
tk.MustExec("set @@session.tidb_isolation_read_engines = 'tikv, tiflash'")
|
||||
config.GetGlobalConfig().IsolationRead.Engines = []string{"tiflash"}
|
||||
defer func() {
|
||||
config.GetGlobalConfig().IsolationRead.Engines = []string{"tikv", "tiflash", "tidb"}
|
||||
}()
|
||||
_, err = tk.Exec("select * from t")
|
||||
config.GetGlobalConfig().IsolationRead.Engines = []string{"tikv", "tiflash", "tidb"}
|
||||
c.Assert(err, NotNil)
|
||||
c.Assert(err.Error(), Equals, "[planner:1815]Internal : Can not find access path matching 'tidb_isolation_read_engines'(value: '[tiflash]') and tidb-server config isolation-read(engines: 'tikv,tiflash'). Available values are 'tikv'.")
|
||||
c.Assert(err.Error(), Equals, "[planner:1815]Internal : Can not find access path matching 'tidb_isolation_read_engines'(value: 'tikv,tiflash') and tidb-server config isolation-read(engines: '[tiflash]'). Available values are 'tikv'.")
|
||||
}
|
||||
|
||||
func (s *testIntegrationSuite) TestSelPushDownTiFlash(c *C) {
|
||||
|
||||
@ -756,7 +756,7 @@ func (b *PlanBuilder) filterPathByIsolationRead(paths []*util.AccessPath, dbName
|
||||
engineVals, _ := b.ctx.GetSessionVars().GetSystemVar(variable.TiDBIsolationReadEngines)
|
||||
err = ErrInternal.GenWithStackByArgs(fmt.Sprintf("Can not find access path matching '%v'(value: '%v') "+
|
||||
"and tidb-server config isolation-read(engines: '%v'). Available values are '%v'.",
|
||||
variable.TiDBIsolationReadEngines, config.GetGlobalConfig().IsolationRead.Engines, engineVals, availableEngineStr))
|
||||
variable.TiDBIsolationReadEngines, engineVals, config.GetGlobalConfig().IsolationRead.Engines, availableEngineStr))
|
||||
}
|
||||
return paths, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user