jeff-zou created FLINK-37585:
--------------------------------
Summary: The data of the newly added table cannot be read
Key: FLINK-37585
URL: https://issues.apache.org/jira/browse/FLINK-37585
Project: Flink
Issue Type: Bug
Components: Flink CDC
Affects Versions: cdc-3.2.1
Reporter: jeff-zou
After starting Flink CDC, when a new table is created in MySQL, Flink can read
the table structure of this table, but cannot read the data in it.
The method to reproduce the bug as follows:
1.Start Flink cdc For sysnc Mysql
{code:java}
// code placeholder
MySqlSource<String> mySqlSource =
MySqlSource.<String>builder()
.port(3306)
// .tableList("cdc.test", "your_database.table2") //
监控的表,可选
.hostname("10.11.69.176")
.port(3306)
.databaseList("cdc") // 数据库名
.tableList(".*") // 表名
.username("test")
.password("123456")
.serverTimeZone("UTC")
.deserializer(new JsonDebeziumDeserializationSchema()) // 将 CDC
事件转换为 JSON 字符串
.includeSchemaChanges(true) // 关键配置:包含 DDL 变更
// .serverId("5401-5404")
.scanNewlyAddedTableEnabled(true)
.debeziumProperties(properties)
.fetchSize(1024) // 每次获取行数
.connectTimeout(Duration.ofSeconds(30)) // 连接超时
.build();
.......................
{code}
2. Create table in Mysql
{code:java}
// code placeholder
CREATE TABLE `test` (
`id` varchar(100),
PRIMARY KEY (`id`)
) {code}
3. Write data to Mysql
{code:java}
// code placeholder
INSERT INTO test(`id`) VALUES('kkkkkk') ;
{code}
Flink can read the table's schema, but cannot read the data 'kkkkkk' in it.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)