Merge branch 'blr' into release-1.0GA
Conflicts: server/modules/protocol/mysql_backend.c server/modules/routing/binlog/blr_master.c
This commit is contained in:
@ -41,6 +41,8 @@
|
||||
#define BINLOG_NAMEFMT "%s.%06d"
|
||||
#define BINLOG_NAME_ROOT "mysql-bin"
|
||||
|
||||
#define BINLOG_EVENT_HDR_LEN 19
|
||||
|
||||
/* How often to call the binlog status function (seconds) */
|
||||
#define BLR_STATS_FREQ 60
|
||||
#define BLR_NSTATS_MINUTES 30
|
||||
@ -64,9 +66,9 @@
|
||||
* BLR_MASTER_BACKOFF_TIME The increments of the back off time (seconds)
|
||||
* BLR_MAX_BACKOFF Maximum number of increments to backoff to
|
||||
*/
|
||||
|
||||
#define BLR_MASTER_BACKOFF_TIME 5
|
||||
#define BLR_MASTER_BACKOFF_TIME 10
|
||||
#define BLR_MAX_BACKOFF 60
|
||||
|
||||
/**
|
||||
* Some useful macros for examining the MySQL Response packets
|
||||
*/
|
||||
@ -128,6 +130,7 @@ typedef struct blfile {
|
||||
*/
|
||||
typedef struct {
|
||||
int n_events; /*< Number of events sent */
|
||||
unsigned long n_bytes; /*< Number of bytes sent */
|
||||
int n_bursts; /*< Number of bursts sent */
|
||||
int n_requests; /*< Number of requests received */
|
||||
int n_flows; /*< Number of flow control restarts */
|
||||
@ -138,6 +141,7 @@ typedef struct {
|
||||
int n_above;
|
||||
int n_failed_read;
|
||||
int n_overrun;
|
||||
int n_caughtup;
|
||||
int n_actions[3];
|
||||
uint64_t lastsample;
|
||||
int minno;
|
||||
@ -175,6 +179,7 @@ typedef struct router_slave {
|
||||
*router; /*< Pointer to the owning router */
|
||||
struct router_slave *next;
|
||||
SLAVE_STATS stats; /*< Slave statistics */
|
||||
time_t connect_time; /*< Connect time of slave */
|
||||
#if defined(SS_DEBUG)
|
||||
skygw_chk_t rses_chk_tail;
|
||||
#endif
|
||||
@ -271,6 +276,7 @@ typedef struct router_instance {
|
||||
int active_logs;
|
||||
int reconnect_pending;
|
||||
int retry_backoff;
|
||||
time_t connect_time;
|
||||
int handling_threads;
|
||||
struct router_instance
|
||||
*next;
|
||||
@ -280,25 +286,26 @@ typedef struct router_instance {
|
||||
* State machine for the master to MaxScale replication
|
||||
*/
|
||||
#define BLRM_UNCONNECTED 0x0000
|
||||
#define BLRM_AUTHENTICATED 0x0001
|
||||
#define BLRM_TIMESTAMP 0x0002
|
||||
#define BLRM_SERVERID 0x0003
|
||||
#define BLRM_HBPERIOD 0x0004
|
||||
#define BLRM_CHKSUM1 0x0005
|
||||
#define BLRM_CHKSUM2 0x0006
|
||||
#define BLRM_GTIDMODE 0x0007
|
||||
#define BLRM_MUUID 0x0008
|
||||
#define BLRM_SUUID 0x0009
|
||||
#define BLRM_LATIN1 0x000A
|
||||
#define BLRM_UTF8 0x000B
|
||||
#define BLRM_SELECT1 0x000C
|
||||
#define BLRM_SELECTVER 0x000D
|
||||
#define BLRM_REGISTER 0x000E
|
||||
#define BLRM_BINLOGDUMP 0x000F
|
||||
#define BLRM_CONNECTING 0x0001
|
||||
#define BLRM_AUTHENTICATED 0x0002
|
||||
#define BLRM_TIMESTAMP 0x0003
|
||||
#define BLRM_SERVERID 0x0004
|
||||
#define BLRM_HBPERIOD 0x0005
|
||||
#define BLRM_CHKSUM1 0x0006
|
||||
#define BLRM_CHKSUM2 0x0007
|
||||
#define BLRM_GTIDMODE 0x0008
|
||||
#define BLRM_MUUID 0x0009
|
||||
#define BLRM_SUUID 0x000A
|
||||
#define BLRM_LATIN1 0x000B
|
||||
#define BLRM_UTF8 0x000C
|
||||
#define BLRM_SELECT1 0x000D
|
||||
#define BLRM_SELECTVER 0x000E
|
||||
#define BLRM_REGISTER 0x000F
|
||||
#define BLRM_BINLOGDUMP 0x0010
|
||||
|
||||
#define BLRM_MAXSTATE 0x000F
|
||||
#define BLRM_MAXSTATE 0x0010
|
||||
|
||||
static char *blrm_states[] = { "Unconnected", "Authenticated", "Timestamp retrieval",
|
||||
static char *blrm_states[] = { "Unconnected", "Connecting", "Authenticated", "Timestamp retrieval",
|
||||
"Server ID retrieval", "HeartBeat Period setup", "binlog checksum config",
|
||||
"binlog checksum rerieval", "GTID Mode retrieval", "Master UUID retrieval",
|
||||
"Set Slave UUID", "Set Names latin1", "Set Names utf8", "select 1",
|
||||
@ -373,6 +380,8 @@ static char *blrs_states[] = { "Created", "Unregistered", "Registered",
|
||||
#define ANONYMOUS_GTID_EVENT 0x22
|
||||
#define PREVIOUS_GTIDS_EVENT 0x23
|
||||
|
||||
#define MAX_EVENT_TYPE 0x23
|
||||
|
||||
/**
|
||||
* Binlog event flags
|
||||
*/
|
||||
|
Reference in New Issue
Block a user