From 06fd5cb90a02ed645887e0983bd790fde222687f Mon Sep 17 00:00:00 2001 From: xxchan Date: Fri, 1 Nov 2024 15:51:18 +0800 Subject: [PATCH] add server.id for both table & source Signed-off-by: xxchan --- e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt.serial | 1 - src/frontend/src/handler/create_source.rs | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt.serial b/e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt.serial index 10854d97b6440..fde008079dc6e 100644 --- a/e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt.serial +++ b/e2e_test/source_inline/cdc/mysql/mysql_create_drop.slt.serial @@ -45,7 +45,6 @@ create source s with ( username = 'shared-cdc', password = 'abcdef', database.name = 'testdb1', - server.id = '114514' ); sleep 2s diff --git a/src/frontend/src/handler/create_source.rs b/src/frontend/src/handler/create_source.rs index 53101f0bfa505..9c37799422a59 100644 --- a/src/frontend/src/handler/create_source.rs +++ b/src/frontend/src/handler/create_source.rs @@ -1466,7 +1466,7 @@ pub fn bind_connector_props( .to_string(), ); } - if !is_create_source && with_properties.is_mysql_cdc_connector() { + if with_properties.is_mysql_cdc_connector() { // Generate a random server id for mysql cdc source if needed // `server.id` (in the range from 1 to 2^32 - 1). This value MUST be unique across whole replication // group (that is, different from any other server id being used by any master or slave)