[pipeline-connector][mysql] Enable send schema change by default (#2815)

This closes #2815.
pull/2817/head
Leonard Xu 1 year ago committed by GitHub
parent 30c8254af3
commit 0eae214183
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -227,7 +227,7 @@ public class MySqlDataSourceOptions {
public static final ConfigOption<Boolean> SCHEMA_CHANGE_ENABLED =
ConfigOptions.key("schema-change.enabled")
.booleanType()
.defaultValue(false)
.defaultValue(true)
.withDescription(
"Whether send schema change events, by default is false. If set to false, the schema changes will not be sent.");
"Whether send schema change events, by default is true. If set to false, the schema changes will not be sent.");
}

@ -60,6 +60,7 @@ import java.util.Collections;
import java.util.List;
import java.util.stream.Stream;
import static com.ververica.cdc.connectors.mysql.source.MySqlDataSourceOptions.SCHEMA_CHANGE_ENABLED;
import static com.ververica.cdc.connectors.mysql.testutils.MySqSourceTestUtils.TEST_PASSWORD;
import static com.ververica.cdc.connectors.mysql.testutils.MySqSourceTestUtils.TEST_USER;
import static com.ververica.cdc.connectors.mysql.testutils.MySqSourceTestUtils.fetchResults;
@ -114,7 +115,7 @@ public class MySqlPipelineITCase extends MySqlSourceTestBase {
.startupOptions(StartupOptions.initial())
.serverId(getServerId(env.getParallelism()))
.serverTimeZone("UTC")
.includeSchemaChanges(true);
.includeSchemaChanges(SCHEMA_CHANGE_ENABLED.defaultValue());
FlinkSourceProvider sourceProvider =
(FlinkSourceProvider) new MySqlDataSource(configFactory).getEventSourceProvider();
@ -242,7 +243,7 @@ public class MySqlPipelineITCase extends MySqlSourceTestBase {
.startupOptions(StartupOptions.latest())
.serverId(getServerId(env.getParallelism()))
.serverTimeZone("UTC")
.includeSchemaChanges(true);
.includeSchemaChanges(SCHEMA_CHANGE_ENABLED.defaultValue());
FlinkSourceProvider sourceProvider =
(FlinkSourceProvider) new MySqlDataSource(configFactory).getEventSourceProvider();

Loading…
Cancel
Save