开发者社区> 问答> 正文

canal1.1.5 mysql批量更新或批量插入,canal生成的消息只有一条;请问能通过设置生成

您好!

mysql批量更新或批量插入,canal生成的消息只有一条;请问能通过设置生成多条吗?

如,一次插入多条数据insert into exam.canal_test(name) values ('232323232'),('ttttttt'),('ooooooo'); 那么生成1条消息(如下),请问能通过设置,生成3条消息吗?谢谢 :{"data":[{"id":"15","name":"23232323222222","create_time":"2022-03-05 22:41:53","update_time":"2022-03-05 22:41:53"},{"id":"16","name":"ttttttt2222","create_time":"2022-03-05 22:41:53","update_time":"2022-03-05 22:41:53"},{"id":"17","name":"ooooooo222","create_time":"2022-03-05 22:41:53","update_time":"2022-03-05 22:41:53"}],"database":"exam","es":1646491313000,"id":2,"isDdl":false,"mysqlType":{"id":"int unsigned","name":"VARCHAR(100)","create_time":"TIMESTAMP","update_time":"TIMESTAMP"},"old":null,"pkNames":["id"],"sql":"","sqlType":{"id":4,"name":12,"create_time":93,"update_time":93},"table":"canal_test","ts":1646491313273,"type":"INSERT"}

原提问者GitHub用户cwh2008

展开
收起
后端老大 2023-04-26 16:28:12 272 0
1 条回答
写回答
取消 提交回答
  • 多条语句在binlog里是一个event事件,所以会对齐合并

    原回答者GitHub用户agapple

    2023-04-26 18:48:27
    赞同 展开评论 打赏
问答排行榜
最热
最新

相关电子书

更多
One Box: 解读事务与分析一体化数据库 HybridDB for MySQL 立即下载
One Box:解读事务与分析一体化数据库HybridDB for MySQL 立即下载
如何支撑HTAP场景-HybridDB for MySQL系统架构和技术演进 立即下载

相关镜像