Skip to content

Commit

Permalink
executor: 'select * from information_schema.tables' fail after settin…
Browse files Browse the repository at this point in the history
…g @@tidb_snapshot (#18676) (#18692)

Signed-off-by: ti-srebot <ti-srebot@pingcap.com>
  • Loading branch information
ti-srebot authored Jul 28, 2020
1 parent 949fa1a commit 8600bb3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion executor/infoschema_reader.go
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ func (c *statsCache) get(ctx sessionctx.Context) (map[int64]uint64, map[tableHis
}

func getAutoIncrementID(ctx sessionctx.Context, schema *model.DBInfo, tblInfo *model.TableInfo) (int64, error) {
is := ctx.GetSessionVars().TxnCtx.InfoSchema.(infoschema.InfoSchema)
is := infoschema.GetInfoSchema(ctx)
tbl, err := is.TableByName(schema.Name, tblInfo.Name)
if err != nil {
return 0, err
Expand Down

0 comments on commit 8600bb3

Please sign in to comment.