Skip to content

Commit e233bec

Browse files
committed
fixed issue #5012 , support mariadb 11 for Q_CHARACTER_SET_COLLATIONS
1 parent 67e0928 commit e233bec

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

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

+9
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,8 @@ public QueryLogEvent(LogHeader header, LogBuffer buffer, FormatDescriptionLogEve
641641

642642
public static final int Q_GTID_FLAGS3 = 130;
643643

644+
public static final int Q_CHARACTER_SET_COLLATIONS = 131;
645+
644646
private final void unpackVariables(LogBuffer buffer, final int end) throws IOException {
645647
int code = -1;
646648
try {
@@ -772,6 +774,11 @@ private final void unpackVariables(LogBuffer buffer, final int end) throws IOExc
772774
buffer.forward(8);
773775
}
774776
break;
777+
case Q_CHARACTER_SET_COLLATIONS :
778+
// mariadb
779+
int count = buffer.getUint8();
780+
// character_set_collations= Lex_cstring((const char *) pos0 , (const char *) pos);
781+
buffer.forward(count * 4);
775782
default:
776783
/*
777784
* That's why you must write status vars in growing
@@ -835,6 +842,8 @@ private static final String findCodeName(final int code) {
835842
return "Q_XID";
836843
case Q_GTID_FLAGS3:
837844
return "Q_GTID_FLAGS3";
845+
case Q_CHARACTER_SET_COLLATIONS :
846+
return "Q_CHARACTER_SET_COLLATIONS";
838847
}
839848
return "CODE#" + code;
840849
}

0 commit comments

Comments
 (0)