private static int executeBatch(PreparedStatement stmt) throws SQLException {
        int[] results = stmt.executeBatch();
        int resultCount = 0;
        int noInfoCount = 0;
        int failedCount = 0;
        for (int i = 0; i < results.length; i++) {
            int result = results[i];
            switch (result) {
                case 1:
                    ++resultCount;
                    break;
                case Statement.SUCCESS_NO_INFO:
                    ++noInfoCount;
                    ++resultCount;
                    break;
                case Statement.EXECUTE_FAILED:
                    ++failedCount;
                    break;
                default:
                    throw new IllegalStateException("result=" + result);
            }
        }
        if (failedCount > 0) {
            log.warn("failedCount = " + failedCount);
        }
        if (noInfoCount > 0) {
            log.warn("noInfoCount = " + noInfoCount);
        }
        if (resultCount != results.length) {
            log.warn("array size = " + results.length + ", but result count = " + resultCount);
        }
        stmt.clearBatch();
        return resultCount;
    }