Open chj733 opened 3 years ago
for _, stmt := range stmts {
nodes := parseStmt(stmt)
for _, node := range nodes {
if node.db == "" {
node.db = string(e.Schema)
}
if err = c.updateTable(ev.Header, node.db, node.table); err != nil {
return errors.Trace(err)
}
}
// if len(nodes) > 0
if len(nodes) >= 0 {
savePos = true
force = true
// Now we only handle Table Changed DDL, maybe we will support more later.
if err = c.eventHandler.OnDDL(ev.Header, pos, e); err != nil {
return errors.Trace(err)
}
}
}
change the len(nodes) >= 0 will always receive the ddl, or you can update parseStmt() to add the ddl type you want
sync.go里面 1.目前对于存储过程,触发器等对象的DDL,因为parser无法解析,是直接忽略的,能否至少继续传递event? 我下游收到这个DDL query还是有用的 2.能否针对DDL,带上schema信息?