|
25 | 25 | import io.cdap.delta.api.SourceTable; |
26 | 26 | import io.cdap.delta.plugin.common.DBSchemaHistory; |
27 | 27 | import io.cdap.delta.plugin.common.NotifyingCompletionCallback; |
| 28 | +import io.debezium.DebeziumException; |
| 29 | +import io.debezium.config.CommonConnectorConfig; |
28 | 30 | import io.debezium.config.Configuration; |
29 | 31 | import io.debezium.connector.mysql.MySqlConnector; |
30 | 32 | import io.debezium.connector.mysql.MySqlConnectorConfig; |
31 | 33 | import io.debezium.connector.mysql.MySqlJdbcContext; |
32 | 34 | import io.debezium.connector.mysql.MySqlValueConverters; |
| 35 | +import io.debezium.connector.mysql.antlr.MySqlAntlrDdlParser; |
33 | 36 | import io.debezium.embedded.EmbeddedEngine; |
34 | 37 | import io.debezium.jdbc.JdbcConnection; |
35 | 38 | import io.debezium.jdbc.JdbcValueConverters; |
@@ -132,7 +135,7 @@ public void start(Offset offset) { |
132 | 135 | } |
133 | 136 |
|
134 | 137 | MySqlValueConverters mySqlValueConverters = getValueConverters(mysqlConf); |
135 | | - DdlParser ddlParser = mysqlConf.getDdlParsingMode().getNewParserInstance(mySqlValueConverters, tableId -> true); |
| 138 | + DdlParser ddlParser = new MySqlAntlrDdlParser(mySqlValueConverters, tableId -> true); |
136 | 139 |
|
137 | 140 | ClassLoader oldCL = Thread.currentThread().getContextClassLoader(); |
138 | 141 | Thread.currentThread().setContextClassLoader(getClass().getClassLoader()); |
@@ -179,7 +182,11 @@ private static MySqlValueConverters getValueConverters(MySqlConnectorConfig conf |
179 | 182 |
|
180 | 183 | boolean timeAdjusterEnabled = configuration.getConfig().getBoolean(MySqlConnectorConfig.ENABLE_TIME_ADJUSTER); |
181 | 184 | return new MySqlValueConverters(decimalMode, timePrecisionMode, bigIntUnsignedMode, |
182 | | - timeAdjusterEnabled ? MySqlEventReader::adjustTemporal : x -> x); |
| 185 | + CommonConnectorConfig.BinaryHandlingMode.BYTES, |
| 186 | + timeAdjusterEnabled ? MySqlEventReader::adjustTemporal : x -> x, |
| 187 | + (message, exception) -> { |
| 188 | + throw new DebeziumException(message, exception); |
| 189 | + }); |
183 | 190 | } |
184 | 191 |
|
185 | 192 | private static Temporal adjustTemporal(Temporal temporal) { |
|
0 commit comments