mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
Updated FAQ (markdown)
8
FAQ.md
8
FAQ.md
@@ -1,13 +1,16 @@
|
||||
问1:INSERT/UPDATE/DELETE被解析为Query或DDL语句?
|
||||
|
||||
答1:
|
||||
出现这类情况主要原因为收到的binlog就为Query事件,比如:
|
||||
1. binlog格式为非row模式,通过show variables like 'binlog\_format'可以查看. 针对statement/mixed模式,DML语句都会是以SQL语句存在
|
||||
2. mysql5.6+之后,在binlog为row模式下,针对DML语句通过一个开关(binlog-rows-query-log-events=true),记录DML的原始SQL,对应binlog事件为RowsQueryLogEvent,同时也有对应的row记录. ps. canal可以通过properties设置来过滤:canal.instance.filter.query.dml = true
|
||||
|
||||
|
||||
***
|
||||
---
|
||||
|
||||
|
||||
问2:设置了数据表的过滤条件,但貌似没有生效?
|
||||
|
||||
答2:
|
||||
1. 首先看文档[AdminGuide](AdminGuide),了解<span data-type="color" style="color:rgb(36, 41, 46)"><span data-type="background" style="background-color:rgb(255, 255, 255)">canal.instance.filter.regex的书写格式</span></span>
|
||||
```plain
|
||||
@@ -24,4 +27,5 @@
|
||||
3. 检查下CanalConnector是否调用subscribe(filter)方法;有的话,filter需要和instance.properties的canal.instance.filter.regex一致,否则subscribe的filter会覆盖instance的配置,如果subscribe的filter是.\*\\..\*,那么相当于你消费了所有的更新数据 <span data-type="color" style="color:#F5222D">【特别注意】</span>
|
||||
4. 检查一下[历史的issue列表](https://github.com/alibaba/canal/issues?utf8=%E2%9C%93&q=subscribe),很有可能你的提问别人已经遇到过并解决了,比如表达式不对,特别是双斜杠的问题
|
||||
|
||||
***
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user