src/main/java/org/embulk/input/mysql/MySQLInputConnection.java in embulk-input-mysql-0.8.0 vs src/main/java/org/embulk/input/mysql/MySQLInputConnection.java in embulk-input-mysql-0.8.1
- old
+ new
@@ -3,10 +3,14 @@
import java.util.List;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.SQLException;
import java.sql.ResultSet;
+import java.util.TimeZone;
+
+import com.mysql.jdbc.ConnectionImpl;
+import com.mysql.jdbc.ConnectionProperties;
import org.embulk.input.jdbc.JdbcInputConnection;
import org.embulk.input.jdbc.JdbcLiteral;
import org.embulk.input.jdbc.getter.ColumnGetter;
public class MySQLInputConnection
@@ -42,7 +46,17 @@
// 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);
+ }
+
+ public boolean getUseLegacyDatetimeCode()
+ {
+ return ((ConnectionProperties) connection).getUseLegacyDatetimeCode();
+ }
+
+ public TimeZone getServerTimezoneTZ()
+ {
+ return ((ConnectionImpl) connection).getServerTimezoneTZ();
}
}