You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/content/docs/connectors/flink-sources/mysql-cdc.md
+13-1Lines changed: 13 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -401,7 +401,19 @@ During a snapshot operation, the connector will query each included table to pro
401
401
Schema change events are applied to a "shadow" table and then swapped with the original table later.
402
402
<br>
403
403
This is an experimental feature, and subject to change in the future.
404
-
</td>
404
+
</td>
405
+
</tr>
406
+
<tr>
407
+
<td>use.legacy.json.format</td>
408
+
<td>optional</td>
409
+
<tdstyle="word-wrap: break-word;">true</td>
410
+
<td>Boolean</td>
411
+
<td>Whether to use legacy JSON format to cast JSON type data in binlog. <br>
412
+
It determines whether to use the legacy JSON format when retrieving JSON type data in binlog.
413
+
If the user configures 'use.legacy.json.format' = 'true', whitespace before values and after commas in the JSON type data is removed. For example,
414
+
JSON type data {"key1": "value1", "key2": "value2"} in binlog would be converted to {"key1":"value1","key2":"value2"}.
415
+
When 'use.legacy.json.format' = 'false', the data would be converted to {"key1": "value1", "key2": "value2"}, with whitespace before values and after commas preserved.
Copy file name to clipboardExpand all lines: docs/content/docs/connectors/pipeline-connectors/mysql.md
+12Lines changed: 12 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -320,6 +320,18 @@ pipeline:
320
320
<td>Boolean</td>
321
321
<td>Whether treat TINYINT(1) as boolean, by default is true.</td>
322
322
</tr>
323
+
<tr>
324
+
<td>use.legacy.json.format</td>
325
+
<td>optional</td>
326
+
<td style="word-wrap: break-word;">true</td>
327
+
<td>Boolean</td>
328
+
<td>Whether to use legacy JSON format to cast JSON type data in binlog. <br>
329
+
It determines whether to use the legacy JSON format when retrieving JSON type data in binlog.
330
+
If the user configures 'use.legacy.json.format' = 'true', whitespace before values and after commas in the JSON type data is removed. For example,
331
+
JSON type data {"key1": "value1", "key2": "value2"} in binlog would be converted to {"key1":"value1","key2":"value2"}.
332
+
When 'use.legacy.json.format' = 'false', the data would be converted to {"key1": "value1", "key2": "value2"}, with whitespace before values and after commas preserved.
Copy file name to clipboardExpand all lines: flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/main/java/org/apache/flink/cdc/connectors/mysql/factory/MySqlDataSourceFactory.java
Copy file name to clipboardExpand all lines: flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/main/java/org/apache/flink/cdc/connectors/mysql/source/MySqlDataSourceOptions.java
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -305,4 +305,12 @@ public class MySqlDataSourceOptions {
305
305
.booleanType()
306
306
.defaultValue(true)
307
307
.withDescription("Whether treat TINYINT(1) as boolean, by default is true. ");
Copy file name to clipboardExpand all lines: flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/test/java/org/apache/flink/cdc/connectors/mysql/source/MySqlFullTypesITCase.java
+117-6Lines changed: 117 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -106,11 +106,39 @@ public void testMysql57CommonDataTypes() throws Throwable {
Copy file name to clipboardExpand all lines: flink-cdc-connect/flink-cdc-pipeline-connectors/flink-cdc-pipeline-connector-mysql/src/test/java/org/apache/flink/cdc/connectors/mysql/source/MySqlMetadataAccessorITCase.java
+65-1Lines changed: 65 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -222,13 +222,15 @@ public void testMysql57PrecisionTypesSchema() {
0 commit comments