diff --git a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/QueryLogEvent.java b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/QueryLogEvent.java index 045ce422..991593dc 100644 --- a/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/QueryLogEvent.java +++ b/dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/QueryLogEvent.java @@ -633,7 +633,6 @@ public class QueryLogEvent extends LogEvent { */ public static final int Q_OPT_INDEX_FORMAT_GPP_ENABLED = 22; - /** * Replicate ddl_skip_rewrite. * @@ -662,6 +661,15 @@ public class QueryLogEvent extends LogEvent { public static final int Q_CHARACTER_SET_COLLATIONS = 131; + /** + * support PolarDB-X used for storing snapshot tso or commit tso snapshot tso is + * stored in XA End Event with Query_log commit tso is stored in XA Commit Event + * with Query_log + */ + public static final int Q_LIZARD_COMMIT_GCN = 200; + + public static final int Q_LIZARD_PREPARE_GCN = 201; + private final void unpackVariables(LogBuffer buffer, final int end) throws IOException { int code = -1; try { @@ -812,6 +820,14 @@ public class QueryLogEvent extends LogEvent { // character_set_collations= Lex_cstring((const char *) pos0 , (const char *) pos); buffer.forward(count * 4); break; + case Q_LIZARD_COMMIT_GCN: + // commitGCN = buffer.getLong64(); + buffer.forward(8); + break; + case Q_LIZARD_PREPARE_GCN: + // prepareGCN = buffer.getLong64(); + buffer.forward(8); + break; default: /* * That's why you must write status vars in growing