Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,7 @@ private PluginTask begin(final PluginTask task,
public void run() throws SQLException
{
JdbcOutputConnection con = newConnection(task, true, false);
con.showDriverVersion();
try {
doBegin(con, task, schema, taskCount);
} finally {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.Locale;

import org.slf4j.Logger;

Expand All @@ -19,7 +20,7 @@
public class JdbcOutputConnection
implements AutoCloseable
{
private final Logger logger = Exec.getLogger(JdbcOutputConnection.class);
protected final Logger logger = Exec.getLogger(JdbcOutputConnection.class);
protected final Connection connection;
protected final String schemaName;
protected final DatabaseMetaData databaseMetaData;
Expand Down Expand Up @@ -593,4 +594,9 @@ protected SQLException safeRollback(Connection con, SQLException cause)
return ex;
}
}
public void showDriverVersion() throws SQLException {
DatabaseMetaData meta = connection.getMetaData();
logger.info(String.format(Locale.ENGLISH,"Using JDBC Driver %s",meta.getDriverVersion()));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -119,4 +119,20 @@ public void compareTimeZone() throws SQLException
timeZoneComparison.compareTimeZone();
}

//
//
// The MySQL Connector/J 5.1.35 introduce new option `Current MySQL Connect`.
// It has incompatibility behavior current version and 5.1.35.
//
// This method announces users about this change before the update driver version.
//
@Override
public void showDriverVersion() throws SQLException {
super.showDriverVersion();
logger.warn("This plugin will update MySQL Connector/J version in the near future release.");
logger.warn("It has some incompatibility changes.");
logger.warn("For example, the 5.1.35 introduced `noTimezoneConversionForDateType` and `cacheDefaultTimezone` options.");
logger.warn("Please read a document and make sure configuration carefully before updating the plugin.");
}

}