MXS-1266: cosmetic changes
MXS-1266: cosmetic changes
This commit is contained in:
@ -91,10 +91,15 @@
|
||||
/* The router entry points */
|
||||
static MXS_ROUTER *createInstance(SERVICE *service, char **options);
|
||||
static void free_instance(ROUTER_INSTANCE *instance);
|
||||
static MXS_ROUTER_SESSION *newSession(MXS_ROUTER *instance, MXS_SESSION *session);
|
||||
static void closeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session);
|
||||
static void freeSession(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session);
|
||||
static int routeQuery(MXS_ROUTER *instance, MXS_ROUTER_SESSION *router_session, GWBUF *queue);
|
||||
static MXS_ROUTER_SESSION *newSession(MXS_ROUTER *instance,
|
||||
MXS_SESSION *session);
|
||||
static void closeSession(MXS_ROUTER *instance,
|
||||
MXS_ROUTER_SESSION *router_session);
|
||||
static void freeSession(MXS_ROUTER *instance,
|
||||
MXS_ROUTER_SESSION *router_session);
|
||||
static int routeQuery(MXS_ROUTER *instance,
|
||||
MXS_ROUTER_SESSION *router_session,
|
||||
GWBUF *queue);
|
||||
static void diagnostics(MXS_ROUTER *instance, DCB *dcb);
|
||||
static json_t* diagnostics_json(const MXS_ROUTER *instance);
|
||||
static void clientReply(MXS_ROUTER *instance,
|
||||
@ -109,14 +114,21 @@ static void errorReply(MXS_ROUTER *instance,
|
||||
bool *succp);
|
||||
|
||||
static uint64_t getCapabilities(MXS_ROUTER* instance);
|
||||
static int blr_handler_config(void *userdata, const char *section, const char *name, const char *value);
|
||||
static int blr_handle_config_item(const char *name, const char *value, ROUTER_INSTANCE *inst);
|
||||
static int blr_handler_config(void *userdata,
|
||||
const char *section,
|
||||
const char *name,
|
||||
const char *value);
|
||||
static int blr_handle_config_item(const char *name,
|
||||
const char *value,
|
||||
ROUTER_INSTANCE *inst);
|
||||
static int blr_load_dbusers(const ROUTER_INSTANCE *router);
|
||||
static int blr_check_binlog(ROUTER_INSTANCE *router);
|
||||
void blr_master_close(ROUTER_INSTANCE *);
|
||||
void blr_free_ssl_data(ROUTER_INSTANCE *inst);
|
||||
static void destroyInstance(MXS_ROUTER *instance);
|
||||
bool blr_extract_key(const char *linebuf, int nline, ROUTER_INSTANCE *router);
|
||||
bool blr_extract_key(const char *linebuf,
|
||||
int nline,
|
||||
ROUTER_INSTANCE *router);
|
||||
bool blr_get_encryption_key(ROUTER_INSTANCE *router);
|
||||
int blr_parse_key_file(ROUTER_INSTANCE *router);
|
||||
static bool blr_open_gtid_maps_storage(ROUTER_INSTANCE *inst);
|
||||
@ -125,7 +137,8 @@ static void stats_func(void *);
|
||||
|
||||
static bool rses_begin_locked_router_action(ROUTER_SLAVE *);
|
||||
static void rses_end_locked_router_action(ROUTER_SLAVE *);
|
||||
GWBUF *blr_cache_read_response(ROUTER_INSTANCE *router, char *response);
|
||||
GWBUF *blr_cache_read_response(ROUTER_INSTANCE *router,
|
||||
char *response);
|
||||
extern bool blr_load_last_mariadb_gtid(ROUTER_INSTANCE *router,
|
||||
MARIADB_GTID_INFO *result);
|
||||
|
||||
@ -205,11 +218,13 @@ MXS_MODULE* MXS_CREATE_MODULE()
|
||||
{"transaction_safety", MXS_MODULE_PARAM_BOOL, "false"},
|
||||
{"semisync", MXS_MODULE_PARAM_BOOL, "false"},
|
||||
{"encrypt_binlog", MXS_MODULE_PARAM_BOOL, "false"},
|
||||
{"encryption_algorithm", MXS_MODULE_PARAM_ENUM, "aes_cbc", MXS_MODULE_OPT_NONE, enc_algo_values},
|
||||
{"encryption_algorithm", MXS_MODULE_PARAM_ENUM, "aes_cbc",
|
||||
MXS_MODULE_OPT_NONE, enc_algo_values},
|
||||
{"encryption_key_file", MXS_MODULE_PARAM_PATH, NULL, MXS_MODULE_OPT_PATH_R_OK},
|
||||
{"mariadb10_slave_gtid", MXS_MODULE_PARAM_BOOL, "false"},
|
||||
{"mariadb10_master_gtid", MXS_MODULE_PARAM_BOOL, "false"},
|
||||
{"binlog_structure", MXS_MODULE_PARAM_ENUM, "flat", MXS_MODULE_OPT_NONE, binlog_storage_values},
|
||||
{"binlog_structure", MXS_MODULE_PARAM_ENUM, "flat",
|
||||
MXS_MODULE_OPT_NONE, binlog_storage_values},
|
||||
{"shortburst", MXS_MODULE_PARAM_COUNT, DEF_SHORT_BURST},
|
||||
{"longburst", MXS_MODULE_PARAM_COUNT, DEF_LONG_BURST},
|
||||
{"burstsize", MXS_MODULE_PARAM_SIZE, DEF_BURST_SIZE},
|
||||
@ -383,8 +398,11 @@ createInstance(SERVICE *service, char **options)
|
||||
|
||||
/* Binlog encryption */
|
||||
inst->encryption.enabled = config_get_bool(params, "encrypt_binlog");
|
||||
inst->encryption.encryption_algorithm = config_get_enum(params, "encryption_algorithm", enc_algo_values);
|
||||
inst->encryption.key_management_filename = config_copy_string(params, "encryption_key_file");
|
||||
inst->encryption.encryption_algorithm = config_get_enum(params,
|
||||
"encryption_algorithm",
|
||||
enc_algo_values);
|
||||
inst->encryption.key_management_filename = config_copy_string(params,
|
||||
"encryption_key_file");
|
||||
|
||||
/* Encryption CTX */
|
||||
inst->encryption_ctx = NULL;
|
||||
@ -668,7 +686,8 @@ createInstance(SERVICE *service, char **options)
|
||||
}
|
||||
else
|
||||
{
|
||||
MXS_ERROR("%s: Error: No router options supplied for binlogrouter", service->name);
|
||||
MXS_ERROR("%s: Error: No router options supplied for binlogrouter",
|
||||
service->name);
|
||||
}
|
||||
|
||||
inst->orig_masterid = 0;
|
||||
@ -678,9 +697,11 @@ createInstance(SERVICE *service, char **options)
|
||||
inst->set_master_server_id = true;
|
||||
}
|
||||
|
||||
if ((inst->binlogdir == NULL) || (inst->binlogdir != NULL && !strlen(inst->binlogdir)))
|
||||
if ((inst->binlogdir == NULL) ||
|
||||
(inst->binlogdir != NULL && !strlen(inst->binlogdir)))
|
||||
{
|
||||
MXS_ERROR("Service %s, binlog directory is not specified", service->name);
|
||||
MXS_ERROR("Service %s, binlog directory is not specified",
|
||||
service->name);
|
||||
free_instance(inst);
|
||||
return NULL;
|
||||
}
|
||||
@ -688,7 +709,8 @@ createInstance(SERVICE *service, char **options)
|
||||
if (inst->serverid <= 0)
|
||||
{
|
||||
MXS_ERROR("Service %s, server-id is not configured. "
|
||||
"Please configure it with a unique positive integer value (1..2^32-1)",
|
||||
"Please configure it with a unique positive "
|
||||
"integer value (1..2^32-1)",
|
||||
service->name);
|
||||
free_instance(inst);
|
||||
return NULL;
|
||||
@ -788,8 +810,11 @@ createInstance(SERVICE *service, char **options)
|
||||
{
|
||||
SERVER *server;
|
||||
SSL_LISTENER *ssl_cfg;
|
||||
server = server_alloc("binlog_router_master_host", "_none_", 3306,
|
||||
"MySQLBackend", "MySQLBackendAuth", NULL);
|
||||
server = server_alloc("binlog_router_master_host",
|
||||
"_none_", 3306,
|
||||
"MySQLBackend",
|
||||
"MySQLBackendAuth",
|
||||
NULL);
|
||||
if (server == NULL)
|
||||
{
|
||||
MXS_ERROR("%s: Error for server_alloc in createInstance",
|
||||
@ -887,12 +912,15 @@ createInstance(SERVICE *service, char **options)
|
||||
|
||||
if (inst->ssl_enabled)
|
||||
{
|
||||
if (service->dbref && service->dbref->server && service->dbref->server->server_ssl)
|
||||
if (service->dbref &&
|
||||
service->dbref->server &&
|
||||
service->dbref->server->server_ssl)
|
||||
{
|
||||
/* Initialise SSL: exit on error */
|
||||
if (listener_init_SSL(service->dbref->server->server_ssl) != 0)
|
||||
{
|
||||
MXS_ERROR("%s: Unable to initialize SSL with backend server", service->name);
|
||||
MXS_ERROR("%s: Unable to initialize SSL with backend server",
|
||||
service->name);
|
||||
/* Free SSL struct */
|
||||
/* Note: SSL struct in server should be freed by server_free() */
|
||||
blr_free_ssl_data(inst);
|
||||
@ -1087,7 +1115,7 @@ createInstance(SERVICE *service, char **options)
|
||||
inst->m_errno = BINLOG_FATAL_ERROR_READING;
|
||||
inst->m_errmsg = MXS_STRDUP_A("HY000 Binlog encryption is Off"
|
||||
" but current binlog file has"
|
||||
" the START_ENCRYPTION_EVENT");
|
||||
" the START_ENCRYPTION_EVENT");
|
||||
|
||||
return (MXS_ROUTER *)inst;
|
||||
}
|
||||
|
@ -215,7 +215,8 @@ typedef enum
|
||||
#define BLR_NSTATS_MINUTES 30
|
||||
|
||||
/**
|
||||
* High and Low water marks for the slave dcb. These values can be overriden
|
||||
* High and Low water marks for the slave dcb.
|
||||
* These values can be overriden
|
||||
* by the router options highwater and lowwater.
|
||||
*/
|
||||
#define DEF_LOW_WATER "1000"
|
||||
@ -279,8 +280,29 @@ typedef enum
|
||||
#define MARIADB_FL_STANDALONE 1
|
||||
|
||||
/* Maxwell-related SQL queries */
|
||||
#define MYSQL_CONNECTOR_SERVER_VARS_QUERY "SELECT @@session.auto_increment_increment AS auto_increment_increment, @@character_set_client AS character_set_client, @@character_set_connection AS character_set_connection, @@character_set_results AS character_set_results, @@character_set_server AS character_set_server, @@init_connect AS init_connect, @@interactive_timeout AS interactive_timeout, @@license AS license, @@lower_case_table_names AS lower_case_table_names, @@max_allowed_packet AS max_allowed_packet, @@net_buffer_length AS net_buffer_length, @@net_write_timeout AS net_write_timeout, @@query_cache_size AS query_cache_size, @@query_cache_type AS query_cache_type, @@sql_mode AS sql_mode, @@system_time_zone AS system_time_zone, @@time_zone AS time_zone, @@tx_isolation AS tx_isolation, @@wait_timeout AS wait_timeout"
|
||||
#define MYSQL_CONNECTOR_SQL_MODE_QUERY "SET sql_mode='NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'"
|
||||
#define MYSQL_CONNECTOR_SERVER_VARS_QUERY "SELECT " \
|
||||
"@@session.auto_increment_increment AS auto_increment_increment, " \
|
||||
"@@character_set_client AS character_set_client, " \
|
||||
"@@character_set_connection AS character_set_connection, " \
|
||||
"@@character_set_results AS character_set_results, " \
|
||||
"@@character_set_server AS character_set_server, " \
|
||||
"@@init_connect AS init_connect, " \
|
||||
"@@interactive_timeout AS interactive_timeout, " \
|
||||
"@@license AS license, " \
|
||||
"@@lower_case_table_names AS lower_case_table_names, " \
|
||||
"@@max_allowed_packet AS max_allowed_packet, " \
|
||||
"@@net_buffer_length AS net_buffer_length, " \
|
||||
"@@net_write_timeout AS net_write_timeout, " \
|
||||
"@@query_cache_size AS query_cache_size, " \
|
||||
"@@query_cache_type AS query_cache_type, " \
|
||||
"@@sql_mode AS sql_mode, " \
|
||||
"@@system_time_zone AS system_time_zone, " \
|
||||
"@@time_zone AS time_zone, " \
|
||||
"@@tx_isolation AS tx_isolation, " \
|
||||
"@@wait_timeout AS wait_timeout"
|
||||
|
||||
#define MYSQL_CONNECTOR_SQL_MODE_QUERY "SET sql_mode=" \
|
||||
"'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION,STRICT_TRANS_TABLES'"
|
||||
|
||||
/* Saved credential file name's tail */
|
||||
static const char BLR_DBUSERS_DIR[] = "cache/users";
|
||||
@ -301,7 +323,7 @@ enum blr_event_state
|
||||
{
|
||||
BLR_EVENT_STARTED, /*< The first packet of an event has been received */
|
||||
BLR_EVENT_ONGOING, /*< Other packets of a multi-packet event are being processed */
|
||||
BLR_EVENT_DONE, /*< The complete event was received */
|
||||
BLR_EVENT_DONE, /*< The complete event was received */
|
||||
};
|
||||
|
||||
/** MariaDB GTID elements */
|
||||
@ -399,13 +421,14 @@ typedef struct
|
||||
|
||||
typedef struct blfile
|
||||
{
|
||||
char binlogname[BINLOG_FNAMELEN + 1]; /*< Name of the binlog file */
|
||||
int fd; /*< Actual file descriptor */
|
||||
int refcnt; /*< Reference count for file */
|
||||
BLCACHE *cache; /*< Record cache for this file */
|
||||
SPINLOCK lock; /*< The file lock */
|
||||
MARIADB_GTID_ELEMS info; /*< Elements for file prefix */
|
||||
struct blfile *next; /*< Next file in list */
|
||||
char binlogname[BINLOG_FNAMELEN + 1];
|
||||
/*< Name of the binlog file */
|
||||
int fd; /*< Actual file descriptor */
|
||||
int refcnt; /*< Reference count for file */
|
||||
BLCACHE *cache; /*< Record cache for this file */
|
||||
SPINLOCK lock; /*< The file lock */
|
||||
MARIADB_GTID_ELEMS info; /*< Elements for file prefix */
|
||||
struct blfile *next; /*< Next file in list */
|
||||
} BLFILE;
|
||||
|
||||
/**
|
||||
@ -454,49 +477,56 @@ typedef struct router_slave
|
||||
#if defined(SS_DEBUG)
|
||||
skygw_chk_t rses_chk_top;
|
||||
#endif
|
||||
DCB *dcb; /*< The slave server DCB */
|
||||
int state; /*< The state of this slave */
|
||||
uint32_t binlog_pos; /*< Binlog position for this slave */
|
||||
DCB *dcb; /*< The slave server DCB */
|
||||
int state; /*< The state of this slave */
|
||||
uint32_t binlog_pos; /*< Binlog position for this slave */
|
||||
char binlogfile[BINLOG_FNAMELEN + 1];
|
||||
/*< Current binlog file for this slave */
|
||||
char *uuid; /*< Slave UUID */
|
||||
char *uuid; /*< Slave UUID */
|
||||
#ifdef BLFILE_IN_SLAVE
|
||||
BLFILE *file; /*< Currently open binlog file */
|
||||
BLFILE *file; /*< Currently open binlog file */
|
||||
#endif
|
||||
int serverid; /*< Server-id of the slave */
|
||||
char *hostname; /*< Hostname of the slave, if known */
|
||||
char *user; /*< Username if given */
|
||||
char *passwd; /*< Password if given */
|
||||
short port; /*< MySQL port */
|
||||
int nocrc; /*< Disable CRC */
|
||||
int serverid; /*< Server-id of the slave */
|
||||
char *hostname; /*< Hostname of the slave, if known */
|
||||
char *user; /*< Username if given */
|
||||
char *passwd; /*< Password if given */
|
||||
short port; /*< MySQL port */
|
||||
int nocrc; /*< Disable CRC */
|
||||
int overrun;
|
||||
uint32_t rank; /*< Replication rank */
|
||||
uint8_t seqno; /*< Replication dump sequence no */
|
||||
uint32_t lastEventTimestamp;/*< Last event timestamp sent */
|
||||
SPINLOCK catch_lock; /*< Event catchup lock */
|
||||
unsigned int cstate; /*< Catch up state */
|
||||
uint32_t rank; /*< Replication rank */
|
||||
uint8_t seqno; /*< Replication dump sequence no */
|
||||
uint32_t lastEventTimestamp;
|
||||
/*< Last event timestamp sent */
|
||||
SPINLOCK catch_lock; /*< Event catchup lock */
|
||||
unsigned int cstate; /*< Catch up state */
|
||||
bool mariadb10_compat;/*< MariaDB 10.0 compatibility */
|
||||
SPINLOCK rses_lock; /*< Protects rses_deleted */
|
||||
SPINLOCK rses_lock; /*< Protects rses_deleted */
|
||||
pthread_t pthread;
|
||||
struct router_instance
|
||||
*router; /*< Pointer to the owning router */
|
||||
struct router_instance *router; /*< Pointer to the owning router */
|
||||
struct router_slave *next;
|
||||
SLAVE_STATS stats; /*< Slave statistics */
|
||||
time_t connect_time; /*< Connect time of slave */
|
||||
char *warning_msg; /*< Warning message */
|
||||
int heartbeat; /*< Heartbeat in seconds */
|
||||
uint8_t lastEventReceived; /*< Last event received */
|
||||
time_t lastReply; /*< Last event sent */
|
||||
// lsi: Last Sent Information
|
||||
blr_thread_role_t lsi_sender_role; /*< Master or slave code sent */
|
||||
THREAD lsi_sender_tid; /*< Who sent */
|
||||
char lsi_binlog_name[BINLOG_FNAMELEN + 1]; /*< Which binlog file */
|
||||
uint32_t lsi_binlog_pos; /*< What position */
|
||||
void *encryption_ctx; /*< Encryption context */
|
||||
bool gtid_strict_mode;/*< MariaDB 10 Slave sets gtid_strict_mode */
|
||||
char *mariadb_gtid; /*< MariaDB 10 Slave connects with GTID */
|
||||
sqlite3 *gtid_maps; /*< GTID storage client handle, read only*/
|
||||
MARIADB_GTID_INFO f_info; /*< GTID info for file name prefix */
|
||||
SLAVE_STATS stats; /*< Slave statistics */
|
||||
time_t connect_time; /*< Connect time of slave */
|
||||
char *warning_msg; /*< Warning message */
|
||||
int heartbeat; /*< Heartbeat in seconds */
|
||||
uint8_t lastEventReceived;
|
||||
/*< Last event received */
|
||||
time_t lastReply; /*< Last event sent */
|
||||
/*< lsi: Last Sent Information */
|
||||
blr_thread_role_t lsi_sender_role;
|
||||
/*< Master or slave code sent */
|
||||
THREAD lsi_sender_tid;
|
||||
/*< Who sent */
|
||||
char lsi_binlog_name[BINLOG_FNAMELEN + 1];
|
||||
/*< Which binlog file */
|
||||
uint32_t lsi_binlog_pos;
|
||||
/*< What position */
|
||||
void *encryption_ctx;
|
||||
/*< Encryption context */
|
||||
bool gtid_strict_mode;
|
||||
/*< MariaDB 10 Slave sets gtid_strict_mode */
|
||||
char *mariadb_gtid; /*< MariaDB 10 Slave connects with GTID */
|
||||
sqlite3 *gtid_maps; /*< GTID storage client handle, read only*/
|
||||
MARIADB_GTID_INFO f_info; /*< GTID info for file name prefix */
|
||||
#if defined(SS_DEBUG)
|
||||
skygw_chk_t rses_chk_tail;
|
||||
#endif
|
||||
@ -552,7 +582,10 @@ typedef struct
|
||||
GWBUF *map; /*< select @@max_allowed_packet */
|
||||
GWBUF *mariadb10; /*< set @mariadb_slave_capability */
|
||||
GWBUF *server_vars; /*< MySQL Connector master server variables */
|
||||
GWBUF *binlog_vars; /*< SELECT @@global.log_bin, @@global.binlog_format, @@global.binlog_row_image; */
|
||||
GWBUF *binlog_vars; /*< SELECT @@global.log_bin,
|
||||
* @@global.binlog_format,
|
||||
* @@global.binlog_row_image;
|
||||
*/
|
||||
GWBUF *lower_case_tables; /*< select @@lower_case_table_names */
|
||||
} MASTER_RESPONSES;
|
||||
|
||||
@ -582,13 +615,14 @@ typedef enum
|
||||
/** Transaction Details */
|
||||
typedef struct pending_transaction
|
||||
{
|
||||
char gtid[GTID_MAX_LEN + 1]; /** MariaDB 10.x GTID */
|
||||
master_transaction_t state; /** Transaction state */
|
||||
uint64_t start_pos; /** The BEGIN pos */
|
||||
uint64_t end_pos; /** The next_pos in COMMIT event */
|
||||
MARIADB_GTID_ELEMS gtid_elms; /** MariaDB 10.x GTID components */
|
||||
bool standalone; /** Standalone event, such as DDL
|
||||
* no terminating COMMIT */
|
||||
char gtid[GTID_MAX_LEN + 1]; /*< MariaDB 10.x GTID */
|
||||
master_transaction_t state; /*< Transaction state */
|
||||
uint64_t start_pos; /*< The BEGIN pos */
|
||||
uint64_t end_pos; /*< The next_pos in COMMIT event */
|
||||
MARIADB_GTID_ELEMS gtid_elms; /*< MariaDB 10.x GTID components */
|
||||
bool standalone; /*< Standalone event, such as DDL
|
||||
* no terminating COMMIT
|
||||
*/
|
||||
} PENDING_TRANSACTION;
|
||||
|
||||
/**
|
||||
@ -608,7 +642,8 @@ typedef struct router_instance
|
||||
char *password; /*< Password to use with master */
|
||||
char *fileroot; /*< Root of binlog filename */
|
||||
bool master_chksum; /*< Does the master provide checksums */
|
||||
bool mariadb10_compat; /*< MariaDB 10.0 compatibility */
|
||||
bool mariadb10_compat;
|
||||
/*< MariaDB 10.0 compatibility */
|
||||
bool maxwell_compat; /*< Zendesk's Maxwell compatibility */
|
||||
char *master_uuid; /*< Set UUID of the master, sent to slaves */
|
||||
DCB *master; /*< DCB for master connection */
|
||||
@ -621,49 +656,51 @@ typedef struct router_instance
|
||||
char *binlogdir; /*< The directory with the binlog files */
|
||||
SPINLOCK binlog_lock; /*< Lock to control update of the binlog position */
|
||||
int trx_safe; /*< Detect and handle partial transactions */
|
||||
PENDING_TRANSACTION pending_transaction; /*< Pending transaction */
|
||||
enum blr_event_state master_event_state; /*< Packet read state */
|
||||
REP_HEADER stored_header; /*< Relication header of the event the master is sending */
|
||||
GWBUF *stored_event; /*< Buffer where partial events are stored */
|
||||
uint64_t last_safe_pos; /* last committed transaction */
|
||||
PENDING_TRANSACTION pending_transaction;
|
||||
/*< Pending transaction */
|
||||
enum blr_event_state master_event_state;
|
||||
/*< Packet read state */
|
||||
REP_HEADER stored_header;
|
||||
/*< Relication header of the event the master is sending */
|
||||
GWBUF *stored_event; /*< Buffer where partial events are stored */
|
||||
uint64_t last_safe_pos; /* last committed transaction */
|
||||
char binlog_name[BINLOG_FNAMELEN + 1];
|
||||
/*< Name of the current binlog file */
|
||||
uint64_t binlog_position;
|
||||
/*< last committed transaction position */
|
||||
uint64_t current_pos;
|
||||
/*< Current binlog position */
|
||||
uint64_t binlog_position;/*< last committed transaction position */
|
||||
uint64_t current_pos; /*< Current binlog position */
|
||||
int binlog_fd; /*< File descriptor of the binlog
|
||||
* file being written
|
||||
*/
|
||||
uint64_t last_written; /*< Position of the last write operation */
|
||||
uint64_t last_written; /*< Position of the last write operation */
|
||||
uint64_t last_event_pos; /*< Position of last event written */
|
||||
uint64_t current_safe_event;
|
||||
/*< Position of the latest safe event being sent to slaves */
|
||||
char prevbinlog[BINLOG_FNAMELEN + 1];
|
||||
int rotating; /*< Rotation in progress flag */
|
||||
BLFILE *files; /*< Files used by the slaves */
|
||||
SPINLOCK fileslock; /*< Lock for the files queue above */
|
||||
unsigned int short_burst; /*< Short burst for slave catchup */
|
||||
unsigned int long_burst; /*< Long burst for slave catchup */
|
||||
unsigned long burst_size; /*< Maximum size of burst to send */
|
||||
unsigned long heartbeat; /*< Configured heartbeat value */
|
||||
ROUTER_STATS stats; /*< Statistics for this router */
|
||||
int rotating; /*< Rotation in progress flag */
|
||||
BLFILE *files; /*< Files used by the slaves */
|
||||
SPINLOCK fileslock; /*< Lock for the files queue above */
|
||||
unsigned int short_burst; /*< Short burst for slave catchup */
|
||||
unsigned int long_burst; /*< Long burst for slave catchup */
|
||||
unsigned long burst_size; /*< Maximum size of burst to send */
|
||||
unsigned long heartbeat; /*< Configured heartbeat value */
|
||||
ROUTER_STATS stats; /*< Statistics for this router */
|
||||
int active_logs;
|
||||
int reconnect_pending;
|
||||
int retry_backoff;
|
||||
time_t connect_time;
|
||||
int handling_threads;
|
||||
unsigned long m_errno; /*< master response mysql errno */
|
||||
char *m_errmsg; /*< master response mysql error message */
|
||||
char *set_master_version; /*< Send custom Version to slaves */
|
||||
unsigned long m_errno; /*< master response mysql errno */
|
||||
char *m_errmsg; /*< master response mysql error message */
|
||||
char *set_master_version; /*< Send custom Version to slaves */
|
||||
char *set_master_hostname; /*< Send custom Hostname to slaves */
|
||||
bool set_master_uuid; /*< Send custom Master UUID to slaves */
|
||||
bool set_master_uuid; /*< Send custom Master UUID to slaves */
|
||||
bool set_master_server_id; /*< Send custom Master server_id to slaves */
|
||||
int send_slave_heartbeat; /*< Enable sending heartbeat to slaves */
|
||||
bool ssl_enabled; /*< Use SSL connection to master */
|
||||
int ssl_cert_verification_depth; /*< The maximum length of the certificate
|
||||
* authority chain that will be accepted.
|
||||
*/
|
||||
int ssl_cert_verification_depth;
|
||||
/*< The maximum length of the certificate
|
||||
* authority chain that will be accepted.
|
||||
*/
|
||||
char *ssl_key; /*< config Certificate Key for Master SSL connection */
|
||||
char *ssl_ca; /*< config CA Certificate for Master SSL connection */
|
||||
char *ssl_cert; /*< config Certificate for Master SSL connection */
|
||||
@ -672,11 +709,12 @@ typedef struct router_instance
|
||||
int master_semi_sync; /*< Semi-Sync replication status of master server */
|
||||
BINLOG_ENCRYPTION_SETUP encryption; /*< Binlog encryption setup */
|
||||
void *encryption_ctx; /*< Encryption context */
|
||||
char last_mariadb_gtid[GTID_MAX_LEN + 1]; /*< Last seen MariaDB 10 GTID */
|
||||
bool mariadb10_gtid; /*< Save received MariaDB GTIDs into repo.
|
||||
* This allows MariaDB 10 slave servers
|
||||
* connecting with GTID
|
||||
*/
|
||||
char last_mariadb_gtid[GTID_MAX_LEN + 1];
|
||||
/*< Last seen MariaDB 10 GTID */
|
||||
bool mariadb10_gtid; /*< Save received MariaDB GTIDs into repo.
|
||||
* This allows MariaDB 10 slave servers
|
||||
* connecting with GTID
|
||||
*/
|
||||
bool mariadb10_master_gtid;/*< Enables MariaDB 10 GTID registration
|
||||
* to MariaDB 10.0/10.1 Master
|
||||
*/
|
||||
@ -695,12 +733,12 @@ typedef struct slave_encryption_ctx
|
||||
uint8_t binlog_crypto_scheme; /**< Encryption scheme */
|
||||
uint32_t binlog_key_version; /**< Encryption key version */
|
||||
uint8_t nonce[AES_BLOCK_SIZE]; /**< nonce (random bytes) of current binlog.
|
||||
* These bytes + the binlog event current pos
|
||||
* form the encrryption IV for the event */
|
||||
* These bytes + the binlog event current pos
|
||||
* form the encrryption IV for the event */
|
||||
char *log_file; /**< The log file the client has requested */
|
||||
uint32_t first_enc_event_pos; /**< The position of first encrypted event
|
||||
* It's the first event afte Start_encryption_event
|
||||
* Which is after FDE */
|
||||
* It's the first event afte Start_encryption_event
|
||||
* Which is after FDE */
|
||||
} SLAVE_ENCRYPTION_CTX;
|
||||
|
||||
/**
|
||||
@ -712,8 +750,8 @@ typedef struct binlog_encryption_ctx
|
||||
uint8_t binlog_crypto_scheme; /**< Encryption scheme */
|
||||
uint32_t binlog_key_version; /**< Encryption key version */
|
||||
uint8_t nonce[AES_BLOCK_SIZE]; /**< nonce (random bytes) of current binlog.
|
||||
* These bytes + the binlog event current pos
|
||||
* form the encrryption IV for the event */
|
||||
* These bytes + the binlog event current pos
|
||||
* form the encrryption IV for the event */
|
||||
char *binlog_file; /**< Current binlog file being encrypted */
|
||||
} BINLOG_ENCRYPTION_CTX;
|
||||
|
||||
@ -729,15 +767,18 @@ typedef struct binlog_pos_fix
|
||||
{
|
||||
bool fix; /**< Truncate file to last safe pos */
|
||||
uint64_t pos; /**< Position of the event to be replaced
|
||||
* by an Ignorable Event */
|
||||
* by an Ignorable Event
|
||||
*/
|
||||
bool replace_trx; /**< Replace all events belonging to
|
||||
* a transaction starting at pos */
|
||||
* a transaction starting at pos
|
||||
*/
|
||||
} BINLOG_FILE_FIX;
|
||||
|
||||
/**
|
||||
* Defines and offsets for binlog encryption
|
||||
*
|
||||
* BLRM_FDE_EVENT_TYPES_OFFSET is the offset in FDE event content that points to
|
||||
* BLRM_FDE_EVENT_TYPES_OFFSET is the offset
|
||||
* in FDE event content that points to
|
||||
* the number of events the master server supports.
|
||||
*/
|
||||
#define BLR_FDE_EVENT_BINLOG_VERSION 2
|
||||
@ -846,7 +887,11 @@ static char *blrm_states[] =
|
||||
|
||||
static char *blrs_states[] =
|
||||
{
|
||||
"Created", "Unregistered", "Registered", "Sending binlogs", "Errored"
|
||||
"Created",
|
||||
"Unregistered",
|
||||
"Registered",
|
||||
"Sending binlogs",
|
||||
"Errored"
|
||||
};
|
||||
|
||||
/**
|
||||
@ -860,12 +905,12 @@ static char *blrs_states[] =
|
||||
/**
|
||||
* MySQL protocol OpCodes needed for replication
|
||||
*/
|
||||
#define COM_QUIT 0x01
|
||||
#define COM_QUERY 0x03
|
||||
#define COM_STATISTICS 0x09
|
||||
#define COM_PING 0x0e
|
||||
#define COM_REGISTER_SLAVE 0x15
|
||||
#define COM_BINLOG_DUMP 0x12
|
||||
#define COM_QUIT 0x01
|
||||
#define COM_QUERY 0x03
|
||||
#define COM_STATISTIC 0x09
|
||||
#define COM_PING 0x0e
|
||||
#define COM_REGISTER_SLAVE 0x15
|
||||
#define COM_BINLOG_DUMP 0x12
|
||||
|
||||
/**
|
||||
* Macros to extract common fields
|
||||
@ -895,25 +940,43 @@ extern void blr_master_response(ROUTER_INSTANCE *, GWBUF *);
|
||||
extern void blr_master_reconnect(ROUTER_INSTANCE *);
|
||||
extern int blr_master_connected(ROUTER_INSTANCE *);
|
||||
|
||||
extern int blr_slave_request(ROUTER_INSTANCE *, ROUTER_SLAVE *, GWBUF *);
|
||||
extern void blr_slave_rotate(ROUTER_INSTANCE *, ROUTER_SLAVE *, uint8_t *);
|
||||
extern int blr_slave_catchup(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, bool large);
|
||||
extern int blr_slave_request(ROUTER_INSTANCE *,
|
||||
ROUTER_SLAVE *,
|
||||
GWBUF *);
|
||||
extern void blr_slave_rotate(ROUTER_INSTANCE *,
|
||||
ROUTER_SLAVE *,
|
||||
uint8_t *);
|
||||
extern int blr_slave_catchup(ROUTER_INSTANCE *router,
|
||||
ROUTER_SLAVE *slave,
|
||||
bool large);
|
||||
extern void blr_init_cache(ROUTER_INSTANCE *);
|
||||
|
||||
extern int blr_file_init(ROUTER_INSTANCE *);
|
||||
extern int blr_write_binlog_record(ROUTER_INSTANCE *, REP_HEADER *, uint32_t pos, uint8_t *);
|
||||
extern int blr_file_rotate(ROUTER_INSTANCE *, char *, uint64_t);
|
||||
extern int blr_write_binlog_record(ROUTER_INSTANCE *,
|
||||
REP_HEADER *,
|
||||
uint32_t pos,
|
||||
uint8_t *);
|
||||
extern int blr_file_rotate(ROUTER_INSTANCE *,
|
||||
char *,
|
||||
uint64_t);
|
||||
extern void blr_file_flush(ROUTER_INSTANCE *);
|
||||
extern BLFILE *blr_open_binlog(ROUTER_INSTANCE *,
|
||||
const char *,
|
||||
const MARIADB_GTID_INFO *);
|
||||
extern GWBUF *blr_read_binlog(ROUTER_INSTANCE *, BLFILE *, unsigned long, REP_HEADER *, char *,
|
||||
extern GWBUF *blr_read_binlog(ROUTER_INSTANCE *, BLFILE *,
|
||||
unsigned long, REP_HEADER *,
|
||||
char *,
|
||||
const SLAVE_ENCRYPTION_CTX *);
|
||||
extern void blr_close_binlog(ROUTER_INSTANCE *, BLFILE *);
|
||||
extern unsigned long blr_file_size(BLFILE *);
|
||||
extern int blr_statistics(ROUTER_INSTANCE *, ROUTER_SLAVE *, GWBUF *);
|
||||
extern int blr_ping(ROUTER_INSTANCE *, ROUTER_SLAVE *, GWBUF *);
|
||||
extern int blr_send_custom_error(DCB *, int, int, char *, char *, unsigned int);
|
||||
extern int blr_send_custom_error(DCB *,
|
||||
int,
|
||||
int,
|
||||
char *,
|
||||
char *,
|
||||
unsigned int);
|
||||
extern int blr_file_next_exists(ROUTER_INSTANCE *,
|
||||
ROUTER_SLAVE *,
|
||||
char *next_file);
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -477,10 +477,13 @@ blr_slave_request(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue)
|
||||
rv = 1;
|
||||
break;
|
||||
default:
|
||||
blr_send_custom_error(slave->dcb, 1, 0,
|
||||
blr_send_custom_error(slave->dcb,
|
||||
1,
|
||||
0,
|
||||
"You have an error in your SQL syntax; Check the "
|
||||
"syntax the MaxScale binlog router accepts.",
|
||||
"42000", 1064);
|
||||
"42000",
|
||||
1064);
|
||||
MXS_ERROR("Unexpected MySQL Command (%d) received from slave",
|
||||
MYSQL_COMMAND(queue));
|
||||
break;
|
||||
@ -633,7 +636,8 @@ blr_slave_query(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue)
|
||||
}
|
||||
|
||||
MXS_INFO("Execute statement (truncated, it contains password)"
|
||||
" from the slave '%s'", new_text);
|
||||
" from the slave '%s'",
|
||||
new_text);
|
||||
MXS_FREE(new_text);
|
||||
}
|
||||
else
|
||||
@ -722,7 +726,7 @@ blr_slave_query(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue)
|
||||
if (blr_handle_admin_stmt(router,
|
||||
slave,
|
||||
word,
|
||||
brkb))
|
||||
brkb))
|
||||
{
|
||||
MXS_FREE(query_text);
|
||||
return 1;
|
||||
@ -744,7 +748,9 @@ blr_slave_query(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue)
|
||||
else
|
||||
{
|
||||
MXS_INFO("Unexpected query from '%s'@'%s', possibly a 10.1 slave: %s",
|
||||
slave->dcb->user, slave->dcb->remote, query_text);
|
||||
slave->dcb->user,
|
||||
slave->dcb->remote,
|
||||
query_text);
|
||||
}
|
||||
|
||||
MXS_FREE(query_text);
|
||||
@ -1087,21 +1093,61 @@ blr_slave_send_master_status(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave)
|
||||
*/
|
||||
static char *slave_status_columns[] =
|
||||
{
|
||||
"Slave_IO_State", "Master_Host", "Master_User", "Master_Port", "Connect_Retry",
|
||||
"Master_Log_File", "Read_Master_Log_Pos", "Relay_Log_File", "Relay_Log_Pos",
|
||||
"Relay_Master_Log_File", "Slave_IO_Running", "Slave_SQL_Running", "Replicate_Do_DB",
|
||||
"Replicate_Ignore_DB", "Replicate_Do_Table",
|
||||
"Replicate_Ignore_Table", "Replicate_Wild_Do_Table", "Replicate_Wild_Ignore_Table",
|
||||
"Last_Errno", "Last_Error", "Skip_Counter", "Exec_Master_Log_Pos", "Relay_Log_Space",
|
||||
"Until_Condition", "Until_Log_File", "Until_Log_Pos", "Master_SSL_Allowed",
|
||||
"Master_SSL_CA_File", "Master_SSL_CA_Path", "Master_SSL_Cert", "Master_SSL_Cipher",
|
||||
"Master_SSL_Key", "Seconds_Behind_Master",
|
||||
"Master_SSL_Verify_Server_Cert", "Last_IO_Errno", "Last_IO_Error", "Last_SQL_Errno",
|
||||
"Last_SQL_Error", "Replicate_Ignore_Server_Ids", "Master_Server_Id", "Master_UUID",
|
||||
"Master_Info_File", "SQL_Delay", "SQL_Remaining_Delay", "Slave_SQL_Running_State",
|
||||
"Master_Retry_Count", "Master_Bind", "Last_IO_Error_TimeStamp",
|
||||
"Last_SQL_Error_Timestamp", "Master_SSL_Crl", "Master_SSL_Crlpath",
|
||||
"Retrieved_Gtid_Set", "Executed_Gtid_Set", "Auto_Position", NULL
|
||||
"Slave_IO_State",
|
||||
"Master_Host",
|
||||
"Master_User",
|
||||
"Master_Port",
|
||||
"Connect_Retry",
|
||||
"Master_Log_File",
|
||||
"Read_Master_Log_Pos",
|
||||
"Relay_Log_File",
|
||||
"Relay_Log_Pos",
|
||||
"Relay_Master_Log_File",
|
||||
"Slave_IO_Running",
|
||||
"Slave_SQL_Running",
|
||||
"Replicate_Do_DB",
|
||||
"Replicate_Ignore_DB",
|
||||
"Replicate_Do_Table",
|
||||
"Replicate_Ignore_Table",
|
||||
"Replicate_Wild_Do_Table",
|
||||
"Replicate_Wild_Ignore_Table",
|
||||
"Last_Errno",
|
||||
"Last_Error",
|
||||
"Skip_Counter",
|
||||
"Exec_Master_Log_Pos",
|
||||
"Relay_Log_Space",
|
||||
"Until_Condition",
|
||||
"Until_Log_File",
|
||||
"Until_Log_Pos",
|
||||
"Master_SSL_Allowed",
|
||||
"Master_SSL_CA_File",
|
||||
"Master_SSL_CA_Path",
|
||||
"Master_SSL_Cert",
|
||||
"Master_SSL_Cipher",
|
||||
"Master_SSL_Key",
|
||||
"Seconds_Behind_Master",
|
||||
"Master_SSL_Verify_Server_Cert",
|
||||
"Last_IO_Errno",
|
||||
"Last_IO_Error",
|
||||
"Last_SQL_Errno",
|
||||
"Last_SQL_Error",
|
||||
"Replicate_Ignore_Server_Ids",
|
||||
"Master_Server_Id",
|
||||
"Master_UUID",
|
||||
"Master_Info_File",
|
||||
"SQL_Delay",
|
||||
"SQL_Remaining_Delay",
|
||||
"Slave_SQL_Running_State",
|
||||
"Master_Retry_Count",
|
||||
"Master_Bind",
|
||||
"Last_IO_Error_TimeStamp",
|
||||
"Last_SQL_Error_Timestamp",
|
||||
"Master_SSL_Crl",
|
||||
"Master_SSL_Crlpath",
|
||||
"Retrieved_Gtid_Set",
|
||||
"Executed_Gtid_Set",
|
||||
"Auto_Position",
|
||||
NULL
|
||||
};
|
||||
|
||||
/*
|
||||
@ -1206,8 +1252,12 @@ blr_slave_send_slave_status(ROUTER_INSTANCE *router,
|
||||
ptr += col_len;
|
||||
|
||||
// Master_Host
|
||||
snprintf(column, max_column_size, "%s",
|
||||
router->service->dbref->server->name ? router->service->dbref->server->name : "");
|
||||
snprintf(column,
|
||||
max_column_size,
|
||||
"%s",
|
||||
router->service->dbref->server->name ?
|
||||
router->service->dbref->server->name :
|
||||
"");
|
||||
col_len = strlen(column);
|
||||
*ptr++ = col_len; // Length of result string
|
||||
memcpy((char *)ptr, column, col_len); // Result string
|
||||
@ -1961,7 +2011,8 @@ blr_slave_binlog_dump(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, GWBUF *queue
|
||||
router->service->name, slave->dcb->remote,
|
||||
dcb_get_port(slave->dcb),
|
||||
slave->serverid,
|
||||
slave->binlogfile, (unsigned long)slave->binlog_pos);
|
||||
slave->binlogfile,
|
||||
(unsigned long)slave->binlog_pos);
|
||||
|
||||
/* Force the slave to call catchup routine */
|
||||
poll_fake_write_event(slave->dcb);
|
||||
@ -2313,7 +2364,8 @@ blr_slave_catchup(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, bool large)
|
||||
#endif
|
||||
if (hkheartbeat - beat1 > 1)
|
||||
{
|
||||
MXS_ERROR("blr_open_binlog took %lu beats", hkheartbeat - beat1);
|
||||
MXS_ERROR("blr_open_binlog took %lu beats",
|
||||
hkheartbeat - beat1);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2518,8 +2570,10 @@ blr_slave_catchup(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, bool large)
|
||||
slave->dcb->remote,
|
||||
dcb_get_port(slave->dcb),
|
||||
slave->serverid,
|
||||
slave->binlogfile, (unsigned long)slave->binlog_pos,
|
||||
router->binlog_name, router->binlog_position);
|
||||
slave->binlogfile,
|
||||
(unsigned long)slave->binlog_pos,
|
||||
router->binlog_name,
|
||||
router->binlog_position);
|
||||
|
||||
/* Reset encryption context */
|
||||
MXS_FREE(slave->encryption_ctx);
|
||||
@ -2527,9 +2581,15 @@ blr_slave_catchup(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave, bool large)
|
||||
|
||||
/* Now pass the next_file to blr_slave_fake_rotate() */
|
||||
#ifdef BLFILE_IN_SLAVE
|
||||
if (blr_slave_fake_rotate(router, slave, &slave->file, next_file))
|
||||
if (blr_slave_fake_rotate(router,
|
||||
slave,
|
||||
&slave->file,
|
||||
next_file))
|
||||
#else
|
||||
if (blr_slave_fake_rotate(router, slave, &file, next_file))
|
||||
if (blr_slave_fake_rotate(router,
|
||||
slave,
|
||||
&file,
|
||||
next_file))
|
||||
#endif
|
||||
{
|
||||
spinlock_acquire(&slave->catch_lock);
|
||||
@ -2739,7 +2799,12 @@ blr_slave_read_fde(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave)
|
||||
return NULL;
|
||||
}
|
||||
/* FDE is not encrypted, so we can pass NULL to last parameter */
|
||||
if ((record = blr_read_binlog(router, file, 4, &hdr, err_msg, NULL)) == NULL)
|
||||
if ((record = blr_read_binlog(router,
|
||||
file,
|
||||
4,
|
||||
&hdr,
|
||||
err_msg,
|
||||
NULL)) == NULL)
|
||||
{
|
||||
if (hdr.ok != SLAVE_POS_READ_OK)
|
||||
{
|
||||
@ -3196,10 +3261,10 @@ blr_slave_disconnect_all(ROUTER_INSTANCE *router, ROUTER_SLAVE *slave)
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a MySQL OK packet to the slave backend
|
||||
* Send a MySQL OK packet to the connected client
|
||||
*
|
||||
* @param router The binlog router instance
|
||||
* @param slave The slave server to which we are sending the response
|
||||
* @param slave The slave server to which we are sending data
|
||||
*
|
||||
* @return Result of a write call, non-zero if successful
|
||||
*/
|
||||
@ -3227,11 +3292,11 @@ blr_slave_send_ok(ROUTER_INSTANCE* router, ROUTER_SLAVE* slave)
|
||||
}
|
||||
|
||||
/**
|
||||
* Send a MySQL OK packet with a message to the slave backend
|
||||
* Send a MySQL OK packet with a message to the client
|
||||
*
|
||||
* @param router The binlog router instance
|
||||
* @param message The message to send
|
||||
* @param slave The slave server to which we are sending the response
|
||||
* @param slave The slave server to which we are sending data
|
||||
*
|
||||
* @return The write call result: non-zero on success
|
||||
*/
|
||||
@ -5289,7 +5354,9 @@ blr_slave_show_warnings(ROUTER_INSTANCE* router, ROUTER_SLAVE* slave)
|
||||
msg_ptr = strchr(slave->warning_msg, ':');
|
||||
if (msg_ptr)
|
||||
{
|
||||
size_t len = (msg_ptr - slave->warning_msg > 16) ? 16 : (msg_ptr - slave->warning_msg);
|
||||
size_t len = (msg_ptr - slave->warning_msg > 16) ?
|
||||
16 :
|
||||
(msg_ptr - slave->warning_msg);
|
||||
memcpy(err_code, slave->warning_msg, len);
|
||||
err_code[len] = 0;
|
||||
code_len = strlen(err_code);
|
||||
@ -7457,7 +7524,8 @@ static bool blr_handle_admin_stmt(ROUTER_INSTANCE *router,
|
||||
blr_slave_send_error_packet(slave,
|
||||
"This operation cannot be performed "
|
||||
"with a running slave; run STOP SLAVE first",
|
||||
(unsigned int)1198, NULL);
|
||||
(unsigned int)1198,
|
||||
NULL);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
@ -7508,7 +7576,8 @@ static bool blr_handle_admin_stmt(ROUTER_INSTANCE *router,
|
||||
blr_slave_send_error_packet(slave,
|
||||
"Cannot change master with a running slave; "
|
||||
"run STOP SLAVE first",
|
||||
(unsigned int)1198, NULL);
|
||||
(unsigned int)1198,
|
||||
NULL);
|
||||
return true;
|
||||
}
|
||||
else
|
||||
|
Reference in New Issue
Block a user