binlog.schemaVersion is 0 for `flaskback cluster`, and `unlock tables` when last table doesn't exist
- Dominant language
- Go
- Stars
- 40.5k
- Forks
- 6.2k
- PR merge metrics
- PR metrics pending
Description
## Bug Report
Please answer these questions before submitting your issue. Thanks!
### 1. Minimal reproduce step (Required)
right now `binlog.schemaVersion` is used by CDC to decide when or whether to run the DDL, and `binlog.schemaVersion` might be 0 when the DDL is skipped due to `if not exist`, `if exist` and `alter table cache/no cache` but table is already in the expect state
but for below cases, `binlog.schemaVersion` is also 0. as CDC don't sync below types of DDL right now, will mark this issue as moderate
binlog info are not set for `flaskback cluster`,so binlog.schemaVersion is always 0
https://github.com/pingcap/tidb/blob/bb9096cac669af40ffb8dbaee881de11cef4bdf2/pkg/ddl/cluster.go#L834-L836
for `unlock table` when last table doesn't exist, the final binlog.schemaVersion is also 0
https://github.com/pingcap/tidb/blob/bb9096cac669af40ffb8dbaee881de11cef4bdf2/pkg/ddl/table_lock.go#L179-L184
https://github.com/pingcap/tidb/blob/bb9096cac669af40ffb8dbaee881de11cef4bdf2/pkg/ddl/table_lock.go#L234-L237
### 2. What did you expect to see? (Required)
### 3. What did you see instead (Required)
### 4. What is your TiDB version? (Required)
master
Contributor guide
Assessment
This issue has not been assessed yet.