mirror of
https://github.com/alibaba/canal.git
synced 2026-11-04 00:30:15 +08:00
fixed polardbx panda index
This commit is contained in:
@@ -188,8 +188,9 @@ public class LogBuffer {
|
|||||||
* <tt>newLimit</tt> do not hold
|
* <tt>newLimit</tt> do not hold
|
||||||
*/
|
*/
|
||||||
public final LogBuffer limit(int newLimit) {
|
public final LogBuffer limit(int newLimit) {
|
||||||
if (origin + newLimit > buffer.length || newLimit < 0) throw new IllegalArgumentException("capacity excceed: "
|
if (origin + newLimit > buffer.length || newLimit < 0) {
|
||||||
+ (origin + newLimit));
|
throw new IllegalArgumentException("capacity excceed: " + (origin + newLimit));
|
||||||
|
}
|
||||||
|
|
||||||
limit = newLimit;
|
limit = newLimit;
|
||||||
return this;
|
return this;
|
||||||
|
|||||||
@@ -187,6 +187,15 @@ public abstract class LogEvent {
|
|||||||
/* New MySQL/Sun events are to be added right above this comment */
|
/* New MySQL/Sun events are to be added right above this comment */
|
||||||
public static final int MYSQL_EVENTS_END = 49;
|
public static final int MYSQL_EVENTS_END = 49;
|
||||||
|
|
||||||
|
// PolarDB-X 2.5.0
|
||||||
|
// CONSENSUS EVENTS START
|
||||||
|
public static final int CONSENSUS_LOG_EVENT = 101;
|
||||||
|
public static final int PREVIOUS_CONSENSUS_INDEX_LOG_EVENT = 102;
|
||||||
|
public static final int CONSENSUS_CLUSTER_INFO_EVENT = 103;
|
||||||
|
public static final int CONSENSUS_EMPTY_EVENT = 104;
|
||||||
|
public static final int GCN_LOG_EVENT = 105;
|
||||||
|
// CONSENSUS EVENTS END
|
||||||
|
|
||||||
public static final int MARIA_EVENTS_BEGIN = 160;
|
public static final int MARIA_EVENTS_BEGIN = 160;
|
||||||
/* New Maria event numbers start from here */
|
/* New Maria event numbers start from here */
|
||||||
public static final int ANNOTATE_ROWS_EVENT = 160;
|
public static final int ANNOTATE_ROWS_EVENT = 160;
|
||||||
@@ -229,7 +238,7 @@ public abstract class LogEvent {
|
|||||||
public static final int DELETE_ROWS_COMPRESSED_EVENT = 171;
|
public static final int DELETE_ROWS_COMPRESSED_EVENT = 171;
|
||||||
|
|
||||||
/** end marker */
|
/** end marker */
|
||||||
public static final int ENUM_END_EVENT = 171;
|
public static final int ENUM_END_EVENT = 172;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 1 byte length, 1 byte format Length is total length in bytes, including 2
|
* 1 byte length, 1 byte format Length is total length in bytes, including 2
|
||||||
@@ -404,6 +413,16 @@ public abstract class LogEvent {
|
|||||||
return "Xa_prepare";
|
return "Xa_prepare";
|
||||||
case TRANSACTION_PAYLOAD_EVENT :
|
case TRANSACTION_PAYLOAD_EVENT :
|
||||||
return "transaction_payload";
|
return "transaction_payload";
|
||||||
|
case CONSENSUS_LOG_EVENT:
|
||||||
|
return "Consensus_log";
|
||||||
|
case PREVIOUS_CONSENSUS_INDEX_LOG_EVENT:
|
||||||
|
return "Previous_consensus_index";
|
||||||
|
case CONSENSUS_CLUSTER_INFO_EVENT:
|
||||||
|
return "Consensus_cluster_info";
|
||||||
|
case CONSENSUS_EMPTY_EVENT:
|
||||||
|
return "Consensus_empty";
|
||||||
|
case GCN_LOG_EVENT:
|
||||||
|
return "Gcn_log";
|
||||||
default:
|
default:
|
||||||
return "Unknown type:" + type;
|
return "Unknown type:" + type;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -670,6 +670,8 @@ public class QueryLogEvent extends LogEvent {
|
|||||||
|
|
||||||
public static final int Q_LIZARD_PREPARE_GCN = 201;
|
public static final int Q_LIZARD_PREPARE_GCN = 201;
|
||||||
|
|
||||||
|
public static final int Q_OPT_INDEX_FORMAT_PANDA_ENABLED = 255;
|
||||||
|
|
||||||
private final void unpackVariables(LogBuffer buffer, final int end) throws IOException {
|
private final void unpackVariables(LogBuffer buffer, final int end) throws IOException {
|
||||||
int code = -1;
|
int code = -1;
|
||||||
try {
|
try {
|
||||||
@@ -828,6 +830,10 @@ public class QueryLogEvent extends LogEvent {
|
|||||||
// prepareGCN = buffer.getLong64();
|
// prepareGCN = buffer.getLong64();
|
||||||
buffer.forward(8);
|
buffer.forward(8);
|
||||||
break;
|
break;
|
||||||
|
case Q_OPT_INDEX_FORMAT_PANDA_ENABLED:
|
||||||
|
// *start++ = thd->variables.opt_index_format_panda_enabled;
|
||||||
|
buffer.forward(1);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
/*
|
/*
|
||||||
* That's why you must write status vars in growing
|
* That's why you must write status vars in growing
|
||||||
@@ -888,6 +894,8 @@ public class QueryLogEvent extends LogEvent {
|
|||||||
return "Q_OPT_FLASHBACK_AREA";
|
return "Q_OPT_FLASHBACK_AREA";
|
||||||
case Q_OPT_INDEX_FORMAT_GPP_ENABLED:
|
case Q_OPT_INDEX_FORMAT_GPP_ENABLED:
|
||||||
return "Q_OPT_INDEX_FORMAT_GPP_ENABLED";
|
return "Q_OPT_INDEX_FORMAT_GPP_ENABLED";
|
||||||
|
case Q_OPT_INDEX_FORMAT_PANDA_ENABLED:
|
||||||
|
return "Q_OPT_INDEX_FORMAT_PANDA_ENABLED";
|
||||||
case Q_HRNOW:
|
case Q_HRNOW:
|
||||||
// or Q_WSREP_SKIP_READONLY_CHECKS
|
// or Q_WSREP_SKIP_READONLY_CHECKS
|
||||||
return "Q_HRNOW";
|
return "Q_HRNOW";
|
||||||
|
|||||||
Reference in New Issue
Block a user