Always include debug members in objects
Having the structures be of the same size with and without debug mode is beneficial when debugging release binaries.
This commit is contained in:
@ -213,12 +213,9 @@ rses_property_t *rses_property_init(rses_property_type_t prop_type)
|
||||
prop->rses_prop_type = prop_type;
|
||||
prop->rses_prop_next = NULL;
|
||||
prop->rses_prop_refcount = 1;
|
||||
#if defined(SS_DEBUG)
|
||||
prop->rses_prop_chk_top = CHK_NUM_ROUTER_PROPERTY;
|
||||
prop->rses_prop_chk_tail = CHK_NUM_ROUTER_PROPERTY;
|
||||
#endif
|
||||
|
||||
CHK_RSES_PROP(prop);
|
||||
return prop;
|
||||
}
|
||||
|
||||
@ -770,12 +767,10 @@ static bool create_backends(ROUTER_CLIENT_SES *rses, backend_ref_t** dest, int*
|
||||
{
|
||||
if (sref->active)
|
||||
{
|
||||
#if defined(SS_DEBUG)
|
||||
backend_ref[i].bref_chk_top = CHK_NUM_BACKEND_REF;
|
||||
backend_ref[i].bref_chk_tail = CHK_NUM_BACKEND_REF;
|
||||
backend_ref[i].bref_sescmd_cur.scmd_cur_chk_top = CHK_NUM_SESCMD_CUR;
|
||||
backend_ref[i].bref_sescmd_cur.scmd_cur_chk_tail = CHK_NUM_SESCMD_CUR;
|
||||
#endif
|
||||
backend_ref[i].closed_at = 0;
|
||||
backend_ref[i].bref_state = 0;
|
||||
backend_ref[i].ref = sref;
|
||||
@ -1034,10 +1029,8 @@ static MXS_ROUTER_SESSION *newSession(MXS_ROUTER *router_inst, MXS_SESSION *sess
|
||||
}
|
||||
|
||||
prop->rses_prop_rsession = client_rses;
|
||||
#if defined(SS_DEBUG)
|
||||
client_rses->rses_chk_top = CHK_NUM_ROUTER_SES;
|
||||
client_rses->rses_chk_tail = CHK_NUM_ROUTER_SES;
|
||||
#endif
|
||||
client_rses->rses_closed = false;
|
||||
client_rses->rses_properties[RSES_PROP_TYPE_SESCMD] = NULL;
|
||||
client_rses->rses_properties[RSES_PROP_TYPE_TMPTABLES] = prop;
|
||||
|
@ -29,10 +29,6 @@
|
||||
#include <maxscale/protocol/mysql.h>
|
||||
#include <maxscale/alloc.h>
|
||||
|
||||
#if defined(SS_DEBUG)
|
||||
#include <maxscale/protocol/mysql.h>
|
||||
#endif
|
||||
|
||||
#define RWSPLIT_TRACE_MSG_LEN 1000
|
||||
|
||||
/**
|
||||
|
@ -75,10 +75,8 @@ mysql_sescmd_t *mysql_sescmd_init(rses_property_t *rses_prop,
|
||||
/** Can't call rses_property_get_sescmd with uninitialized sescmd */
|
||||
sescmd = &rses_prop->rses_prop_data.sescmd;
|
||||
sescmd->my_sescmd_prop = rses_prop; /*< reference to owning property */
|
||||
#if defined(SS_DEBUG)
|
||||
sescmd->my_sescmd_chk_top = CHK_NUM_MY_SESCMD;
|
||||
sescmd->my_sescmd_chk_tail = CHK_NUM_MY_SESCMD;
|
||||
#endif
|
||||
/** Set session command buffer */
|
||||
sescmd->my_sescmd_buf = sescmd_buf;
|
||||
sescmd->my_sescmd_packet_type = packet_type;
|
||||
|
Reference in New Issue
Block a user