code: func (e *ReplaceExec) setMessage() {
  	stmtCtx := e.ctx.GetSessionVars().StmtCtx
  	numRecords := stmtCtx.RecordRows()
  	if e.SelectExec != nil || numRecords > 1 {
  		numWarnings := stmtCtx.WarningCount()
  		numDuplicates := stmtCtx.AffectedRows() - numRecords
  		msg := fmt.Sprintf(mysql.MySQLErrName[mysql.ErrInsertInfo], numRecords, numDuplicates, numWarnings)
  		stmtCtx.SetMessage(msg)
  	}
  }
docs: // setMessage sets info message(ERR_INSERT_INFO) generated by REPLACE statement