src/main/java/org/embulk/input/mysql/MySQLInputConnection.java in embulk-input-mysql-0.6.0 vs src/main/java/org/embulk/input/mysql/MySQLInputConnection.java in embulk-input-mysql-0.6.1

- old
+ new

@@ -14,11 +14,11 @@ { super(connection, null); } @Override - protected BatchSelect newBatchSelect(String select, int fetchRows) throws SQLException + protected BatchSelect newBatchSelect(String select, int fetchRows, int queryTimeout) throws SQLException { logger.info("SQL: " + select); PreparedStatement stmt = connection.prepareStatement(select, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY); // TYPE_FORWARD_ONLY and CONCUR_READ_ONLY are default if (fetchRows == 1) { // See MySQLInputPlugin.newConnection doesn't set useCursorFetch=true when fetchRows=1 @@ -28,8 +28,9 @@ // uses the default behavior. MySQL Connector/J fetches the all rows in memory. } else { // useCursorFetch=true is enabled. MySQL creates temporary table and uses multiple select statements to fetch rows. stmt.setFetchSize(fetchRows); } + // Because socketTimeout is set in Connection, don't need to set quertyTimeout. return new SingleSelect(stmt); } }