Open zhanghaiyang9999 opened 5 months ago
it depends on your mysql version. you can dump every events to log and find the pattern. for some mysql version, I remember there are "BEGIN" query events for each transaction.
If you have GTID enabled, GTID_event is the beginning of the transaction and Xid_event is the end of the transaction.
When using the following code, how to detect what's is the transaction begin(if a transaction has multiple operations) ? is the TRANSACTION_CONTEXT_EVENT ? thanks!
streamer, err := syncer.StartSync(pos) contx, cancel := context.WithTimeout(context.Background(), time.Second) ev, err := streamer.GetEvent(contx)