code: public void addStatsError(boolean moreResultAvailable) {
      if (cmdInformation == null) {
        if (batch) {
          cmdInformation = new CmdInformationBatch(expectedSize, autoIncrement);
        } else if (moreResultAvailable) {
          cmdInformation = new CmdInformationMultiple(expectedSize, autoIncrement);
        } else {
          cmdInformation = new CmdInformationSingle(0, Statement.EXECUTE_FAILED, autoIncrement);
          return;
        }
      }
      cmdInformation.addErrorStat();
    }
docs: Indicate that result is an Error, to set appropriate results.
  
  @param moreResultAvailable indicate if other results (ResultSet or updateCount) are available.