code: func GetHistory(ctx sessionctx.Context) *StmtHistory {
  	hist, ok := ctx.GetSessionVars().TxnCtx.History.(*StmtHistory)
  	if ok {
  		return hist
  	}
  	hist = new(StmtHistory)
  	ctx.GetSessionVars().TxnCtx.History = hist
  	return hist
  }
docs: // GetHistory get all stmtHistory in current txn. Exported only for test.