code: func (sg *sessionPool) get() (sessionctx.Context, error) {
  	if sg.resPool == nil {
  		return mock.NewContext(), nil
  	}
  
  	sg.mu.Lock()
  	if sg.mu.closed {
  		sg.mu.Unlock()
  		return nil, errors.Errorf("sessionPool is closed.")
  	}
  	sg.mu.Unlock()
  
  	// no need to protect sg.resPool
  	resource, err := sg.resPool.Get()
  	if err != nil {
  		return nil, errors.Trace(err)
  	}
  
  	ctx := resource.(sessionctx.Context)
  	ctx.GetSessionVars().SetStatusFlag(mysql.ServerStatusAutocommit, true)
  	ctx.GetSessionVars().InRestrictedSQL = true
  	return ctx, nil
  }
docs: // get gets sessionctx from context resource pool.
  // Please remember to call put after you finished using sessionctx.