fixed issue #274 , support mysql 5.7.17

This commit is contained in:
agapple
2017-03-17 20:36:40 +08:00
parent d78b389737
commit 83689ee519

View File

@@ -330,15 +330,12 @@ public class QueryLogEvent extends LogEvent {
* MariaDb type, * MariaDb type,
* sec_part of NOW() * sec_part of NOW()
*/ */
+ 1 + (MAX_DBS_IN_EVENT_MTS * (1 + NAME_LEN)) + 3 + 1 + 16 + 1 + 60/* + 1 + (MAX_DBS_IN_EVENT_MTS * (1 + NAME_LEN)) + 3 + 1 + 32 * 3
* type + 1 + 60/*
* , * type ,
* user_len * user_len ,
* , * user ,
* user * host_len ,
* ,
* host_len
* ,
* host * host
*/); */);
/** /**
@@ -548,6 +545,22 @@ public class QueryLogEvent extends LogEvent {
public static final int Q_UPDATED_DB_NAMES = 12; public static final int Q_UPDATED_DB_NAMES = 12;
public static final int Q_MICROSECONDS = 13; public static final int Q_MICROSECONDS = 13;
/**
* A old (unused now) code for Query_log_event status similar to
* G_COMMIT_TS.
*/
public static final int Q_COMMIT_TS = 14;
/**
* A code for Query_log_event status, similar to G_COMMIT_TS2.
*/
public static final int Q_COMMIT_TS2 = 15;
/**
* The master connection @@session.explicit_defaults_for_timestamp which is
* recorded for queries, CREATE and ALTER table that is defined with a
* TIMESTAMP column, that are dependent on that feature. For pre-WL6292
* master's the associated with this code value is zero.
*/
public static final int Q_EXPLICIT_DEFAULTS_FOR_TIMESTAMP = 16;
/** /**
* FROM MariaDB 5.5.34 * FROM MariaDB 5.5.34
@@ -632,6 +645,9 @@ public class QueryLogEvent extends LogEvent {
mtsAccessedDbNames[i] = buffer.getFixString(length < NAME_LEN ? length : NAME_LEN); mtsAccessedDbNames[i] = buffer.getFixString(length < NAME_LEN ? length : NAME_LEN);
} }
break; break;
case Q_EXPLICIT_DEFAULTS_FOR_TIMESTAMP:
buffer.forward(1);
break;
case Q_HRNOW: case Q_HRNOW:
// int when_sec_part = buffer.getUint24(); // int when_sec_part = buffer.getUint24();
buffer.forward(3); buffer.forward(3);