Fixed debug assertion causing a crash in readwritesplit
A debug assertion in the readwritesplit would always fail when the master DCB was NULL. This was caused by the fact that the debug assertion assumes that the pointer that is passed to it is a valid pointer.
This commit is contained in:
@ -2052,7 +2052,6 @@ static bool route_single_stmt(
|
|||||||
if ((master_dcb = rses->rses_master_ref->bref_dcb) == NULL)
|
if ((master_dcb = rses->rses_master_ref->bref_dcb) == NULL)
|
||||||
{
|
{
|
||||||
char* query_str = modutil_get_query(querybuf);
|
char* query_str = modutil_get_query(querybuf);
|
||||||
CHK_DCB(master_dcb);
|
|
||||||
MXS_ERROR("Can't route %s:%s:\"%s\" to "
|
MXS_ERROR("Can't route %s:%s:\"%s\" to "
|
||||||
"backend server. Session doesn't have a Master "
|
"backend server. Session doesn't have a Master "
|
||||||
"node",
|
"node",
|
||||||
@ -2064,6 +2063,7 @@ static bool route_single_stmt(
|
|||||||
goto retblock;
|
goto retblock;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
CHK_DCB(master_dcb);
|
||||||
packet = GWBUF_DATA(querybuf);
|
packet = GWBUF_DATA(querybuf);
|
||||||
packet_len = gw_mysql_get_byte3(packet);
|
packet_len = gw_mysql_get_byte3(packet);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user