diff --git a/include/maxscale/adminusers.h.in b/include/maxscale/adminusers.h.in index bd0ce336c..848bf0e6b 100644 --- a/include/maxscale/adminusers.h.in +++ b/include/maxscale/adminusers.h.in @@ -62,14 +62,8 @@ enum user_type */ typedef struct admin_session { -#if defined(SS_DEBUG) - skygw_chk_t adminses_chk_top; -#endif char user[ADMIN_USER_MAXLEN + 1]; /*< username */ bool validated; /* Was user validated? */ -#if defined(SS_DEBUG) - skygw_chk_t adminses_chk_tail; -#endif } ADMIN_session; void admin_users_init(); diff --git a/include/maxscale/dcb.h b/include/maxscale/dcb.h index 3cb2c1025..bd5686398 100644 --- a/include/maxscale/dcb.h +++ b/include/maxscale/dcb.h @@ -132,7 +132,6 @@ typedef enum typedef struct dcb { MXS_POLL_DATA poll; - skygw_chk_t dcb_chk_top; bool dcb_errhandle_called; /*< this can be called only once */ dcb_role_t dcb_role; int fd; /**< The descriptor */ @@ -185,7 +184,6 @@ typedef struct dcb } thread; uint32_t n_close; /** How many times dcb_close has been called. */ char *path; /** If a Unix socket, the path it was bound to. */ - skygw_chk_t dcb_chk_tail; } DCB; /** diff --git a/include/maxscale/debug.h b/include/maxscale/debug.h index 28e9fef88..dd47c4cc8 100644 --- a/include/maxscale/debug.h +++ b/include/maxscale/debug.h @@ -51,43 +51,6 @@ MXS_BEGIN_DECLS #define CHK_NUM_BASE 101 -typedef enum skygw_chk_t -{ - CHK_NUM_SLIST = CHK_NUM_BASE, - CHK_NUM_SLIST_NODE, - CHK_NUM_SLIST_CURSOR, - CHK_NUM_MLIST, - CHK_NUM_MLIST_NODE, - CHK_NUM_MLIST_CURSOR, - CHK_NUM_QUERY_TEST, - CHK_NUM_LOGFILE, - CHK_NUM_FILEWRITER, - CHK_NUM_THREAD, - CHK_NUM_SIMPLE_MUTEX, - CHK_NUM_MESSAGE, - CHK_NUM_RWLOCK, - CHK_NUM_FNAMES, - CHK_NUM_LOGMANAGER, - CHK_NUM_FILE, - CHK_NUM_BLOCKBUF, - CHK_NUM_HASHTABLE, - CHK_NUM_DCB, - CHK_NUM_PROTOCOL, - CHK_NUM_SESSION, - CHK_NUM_SERVER, - CHK_NUM_ROUTER_SES, - CHK_NUM_MY_SESCMD, - CHK_NUM_ROUTER_PROPERTY, - CHK_NUM_SESCMD_CUR, - CHK_NUM_BACKEND, - CHK_NUM_BACKEND_REF, - CHK_NUM_PREP_STMT, - CHK_NUM_PINFO, - CHK_NUM_MYSQLSES, - CHK_NUM_ADMINSES, - CHK_NUM_MANAGED_LIST -} skygw_chk_t; - # define STRBOOL(b) ((b) ? "true" : "false") # define STRQTYPE(t) ((t) == QUERY_TYPE_WRITE ? "QUERY_TYPE_WRITE" : \ @@ -234,9 +197,6 @@ typedef enum skygw_chk_t "Unknown DCB reason"))))))) #define CHK_MLIST(l) { \ - ss_info_dassert((l->mlist_chk_top == CHK_NUM_MLIST && \ - l->mlist_chk_tail == CHK_NUM_MLIST), \ - "Single-linked list structure under- or overflow"); \ if (l->mlist_first == NULL) { \ ss_info_dassert(l->mlist_nodecount == 0, \ "List head is NULL but element counter is not zero."); \ @@ -260,15 +220,9 @@ typedef enum skygw_chk_t #define CHK_MLIST_NODE(n) { \ - ss_info_dassert((n->mlnode_chk_top == CHK_NUM_MLIST_NODE && \ - n->mlnode_chk_tail == CHK_NUM_MLIST_NODE), \ - "Single-linked list node under- or overflow"); \ } #define CHK_MLIST_CURSOR(c) { \ - ss_info_dassert(c->mlcursor_chk_top == CHK_NUM_MLIST_CURSOR && \ - c->mlcursor_chk_tail == CHK_NUM_MLIST_CURSOR, \ - "List cursor under- or overflow"); \ ss_info_dassert(c->mlcursor_list != NULL, \ "List cursor doesn't have list"); \ ss_info_dassert(c->mlcursor_pos != NULL || \ @@ -278,9 +232,6 @@ typedef enum skygw_chk_t } #define CHK_SLIST(l) { \ - ss_info_dassert((l->slist_chk_top == CHK_NUM_SLIST && \ - l->slist_chk_tail == CHK_NUM_SLIST), \ - "Single-linked list structure under- or overflow"); \ if (l->slist_head == NULL) { \ ss_info_dassert(l->slist_nelems == 0, \ "List head is NULL but element counter is not zero."); \ @@ -304,15 +255,9 @@ typedef enum skygw_chk_t #define CHK_SLIST_NODE(n) { \ - ss_info_dassert((n->slnode_chk_top == CHK_NUM_SLIST_NODE && \ - n->slnode_chk_tail == CHK_NUM_SLIST_NODE), \ - "Single-linked list node under- or overflow"); \ } #define CHK_SLIST_CURSOR(c) { \ - ss_info_dassert(c->slcursor_chk_top == CHK_NUM_SLIST_CURSOR && \ - c->slcursor_chk_tail == CHK_NUM_SLIST_CURSOR, \ - "List cursor under- or overflow"); \ ss_info_dassert(c->slcursor_list != NULL, \ "List cursor doesn't have list"); \ ss_info_dassert(c->slcursor_pos != NULL || \ @@ -322,15 +267,9 @@ typedef enum skygw_chk_t } #define CHK_QUERY_TEST(q) { \ - ss_info_dassert(q->qt_chk_top == CHK_NUM_QUERY_TEST && \ - q->qt_chk_tail == CHK_NUM_QUERY_TEST, \ - "Query test under- or overflow."); \ } #define CHK_LOGFILE(lf) { \ - ss_info_dassert(lf->lf_chk_top == CHK_NUM_LOGFILE && \ - lf->lf_chk_tail == CHK_NUM_LOGFILE, \ - "Logfile struct under- or overflow"); \ ss_info_dassert(lf->lf_filepath != NULL && \ lf->lf_name_prefix != NULL && \ lf->lf_name_suffix != NULL && \ @@ -339,27 +278,15 @@ typedef enum skygw_chk_t } #define CHK_FILEWRITER(fwr) { \ - ss_info_dassert(fwr->fwr_chk_top == CHK_NUM_FILEWRITER && \ - fwr->fwr_chk_tail == CHK_NUM_FILEWRITER, \ - "File writer struct under- or overflow"); \ } #define CHK_THREAD(thr) { \ - ss_info_dassert(thr->sth_chk_top == CHK_NUM_THREAD && \ - thr->sth_chk_tail == CHK_NUM_THREAD, \ - "Thread struct under- or overflow"); \ } #define CHK_SIMPLE_MUTEX(sm) { \ - ss_info_dassert(sm->sm_chk_top == CHK_NUM_SIMPLE_MUTEX && \ - sm->sm_chk_tail == CHK_NUM_SIMPLE_MUTEX, \ - "Simple mutex struct under- or overflow"); \ } #define CHK_MESSAGE(mes) { \ - ss_info_dassert(mes->mes_chk_top == CHK_NUM_MESSAGE && \ - mes->mes_chk_tail == CHK_NUM_MESSAGE, \ - "Message struct under- or overflow"); \ } @@ -377,63 +304,34 @@ typedef enum skygw_chk_t } #define CHK_FNAMES_CONF(fn) { \ - ss_info_dassert(fn->fn_chk_top == CHK_NUM_FNAMES && \ - fn->fn_chk_tail == CHK_NUM_FNAMES, \ - "File names confs struct under- or overflow"); \ } #define CHK_LOGMANAGER(lm) { \ - ss_info_dassert(lm->lm_chk_top == CHK_NUM_LOGMANAGER && \ - lm->lm_chk_tail == CHK_NUM_LOGMANAGER, \ - "Log manager struct under- or overflow"); \ } #define CHK_FILE(f) { \ - ss_info_dassert(f->sf_chk_top == CHK_NUM_FILE && \ - f->sf_chk_tail == CHK_NUM_FILE, \ - "File struct under- or overflow"); \ } #define CHK_BLOCKBUF(bb) { \ - ss_info_dassert(bb->bb_chk_top == CHK_NUM_BLOCKBUF, \ - "Block buf under- or overflow"); \ } #define CHK_HASHTABLE(t) { \ - ss_info_dassert(t->ht_chk_top == CHK_NUM_HASHTABLE && \ - t->ht_chk_tail == CHK_NUM_HASHTABLE, \ - "Hashtable under- or overflow"); \ } #define CHK_MANAGED_LIST(l) { \ - ss_info_dassert(l->list_entry_chk_top == CHK_NUM_MANAGED_LIST && \ - l->list_entry_chk_tail == CHK_NUM_MANAGED_LIST, \ - "Managed list under- or overflow"); \ } #define CHK_DCB(d) { \ - ss_info_dassert(d->dcb_chk_top == CHK_NUM_DCB && \ - d->dcb_chk_tail == CHK_NUM_DCB, \ - "Dcb under- or overflow"); \ } #define CHK_PROTOCOL(p) { \ - ss_info_dassert(p->protocol_chk_top == CHK_NUM_PROTOCOL && \ - p->protocol_chk_tail == CHK_NUM_PROTOCOL, \ - "Protocol under- or overflow"); \ } #define CHK_SESSION(s) { \ - ss_info_dassert(s->ses_chk_top == CHK_NUM_SESSION && \ - s->ses_chk_tail == CHK_NUM_SESSION, \ - "Session under- or overflow"); \ } #define CHK_SERVER(s) { \ - ss_info_dassert(s->server_chk_top == CHK_NUM_SERVER && \ - s->server_chk_tail == CHK_NUM_SERVER, \ - "Server under- or overflow"); \ } #define CHK_GWBUF(b) { \ @@ -442,63 +340,33 @@ typedef enum skygw_chk_t } #define CHK_CLIENT_RSES(r) { \ - ss_info_dassert((r)->rses_chk_top == CHK_NUM_ROUTER_SES && \ - (r)->rses_chk_tail == CHK_NUM_ROUTER_SES, \ - "Router client session has invalid check fields"); \ } #define CHK_RSES_PROP(p) { \ - ss_info_dassert((p)->rses_prop_chk_top == CHK_NUM_ROUTER_PROPERTY && \ - (p)->rses_prop_chk_tail == CHK_NUM_ROUTER_PROPERTY, \ - "Router property has invalid check fields"); \ } #define CHK_MYSQL_SESCMD(s) { \ - ss_info_dassert((s)->my_sescmd_chk_top == CHK_NUM_MY_SESCMD && \ - (s)->my_sescmd_chk_tail == CHK_NUM_MY_SESCMD, \ - "Session command has invalid check fields"); \ } #define CHK_SESCMD_CUR(c) { \ - ss_info_dassert((c)->scmd_cur_chk_top == CHK_NUM_SESCMD_CUR && \ - (c)->scmd_cur_chk_tail == CHK_NUM_SESCMD_CUR, \ - "Session command cursor has invalid check fields"); \ } #define CHK_BACKEND(b) { \ - ss_info_dassert((b)->be_chk_top == CHK_NUM_BACKEND && \ - (b)->be_chk_tail == CHK_NUM_BACKEND, \ - "BACKEND has invalid check fields"); \ } #define CHK_BACKEND_REF(r) { \ - ss_info_dassert((r)->bref_chk_top == CHK_NUM_BACKEND_REF && \ - (r)->bref_chk_tail == CHK_NUM_BACKEND_REF, \ - "Backend reference has invalid check fields"); \ } #define CHK_PREP_STMT(p) { \ - ss_info_dassert((p)->pstmt_chk_top == CHK_NUM_PREP_STMT && \ - (p)->pstmt_chk_tail == CHK_NUM_PREP_STMT, \ - "Prepared statement struct has invalid check fields"); \ } #define CHK_PARSING_INFO(p) { \ - ss_info_dassert((p)->pi_chk_top == CHK_NUM_PINFO && \ - (p)->pi_chk_tail == CHK_NUM_PINFO, \ - "Parsing info struct has invalid check fields"); \ } #define CHK_MYSQL_SESSION(s) { \ - ss_info_dassert((s)->myses_chk_top == CHK_NUM_MYSQLSES && \ - (s)->myses_chk_tail == CHK_NUM_MYSQLSES, \ - "MYSQL session struct has invalid check fields"); \ } #define CHK_ADMIN_SESSION(s) { \ - ss_info_dassert((s)->adminses_chk_top == CHK_NUM_ADMINSES && \ - (s)->adminses_chk_tail == CHK_NUM_ADMINSES, \ - "Admin session struct has invalid check fields"); \ } diff --git a/include/maxscale/hashtable.h b/include/maxscale/hashtable.h index 35af164fe..24a590046 100644 --- a/include/maxscale/hashtable.h +++ b/include/maxscale/hashtable.h @@ -71,9 +71,6 @@ typedef void (*HASHFREEFN)(void *); */ typedef struct hashtable { -#if defined(SS_DEBUG) - skygw_chk_t ht_chk_top; -#endif int hashsize; /**< The number of HASHENTRIES */ HASHENTRIES **entries; /**< The entries themselves */ HASHHASHFN hashfn; /**< The hash function */ @@ -87,9 +84,6 @@ typedef struct hashtable int writelock; /**< The table is locked by a writer */ bool ht_isflat; /**< Indicates whether hashtable is in stack or heap */ int n_elements; /**< Number of added elements */ -#if defined(SS_DEBUG) - skygw_chk_t ht_chk_tail; -#endif } HASHTABLE; extern HASHTABLE *hashtable_alloc(int, HASHHASHFN hashfn, HASHCMPFN cmpfn); diff --git a/include/maxscale/protocol/mysql.h b/include/maxscale/protocol/mysql.h index f348fb868..738be6107 100644 --- a/include/maxscale/protocol/mysql.h +++ b/include/maxscale/protocol/mysql.h @@ -139,17 +139,11 @@ typedef enum */ typedef struct mysql_session { -#if defined(SS_DEBUG) - skygw_chk_t myses_chk_top; -#endif uint8_t client_sha1[MYSQL_SCRAMBLE_LEN]; /*< SHA1(password) */ char user[MYSQL_USER_MAXLEN + 1]; /*< username */ char db[MYSQL_DATABASE_MAXLEN + 1]; /*< database */ int auth_token_len; /*< token length */ uint8_t *auth_token; /*< token */ -#if defined(SS_DEBUG) - skygw_chk_t myses_chk_tail; -#endif } MYSQL_session; /** Protocol packing macros. */ @@ -320,9 +314,6 @@ static const char* const MXS_LAST_GTID = "last_gtid"; */ typedef struct { -#if defined(SS_DEBUG) - skygw_chk_t protocol_chk_top; -#endif int fd; /*< The socket descriptor */ struct dcb* owner_dcb; /*< The DCB of the socket we are running on */ mxs_mysql_cmd_t current_command; /*< Current command being executed */ @@ -340,9 +331,6 @@ typedef struct bool changing_user; uint32_t num_eof_packets; /*< Encountered eof packet number, used for check packet type */ bool large_query; /*< Whether to ignore the command byte of the next packet*/ -#if defined(SS_DEBUG) - skygw_chk_t protocol_chk_tail; -#endif } MySQLProtocol; typedef struct diff --git a/include/maxscale/server.h b/include/maxscale/server.h index d71b543cf..e709d5e39 100644 --- a/include/maxscale/server.h +++ b/include/maxscale/server.h @@ -114,9 +114,6 @@ static uint64_t server_encode_version(const SERVER_VERSION* server_version) */ typedef struct server { -#if defined(SS_DEBUG) - skygw_chk_t server_chk_top; -#endif // Base settings char *name; /**< Server config name */ char address[MAX_SERVER_ADDRESS_LEN]; /**< Server hostname/IP-address */ @@ -159,9 +156,6 @@ typedef struct server * by rwsplit. TODO: Move to rwsplit */ bool warn_ssl_not_enabled; /**< SSL not used for an SSL enabled server */ MxsDiskSpaceThreshold* disk_space_threshold; /**< Disk space thresholds */ -#if defined(SS_DEBUG) - skygw_chk_t server_chk_tail; -#endif } SERVER; enum diff --git a/include/maxscale/session.h b/include/maxscale/session.h index 6d3b9cb1b..612e04769 100644 --- a/include/maxscale/session.h +++ b/include/maxscale/session.h @@ -165,7 +165,6 @@ typedef char* (*session_variable_handler_t)(void* context, */ typedef struct session { - skygw_chk_t ses_chk_top; mxs_session_state_t state; /*< Current descriptor state */ uint64_t ses_id; /*< Unique session identifier */ struct dcb *client_dcb; /*< The client connection */ @@ -186,7 +185,6 @@ typedef struct session GWBUF* buffer; /*< Buffer to deliver to up. */ } response; /*< Shortcircuited response */ session_close_t close_reason; /*< Reason why the session was closed */ - skygw_chk_t ses_chk_tail; } MXS_SESSION; /** diff --git a/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc b/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc index 7f312116f..88166a701 100644 --- a/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc +++ b/query_classifier/qc_mysqlembedded/qc_mysqlembedded.cc @@ -133,9 +133,6 @@ static const char* map_function_name(NAME_MAPPING* function_name_mappings, const #define MAX_QUERYBUF_SIZE 2048 typedef struct parsing_info_st : public QC_STMT_INFO { -#if defined(SS_DEBUG) - skygw_chk_t pi_chk_top; -#endif void* pi_handle; /*< parsing info object pointer */ char* pi_query_plain_str; /*< query as plain string */ void (*pi_done_fp)(void *); /*< clean-up function for parsing info */ @@ -149,9 +146,6 @@ typedef struct parsing_info_st : public QC_STMT_INFO qc_parse_result_t result; int32_t type_mask; NAME_MAPPING* function_name_mappings; -#if defined(SS_DEBUG) - skygw_chk_t pi_chk_tail; -#endif } parsing_info_t; #define QTYPE_LESS_RESTRICTIVE_THAN_WRITE(t) (tpi_chk_top = CHK_NUM_PINFO; - pi->pi_chk_tail = CHK_NUM_PINFO; -#endif /** Set handle and free function to parsing info struct */ pi->pi_handle = mysql; pi->pi_done_fp = donefun; diff --git a/server/core/dcb.cc b/server/core/dcb.cc index a494a3c66..7619fd50e 100644 --- a/server/core/dcb.cc +++ b/server/core/dcb.cc @@ -127,7 +127,6 @@ static int downstream_throttle_callback(DCB *dcb, DCB_REASON reason, void *userd void dcb_global_init() { - this_unit.dcb_initialized.dcb_chk_top = CHK_NUM_DCB; this_unit.dcb_initialized.fd = DCBFD_CLOSED; this_unit.dcb_initialized.state = DCB_STATE_ALLOC; this_unit.dcb_initialized.ssl_state = SSL_HANDSHAKE_UNKNOWN; @@ -135,7 +134,6 @@ void dcb_global_init() this_unit.dcb_initialized.high_water_reached = false; this_unit.dcb_initialized.low_water = config_writeq_low_water(); this_unit.dcb_initialized.high_water = config_writeq_high_water(); - this_unit.dcb_initialized.dcb_chk_tail = CHK_NUM_DCB; int nthreads = config_threadcount(); diff --git a/server/core/hashtable.cc b/server/core/hashtable.cc index ac947d03f..c2ecbe3dc 100644 --- a/server/core/hashtable.cc +++ b/server/core/hashtable.cc @@ -145,10 +145,6 @@ hashtable_alloc_real(HASHTABLE* target, rval->ht_isflat = true; } -#if defined(SS_DEBUG) - rval->ht_chk_top = CHK_NUM_HASHTABLE; - rval->ht_chk_tail = CHK_NUM_HASHTABLE; -#endif rval->hashsize = size > 0 ? size : 1; rval->hashfn = hashfn; rval->cmpfn = cmpfn; diff --git a/server/core/server.cc b/server/core/server.cc index ec6da60d7..57646b396 100644 --- a/server/core/server.cc +++ b/server/core/server.cc @@ -144,10 +144,6 @@ SERVER* server_alloc(const char *name, MXS_CONFIG_PARAMETER* params) address, sizeof(server->address)); } -#if defined(SS_DEBUG) - server->server_chk_top = CHK_NUM_SERVER; - server->server_chk_tail = CHK_NUM_SERVER; -#endif server->name = my_name; server->port = config_get_integer(params, CN_PORT); server->protocol = my_protocol; diff --git a/server/core/session.cc b/server/core/session.cc index a631117d9..b65259a4a 100644 --- a/server/core/session.cc +++ b/server/core/session.cc @@ -64,8 +64,6 @@ namespace static struct session dummy_session() { struct session session = {}; - session.ses_chk_top = CHK_NUM_SESSION; - session.ses_chk_tail = CHK_NUM_SESSION; session.state = SESSION_STATE_DUMMY; session.refcount = 1; return session; @@ -114,7 +112,6 @@ MXS_SESSION* session_alloc_with_id(SERVICE *service, DCB *client_dcb, uint64_t i static MXS_SESSION* session_alloc_body(SERVICE* service, DCB* client_dcb, MXS_SESSION* session, uint64_t id) { - session->ses_chk_top = CHK_NUM_SESSION; session->state = SESSION_STATE_READY; session->ses_id = id; session->client_dcb = client_dcb; @@ -147,7 +144,6 @@ static MXS_SESSION* session_alloc_body(SERVICE* service, DCB* client_dcb, session->qualifies_for_pooling = false; memset(&session->response, 0, sizeof(session->response)); session->close_reason = SESSION_CLOSE_NONE; - session->ses_chk_tail = CHK_NUM_SESSION; /* * Only create a router session if we are not the listening DCB or an diff --git a/server/modules/authenticator/MaxAdminAuth/max_admin_auth.cc b/server/modules/authenticator/MaxAdminAuth/max_admin_auth.cc index 64558bdbb..4f2e7b8f6 100644 --- a/server/modules/authenticator/MaxAdminAuth/max_admin_auth.cc +++ b/server/modules/authenticator/MaxAdminAuth/max_admin_auth.cc @@ -123,10 +123,6 @@ max_admin_auth_set_protocol_data(DCB *dcb, GWBUF *buf) if ((session_data = (ADMIN_session *)MXS_CALLOC(1, sizeof(ADMIN_session))) != NULL) { int user_len = (GWBUF_LENGTH(buf) > ADMIN_USER_MAXLEN) ? ADMIN_USER_MAXLEN : GWBUF_LENGTH(buf); -#if defined(SS_DEBUG) - session_data->adminses_chk_top = CHK_NUM_ADMINSES; - session_data->adminses_chk_tail = CHK_NUM_ADMINSES; -#endif memcpy(session_data->user, GWBUF_DATA(buf), user_len); session_data->validated = false; dcb->data = (void *)session_data; diff --git a/server/modules/filter/test/mock_dcb.cc b/server/modules/filter/test/mock_dcb.cc index 3cf587c26..ad40e587e 100644 --- a/server/modules/filter/test/mock_dcb.cc +++ b/server/modules/filter/test/mock_dcb.cc @@ -20,11 +20,9 @@ void initialize_dcb(DCB* pDcb) { memset(pDcb, 0, sizeof(DCB)); - pDcb->dcb_chk_top = CHK_NUM_DCB; pDcb->fd = DCBFD_CLOSED; pDcb->state = DCB_STATE_ALLOC; pDcb->ssl_state = SSL_HANDSHAKE_UNKNOWN; - pDcb->dcb_chk_tail = CHK_NUM_DCB; } } diff --git a/server/modules/filter/test/mock_session.cc b/server/modules/filter/test/mock_session.cc index 486541374..8988968ea 100644 --- a/server/modules/filter/test/mock_session.cc +++ b/server/modules/filter/test/mock_session.cc @@ -27,9 +27,7 @@ Session::Session(Client* pClient) memset(pSession, 0, sizeof(MXS_SESSION)); - pSession->ses_chk_top = CHK_NUM_SESSION; pSession->state = SESSION_STATE_ALLOC; - pSession->ses_chk_tail = CHK_NUM_SESSION; pSession->client_dcb = &m_client_dcb; diff --git a/server/modules/include/cdc.h b/server/modules/include/cdc.h index 336f3e8d3..e161e29f1 100644 --- a/server/modules/include/cdc.h +++ b/server/modules/include/cdc.h @@ -78,16 +78,10 @@ typedef struct cdc_session */ typedef struct cdc_protocol { -#ifdef SS_DEBUG - skygw_chk_t protocol_chk_top; -#endif int state; /*< CDC protocol state */ char user[CDC_USER_MAXLEN + 1]; /*< username for authentication */ SPINLOCK lock; /*< Protocol structure lock */ char type[CDC_TYPE_LEN + 1]; /*< Request Type */ -#ifdef SS_DEBUG - skygw_chk_t protocol_chk_tail; -#endif } CDC_protocol; /* routines */ diff --git a/server/modules/protocol/CDC/cdc.cc b/server/modules/protocol/CDC/cdc.cc index e2cb4ed10..b329cb886 100644 --- a/server/modules/protocol/CDC/cdc.cc +++ b/server/modules/protocol/CDC/cdc.cc @@ -395,10 +395,6 @@ cdc_protocol_init(DCB* dcb) /* memory allocation here */ p->state = CDC_STATE_WAIT_FOR_AUTH; -#ifdef SS_DEBUG - p->protocol_chk_tail = p->protocol_chk_top = CHK_NUM_PROTOCOL; -#endif - CHK_PROTOCOL(p); return p; diff --git a/server/modules/protocol/MySQL/mysql_common.cc b/server/modules/protocol/MySQL/mysql_common.cc index b515f60fb..0aed813fd 100644 --- a/server/modules/protocol/MySQL/mysql_common.cc +++ b/server/modules/protocol/MySQL/mysql_common.cc @@ -39,14 +39,6 @@ MYSQL_session* mysql_session_alloc() { MYSQL_session* ses = (MYSQL_session*)MXS_CALLOC(1, sizeof(MYSQL_session)); - if (ses) - { -#ifdef SS_DEBUG - ses->myses_chk_top = CHK_NUM_MYSQLSES; - ses->myses_chk_tail = CHK_NUM_MYSQLSES; -#endif - } - return ses; } @@ -71,10 +63,6 @@ MySQLProtocol* mysql_protocol_init(DCB* dcb, int fd) p->changing_user = false; p->num_eof_packets = 0; p->large_query = false; -#if defined(SS_DEBUG) - p->protocol_chk_top = CHK_NUM_PROTOCOL; - p->protocol_chk_tail = CHK_NUM_PROTOCOL; -#endif /*< Assign fd with protocol */ p->fd = fd; p->owner_dcb = dcb; diff --git a/server/modules/routing/binlogrouter/blr.cc b/server/modules/routing/binlogrouter/blr.cc index 0c6a943df..f3e2079f2 100644 --- a/server/modules/routing/binlogrouter/blr.cc +++ b/server/modules/routing/binlogrouter/blr.cc @@ -1151,11 +1151,6 @@ newSession(MXS_ROUTER *instance, MXS_SESSION *session) return NULL; } -#if defined(SS_DEBUG) - slave->rses_chk_top = CHK_NUM_ROUTER_SES; - slave->rses_chk_tail = CHK_NUM_ROUTER_SES; -#endif - memset(&slave->stats, 0, sizeof(SLAVE_STATS)); atomic_add(&inst->stats.n_slaves, 1); slave->state = BLRS_CREATED; /* Set initial state of the slave */ diff --git a/server/modules/routing/binlogrouter/blr.h b/server/modules/routing/binlogrouter/blr.h index 6a10ec0dc..e10404266 100644 --- a/server/modules/routing/binlogrouter/blr.h +++ b/server/modules/routing/binlogrouter/blr.h @@ -496,9 +496,6 @@ typedef struct slave_encryption_ctx */ 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 */ @@ -550,9 +547,6 @@ typedef struct router_slave sqlite3 *gtid_maps; /*< GTID storage client handle, read only*/ MARIADB_GTID_INFO f_info; /*< GTID info for file name prefix */ bool annotate_rows; /*< MariaDB 10 Slave requests ANNOTATE_ROWS */ -#if defined(SS_DEBUG) - skygw_chk_t rses_chk_tail; -#endif } ROUTER_SLAVE;