Skip to content

Commit 02fffc9

Browse files
committed
compatiable polardb-x
1 parent 5ca4c39 commit 02fffc9

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

dbsync/src/main/java/com/taobao/tddl/dbsync/binlog/event/QueryLogEvent.java

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -633,7 +633,6 @@ public QueryLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEve
633633
*/
634634
public static final int Q_OPT_INDEX_FORMAT_GPP_ENABLED = 22;
635635

636-
637636
/**
638637
* Replicate ddl_skip_rewrite.
639638
*
@@ -662,6 +661,15 @@ public QueryLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEve
662661

663662
public static final int Q_CHARACTER_SET_COLLATIONS = 131;
664663

664+
/**
665+
* support PolarDB-X used for storing snapshot tso or commit tso snapshot tso is
666+
* stored in XA End Event with Query_log commit tso is stored in XA Commit Event
667+
* with Query_log
668+
*/
669+
public static final int Q_LIZARD_COMMIT_GCN = 200;
670+
671+
public static final int Q_LIZARD_PREPARE_GCN = 201;
672+
665673
private final void unpackVariables(LogBuffer buffer, final int end) throws IOException {
666674
int code = -1;
667675
try {
@@ -812,6 +820,14 @@ private final void unpackVariables(LogBuffer buffer, final int end) throws IOExc
812820
// character_set_collations= Lex_cstring((const char *) pos0 , (const char *) pos);
813821
buffer.forward(count * 4);
814822
break;
823+
case Q_LIZARD_COMMIT_GCN:
824+
// commitGCN = buffer.getLong64();
825+
buffer.forward(8);
826+
break;
827+
case Q_LIZARD_PREPARE_GCN:
828+
// prepareGCN = buffer.getLong64();
829+
buffer.forward(8);
830+
break;
815831
default:
816832
/*
817833
* That's why you must write status vars in growing

0 commit comments

Comments
 (0)