beryllw commented on PR #4064:
URL: https://github.com/apache/flink-cdc/pull/4064#issuecomment-3546424682

   Not supporting tables with a primary key id AUTO_INCREMENT: gh-ost generates 
two schema change DDLs as shown below. We need to emit the first one.
   Additionally, we might consider adding test cases for tables with a primary 
key id AUTO_INCREMENT.
   ```
   16598 [Source Data Fetcher for Source: MySQL Source -> SchemaOperator -> 
PrePartition (1/1)#0] INFO  
org.apache.flink.cdc.connectors.mysql.debezium.reader.BinlogSplitReader - 
Received the start event of online schema change: 
SourceRecord{sourcePartition={server=mysql_binlog_source}, 
sourceOffset={transaction_id=null, ts_sec=1763457658, file=mysql-bin.000003, 
pos=393080, gtids=df0b83c5-c45f-11f0-ac64-eab2010302a6:1-1088, 
server_id=223344}} ConnectRecord{topic='mysql_binlog_source', kafkaPartition=0, 
key=Struct{databaseName=customer_rsjl2b}, 
keySchema=Schema{io.debezium.connector.mysql.SchemaChangeKey:STRUCT}, 
value=Struct{source=Struct{version=1.9.8.Final,connector=mysql,name=mysql_binlog_source,ts_ms=1763457658483,db=customer_rsjl2b,table=customers,server_id=223344,gtid=df0b83c5-c45f-11f0-ac64-eab2010302a6:1089,file=mysql-bin.000003,pos=392886,row=0},historyRecord={
     "source" : {
       "file" : "mysql-bin.000003",
       "pos" : 392886,
       "server_id" : 223344
     },
     "position" : {
       "transaction_id" : null,
       "ts_sec" : 1763457658,
       "file" : "mysql-bin.000003",
       "pos" : 393080,
       "gtids" : "df0b83c5-c45f-11f0-ac64-eab2010302a6:1-1088",
       "server_id" : 223344
     },
     "databaseName" : "customer_rsjl2b",
     "ddl" : "alter /* gh-ost */ table `customer_rsjl2b`.`customers` add column 
ext int first",
     "tableChanges" : [ ]
   }}, 
valueSchema=Schema{io.debezium.connector.mysql.SchemaChangeValue:STRUCT}, 
timestamp=null, headers=ConnectHeaders(headers=)}. Save it for later.
   16599 [Source Data Fetcher for Source: MySQL Source -> SchemaOperator -> 
PrePartition (1/1)#0] INFO  
org.apache.flink.cdc.connectors.mysql.debezium.reader.BinlogSplitReader - 
Received the start event of online schema change: 
SourceRecord{sourcePartition={server=mysql_binlog_source}, 
sourceOffset={transaction_id=null, ts_sec=1763457658, file=mysql-bin.000003, 
pos=394428, gtids=df0b83c5-c45f-11f0-ac64-eab2010302a6:1-1092, 
server_id=223344}} ConnectRecord{topic='mysql_binlog_source', kafkaPartition=0, 
key=Struct{databaseName=customer_rsjl2b}, 
keySchema=Schema{io.debezium.connector.mysql.SchemaChangeKey:STRUCT}, 
value=Struct{source=Struct{version=1.9.8.Final,connector=mysql,name=mysql_binlog_source,ts_ms=1763457658486,db=customer_rsjl2b,table=customers,server_id=223344,gtid=df0b83c5-c45f-11f0-ac64-eab2010302a6:1093,file=mysql-bin.000003,pos=394239,row=0},historyRecord={
     "source" : {
       "file" : "mysql-bin.000003",
       "pos" : 394239,
       "server_id" : 223344
     },
     "position" : {
       "transaction_id" : null,
       "ts_sec" : 1763457658,
       "file" : "mysql-bin.000003",
       "pos" : 394428,
       "gtids" : "df0b83c5-c45f-11f0-ac64-eab2010302a6:1-1092",
       "server_id" : 223344
     },
     "databaseName" : "customer_rsjl2b",
     "ddl" : "alter /* gh-ost */ table `customer_rsjl2b`.`customers` 
AUTO_INCREMENT=5699",
     "tableChanges" : [ ]
   }}, 
valueSchema=Schema{io.debezium.connector.mysql.SchemaChangeValue:STRUCT}, 
timestamp=null, headers=ConnectHeaders(headers=)}. Save it for later.
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to