code: func (e *InsertExec) setMessage() {
  	stmtCtx := e.ctx.GetSessionVars().StmtCtx
  	numRecords := stmtCtx.RecordRows()
  	if e.SelectExec != nil || numRecords > 1 {
  		numWarnings := stmtCtx.WarningCount()
  		var numDuplicates uint64
  		if stmtCtx.DupKeyAsWarning {
  			// if ignoreErr
  			numDuplicates = numRecords - stmtCtx.CopiedRows()
  		} else {
  			if e.ctx.GetSessionVars().ClientCapability&mysql.ClientFoundRows > 0 {
  				numDuplicates = stmtCtx.TouchedRows()
  			} else {
  				numDuplicates = stmtCtx.UpdatedRows()
  			}
  		}
  		msg := fmt.Sprintf(mysql.MySQLErrName[mysql.ErrInsertInfo], numRecords, numDuplicates, numWarnings)
  		stmtCtx.SetMessage(msg)
  	}
  }
docs: // setMessage sets info message(ERR_INSERT_INFO) generated by INSERT statement