embulk-input-mysql 0.8.3 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ad515b3eb8f28906f971b7f53e5c509334955fa0
4
- data.tar.gz: 10475eac9234df6f9849b4d548ae19cb25db7994
3
+ metadata.gz: e95b049dedfd17520d5aec37672353c4c79b1e0f
4
+ data.tar.gz: cc6e270fae22085306a866f4fb614f77f7f30d88
5
5
  SHA512:
6
- metadata.gz: 99f8149f1a4b3ea926b17a1e2739050b410b4cbf8199ca2313bece1ded494e197f84bc9ed37c9830197232e30fa99578eb70f3202b232ac2813964c60faa3474
7
- data.tar.gz: c794a8d86163720dc1c625f2fc2ea21a501004af2324a75fd065fdfdc0205cb5d29138ebec8a87b0ec8610bbbd3d488621e2e3ffb31730b2c3bd4c9e5d50b2b8
6
+ metadata.gz: 97f583757f6ec44fba8f2eb4103bffdb09aef579e4745c1121c09a8194c98503a49d31d33e7e7fbe34af3629f8b2f427d09af020e5afcce98c060937c7ab7ba7
7
+ data.tar.gz: 282b89a3573cc9145fddd2ff7bc181a212ed516c769a7df4d9f84a84349bd3eeddaa8275547b35dab47e4c607960ad8fce1f75c0525325e55342772bdac66254
@@ -12,6 +12,7 @@ import com.mysql.jdbc.TimeUtil;
12
12
  import org.embulk.config.Config;
13
13
  import org.embulk.config.ConfigDefault;
14
14
  import org.embulk.input.jdbc.AbstractJdbcInputPlugin;
15
+ import org.embulk.input.jdbc.Ssl;
15
16
  import org.embulk.input.jdbc.JdbcInputConnection;
16
17
  import org.embulk.input.jdbc.getter.ColumnGetterFactory;
17
18
  import org.embulk.input.mysql.MySQLInputConnection;
@@ -42,6 +43,10 @@ public class MySQLInputPlugin
42
43
 
43
44
  @Config("database")
44
45
  public String getDatabase();
46
+
47
+ @Config("ssl")
48
+ @ConfigDefault("\"disable\"") // backward compatibility
49
+ public Ssl getSsl();
45
50
  }
46
51
 
47
52
  @Override
@@ -75,21 +80,21 @@ public class MySQLInputPlugin
75
80
  // Socket options TCP_KEEPCNT, TCP_KEEPIDLE, and TCP_KEEPINTVL are not configurable.
76
81
  props.setProperty("tcpKeepAlive", "true");
77
82
 
78
- // TODO
79
- //switch task.getSssl() {
80
- //when "disable":
81
- // break;
82
- //when "enable":
83
- // props.setProperty("useSSL", "true");
84
- // props.setProperty("requireSSL", "false");
85
- // props.setProperty("verifyServerCertificate", "false");
86
- // break;
87
- //when "verify":
88
- // props.setProperty("useSSL", "true");
89
- // props.setProperty("requireSSL", "true");
90
- // props.setProperty("verifyServerCertificate", "true");
91
- // break;
92
- //}
83
+ switch (t.getSsl()) {
84
+ case DISABLE:
85
+ props.setProperty("useSSL", "false");
86
+ break;
87
+ case ENABLE:
88
+ props.setProperty("useSSL", "true");
89
+ props.setProperty("requireSSL", "true");
90
+ props.setProperty("verifyServerCertificate", "false");
91
+ break;
92
+ case VERIFY:
93
+ props.setProperty("useSSL", "true");
94
+ props.setProperty("requireSSL", "true");
95
+ props.setProperty("verifyServerCertificate", "true");
96
+ break;
97
+ }
93
98
 
94
99
  if (t.getFetchRows() == 1) {
95
100
  logger.info("Fetch size is 1. Fetching rows one by one.");
@@ -67,4 +67,19 @@ public class MySQLInputConnection
67
67
  timeZoneComparison.compareTimeZone();
68
68
  }
69
69
 
70
+ //
71
+ //
72
+ // The MySQL Connector/J 5.1.35 introduce new option `Current MySQL Connect`.
73
+ // It has incompatibility behavior current version and 5.1.35.
74
+ //
75
+ // This method announces users about this change before the update driver version.
76
+ //
77
+ @Override
78
+ public void showDriverVersion() throws SQLException {
79
+ super.showDriverVersion();
80
+ logger.warn("This plugin will update MySQL Connector/J version in the near future release.");
81
+ logger.warn("It has some incompatibility changes.");
82
+ logger.warn("For example, the 5.1.35 introduced `noTimezoneConversionForDateType` and `cacheDefaultTimezone` options.");
83
+ logger.warn("Please read a document and make sure configuration carefully before updating the plugin.");
84
+ }
70
85
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embulk-input-mysql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sadayuki Furuhashi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-26 00:00:00.000000000 Z
11
+ date: 2017-06-23 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Selects records from a table.
14
14
  email:
@@ -19,8 +19,8 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - README.md
21
21
  - build.gradle
22
- - classpath/embulk-input-jdbc-0.8.3.jar
23
- - classpath/embulk-input-mysql-0.8.3.jar
22
+ - classpath/embulk-input-jdbc-0.8.4.jar
23
+ - classpath/embulk-input-mysql-0.8.4.jar
24
24
  - classpath/mysql-connector-java-5.1.34.jar
25
25
  - lib/embulk/input/mysql.rb
26
26
  - src/main/java/org/embulk/input/MySQLInputPlugin.java
Binary file