code: public void executeBatchStmt(boolean mustExecuteOnMaster, Results results,
        final List<String> queries)
        throws SQLException {
      cmdPrologue();
      if (this.options.rewriteBatchedStatements) {
  
        //check that queries are rewritable
        boolean canAggregateSemiColumn = true;
        for (String query : queries) {
          if (!ClientPrepareResult.canAggregateSemiColon(query, noBackslashEscapes())) {
            canAggregateSemiColumn = false;
            break;
          }
        }
  
        if (isInterrupted()) {
          //interrupted by timeout, must throw an exception manually
          throw new SQLTimeoutException("Timeout during batch execution");
        }
  
        if (canAggregateSemiColumn) {
          executeBatchAggregateSemiColon(results, queries);
        } else {
          executeBatch(results, queries);
        }
  
      } else {
        executeBatch(results, queries);
      }
    }
docs: Execute batch from Statement.executeBatch().
  
  @param mustExecuteOnMaster was intended to be launched on master connection
  @param results             results
  @param queries             queries
  @throws SQLException if any exception occur