MXS-2020 Replace ss[_info]_dassert with mxb_assert[_message]
This commit is contained in:
@ -84,7 +84,7 @@ static bool rwsplit_process_router_options(Config& config, char **options)
|
||||
if (strcmp(options[i], "slave_selection_criteria") == 0)
|
||||
{
|
||||
select_criteria_t c = GET_SELECT_CRITERIA(value);
|
||||
ss_dassert(c == LEAST_GLOBAL_CONNECTIONS ||
|
||||
mxb_assert(c == LEAST_GLOBAL_CONNECTIONS ||
|
||||
c == LEAST_ROUTER_CONNECTIONS || c == LEAST_BEHIND_MASTER ||
|
||||
c == LEAST_CURRENT_OPERATIONS || c == UNDEFINED_CRITERIA);
|
||||
|
||||
@ -221,7 +221,7 @@ Config* RWSplit::get_local_config() const
|
||||
mxs_rworker_set_data(m_wkey, my_config, data_destroy_callback);
|
||||
}
|
||||
|
||||
ss_dassert(my_config);
|
||||
mxb_assert(my_config);
|
||||
return my_config;
|
||||
}
|
||||
|
||||
|
||||
@ -362,7 +362,7 @@ static inline const char* failure_mode_to_str(enum failure_mode type)
|
||||
return "error_on_write";
|
||||
|
||||
default:
|
||||
ss_dassert(false);
|
||||
mxb_assert(false);
|
||||
return "UNDEFINED_MODE";
|
||||
}
|
||||
}
|
||||
|
||||
@ -107,7 +107,7 @@ void RWBackend::close(close_type type)
|
||||
bool RWBackend::consume_fetched_rows(GWBUF* buffer)
|
||||
{
|
||||
m_expected_rows -= modutil_count_packets(buffer);
|
||||
ss_dassert(m_expected_rows >= 0);
|
||||
mxb_assert(m_expected_rows >= 0);
|
||||
return m_expected_rows == 0;
|
||||
}
|
||||
|
||||
@ -165,7 +165,7 @@ bool RWBackend::reply_is_complete(GWBUF *buffer)
|
||||
else
|
||||
{
|
||||
// This is an OK packet and more results will follow
|
||||
ss_dassert(mxs_mysql_is_ok_packet(buffer) &&
|
||||
mxb_assert(mxs_mysql_is_ok_packet(buffer) &&
|
||||
mxs_mysql_more_results_after_ok(buffer));
|
||||
|
||||
if (have_next_packet(buffer))
|
||||
@ -216,7 +216,7 @@ bool RWBackend::reply_is_complete(GWBUF *buffer)
|
||||
{
|
||||
/** We either have a complete result set or a response to
|
||||
* a COM_FIELD_LIST command */
|
||||
ss_dassert(n_eof == 2 || (n_eof == 1 && current_command() == MXS_COM_FIELD_LIST));
|
||||
mxb_assert(n_eof == 2 || (n_eof == 1 && current_command() == MXS_COM_FIELD_LIST));
|
||||
set_reply_state(REPLY_STATE_DONE);
|
||||
|
||||
if (more)
|
||||
|
||||
@ -81,7 +81,7 @@ static SRWBackend compare_backends(SRWBackend a, SRWBackend b, select_criteria_t
|
||||
|
||||
void RWSplitSession::handle_connection_keepalive(SRWBackend& target)
|
||||
{
|
||||
ss_dassert(target);
|
||||
mxb_assert(target);
|
||||
MXB_AT_DEBUG(int nserv = 0);
|
||||
/** Each heartbeat is 1/10th of a second */
|
||||
int keepalive = m_config.connection_keepalive * 10;
|
||||
@ -104,7 +104,7 @@ void RWSplitSession::handle_connection_keepalive(SRWBackend& target)
|
||||
}
|
||||
}
|
||||
|
||||
ss_dassert(nserv < m_nbackends);
|
||||
mxb_assert(nserv < m_nbackends);
|
||||
}
|
||||
|
||||
bool RWSplitSession::prepare_target(SRWBackend& target, route_target_t route_target)
|
||||
@ -114,14 +114,14 @@ bool RWSplitSession::prepare_target(SRWBackend& target, route_target_t route_tar
|
||||
// Check if we need to connect to the server in order to use it
|
||||
if (!target->in_use())
|
||||
{
|
||||
ss_dassert(target->can_connect() && can_recover_servers());
|
||||
ss_dassert(!TARGET_IS_MASTER(route_target) || m_config.master_reconnection);
|
||||
mxb_assert(target->can_connect() && can_recover_servers());
|
||||
mxb_assert(!TARGET_IS_MASTER(route_target) || m_config.master_reconnection);
|
||||
rval = target->connect(m_client->session, &m_sescmd_list);
|
||||
MXS_INFO("Connected to '%s'", target->name());
|
||||
|
||||
if (rval && target->is_waiting_result())
|
||||
{
|
||||
ss_info_dassert(!m_sescmd_list.empty() && target->has_session_commands(),
|
||||
mxb_assert_message(!m_sescmd_list.empty() && target->has_session_commands(),
|
||||
"Session command list must not be empty and target "
|
||||
"should have unfinished session commands.");
|
||||
m_expected_responses++;
|
||||
@ -133,7 +133,7 @@ bool RWSplitSession::prepare_target(SRWBackend& target, route_target_t route_tar
|
||||
|
||||
void RWSplitSession::retry_query(GWBUF* querybuf, int delay)
|
||||
{
|
||||
ss_dassert(querybuf);
|
||||
mxb_assert(querybuf);
|
||||
// Try to route the query again later
|
||||
MXS_SESSION* session = m_client->session;
|
||||
session_delay_routing(session, router_as_downstream(session), querybuf, delay);
|
||||
@ -213,7 +213,7 @@ bool RWSplitSession::track_optimistic_trx(GWBUF** buffer)
|
||||
*/
|
||||
bool RWSplitSession::route_single_stmt(GWBUF *querybuf)
|
||||
{
|
||||
ss_info_dassert(m_otrx_state != OTRX_ROLLBACK,
|
||||
mxb_assert_message(m_otrx_state != OTRX_ROLLBACK,
|
||||
"OTRX_ROLLBACK should never happen when routing queries");
|
||||
bool succp = false;
|
||||
const QueryClassifier::RouteInfo& info = m_qc.current_route_info();
|
||||
@ -261,7 +261,7 @@ bool RWSplitSession::route_single_stmt(GWBUF *querybuf)
|
||||
{
|
||||
/** We're processing a large query that's split across multiple packets.
|
||||
* Route it to the same backend where we routed the previous packet. */
|
||||
ss_dassert(m_prev_target);
|
||||
mxb_assert(m_prev_target);
|
||||
target = m_prev_target;
|
||||
succp = true;
|
||||
}
|
||||
@ -678,7 +678,7 @@ SRWBackend RWSplitSession::get_target_backend(backend_type_t btype,
|
||||
|
||||
if (name) /*< Choose backend by name from a hint */
|
||||
{
|
||||
ss_dassert(btype != BE_MASTER);
|
||||
mxb_assert(btype != BE_MASTER);
|
||||
btype = BE_SLAVE;
|
||||
rval = get_hinted_backend(name);
|
||||
}
|
||||
@ -842,7 +842,7 @@ SRWBackend RWSplitSession::handle_slave_is_target(uint8_t cmd, uint32_t stmt_id)
|
||||
if (target)
|
||||
{
|
||||
atomic_add_uint64(&m_router->stats().n_slave, 1);
|
||||
ss_dassert(target->in_use() || target->can_connect());
|
||||
mxb_assert(target->in_use() || target->can_connect());
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -861,8 +861,8 @@ void RWSplitSession::log_master_routing_failure(bool found,
|
||||
{
|
||||
/** Both backends should either be empty, not connected or the DCB should
|
||||
* be a backend (the last check is slightly redundant). */
|
||||
ss_dassert(!old_master || !old_master->in_use() || old_master->dcb()->dcb_role == DCB_ROLE_BACKEND_HANDLER);
|
||||
ss_dassert(!curr_master || !curr_master->in_use() ||
|
||||
mxb_assert(!old_master || !old_master->in_use() || old_master->dcb()->dcb_role == DCB_ROLE_BACKEND_HANDLER);
|
||||
mxb_assert(!curr_master || !curr_master->in_use() ||
|
||||
curr_master->dcb()->dcb_role == DCB_ROLE_BACKEND_HANDLER);
|
||||
char errmsg[MAX_SERVER_ADDRESS_LEN * 2 + 100]; // Extra space for error message
|
||||
|
||||
@ -873,14 +873,14 @@ void RWSplitSession::log_master_routing_failure(bool found,
|
||||
else if (old_master && curr_master && old_master->in_use())
|
||||
{
|
||||
/** We found a master but it's not the same connection */
|
||||
ss_dassert(old_master != curr_master);
|
||||
mxb_assert(old_master != curr_master);
|
||||
sprintf(errmsg, "Master server changed from '%s' to '%s'",
|
||||
old_master->name(), curr_master->name());
|
||||
}
|
||||
else if (old_master && old_master->in_use())
|
||||
{
|
||||
// TODO: Figure out if this is an impossible situation
|
||||
ss_dassert(!curr_master);
|
||||
mxb_assert(!curr_master);
|
||||
/** We have an original master connection but we couldn't find it */
|
||||
sprintf(errmsg, "The connection to master server '%s' is not available",
|
||||
old_master->name());
|
||||
@ -895,10 +895,10 @@ void RWSplitSession::log_master_routing_failure(bool found,
|
||||
}
|
||||
else
|
||||
{
|
||||
ss_dassert(old_master && !old_master->in_use());
|
||||
mxb_assert(old_master && !old_master->in_use());
|
||||
sprintf(errmsg, "Was supposed to route to master but the master connection is %s",
|
||||
old_master->is_closed() ? "closed" : "not in a suitable state");
|
||||
ss_dassert(old_master->is_closed());
|
||||
mxb_assert(old_master->is_closed());
|
||||
}
|
||||
}
|
||||
|
||||
@ -1061,7 +1061,7 @@ GWBUF* RWSplitSession::add_prefix_wait_gtid(SERVER *server, GWBUF *origin)
|
||||
*/
|
||||
bool RWSplitSession::handle_got_target(GWBUF* querybuf, SRWBackend& target, bool store)
|
||||
{
|
||||
ss_dassert(target->in_use());
|
||||
mxb_assert(target->in_use());
|
||||
/**
|
||||
* If the transaction is READ ONLY set forced_node to this backend.
|
||||
* This SLAVE backend will be used until the COMMIT is seen.
|
||||
@ -1075,7 +1075,7 @@ bool RWSplitSession::handle_got_target(GWBUF* querybuf, SRWBackend& target, bool
|
||||
target->name(), target->uri());
|
||||
|
||||
/** The session command cursor must not be active */
|
||||
ss_dassert(!target->has_session_commands());
|
||||
mxb_assert(!target->has_session_commands());
|
||||
|
||||
mxs::Backend::response_type response = mxs::Backend::NO_RESPONSE;
|
||||
uint8_t cmd = mxs_mysql_get_command(querybuf);
|
||||
@ -1119,7 +1119,7 @@ bool RWSplitSession::handle_got_target(GWBUF* querybuf, SRWBackend& target, bool
|
||||
|
||||
if (!m_qc.large_query())
|
||||
{
|
||||
ss_dassert(target->get_reply_state() == REPLY_STATE_DONE);
|
||||
mxb_assert(target->get_reply_state() == REPLY_STATE_DONE);
|
||||
|
||||
if (response == mxs::Backend::EXPECT_RESPONSE)
|
||||
{
|
||||
@ -1131,7 +1131,7 @@ bool RWSplitSession::handle_got_target(GWBUF* querybuf, SRWBackend& target, bool
|
||||
{
|
||||
/** The final packet in a LOAD DATA LOCAL INFILE is an empty packet
|
||||
* to which the server responds with an OK or an ERR packet */
|
||||
ss_dassert(gwbuf_length(querybuf) == 4);
|
||||
mxb_assert(gwbuf_length(querybuf) == 4);
|
||||
m_qc.set_load_data_state(QueryClassifier::LOAD_DATA_INACTIVE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -235,7 +235,7 @@ static void log_server_connections(select_criteria_t criteria, const SRWBackendL
|
||||
break;
|
||||
|
||||
default:
|
||||
ss_dassert(!true);
|
||||
mxb_assert(!true);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -312,7 +312,7 @@ bool RWSplit::select_connect_backend_servers(MXS_SESSION *session,
|
||||
/** Check slave selection criteria and set compare function */
|
||||
select_criteria_t select_criteria = cnf.slave_selection_criteria;
|
||||
auto cmpfun = criteria_cmpfun[select_criteria];
|
||||
ss_dassert(cmpfun);
|
||||
mxb_assert(cmpfun);
|
||||
|
||||
if (mxs_log_is_priority_enabled(LOG_INFO))
|
||||
{
|
||||
@ -342,7 +342,7 @@ bool RWSplit::select_connect_backend_servers(MXS_SESSION *session,
|
||||
int slaves_connected = counts.second;
|
||||
int max_nslaves = max_slave_count();
|
||||
|
||||
ss_dassert(slaves_connected <= max_nslaves || max_nslaves == 0);
|
||||
mxb_assert(slaves_connected <= max_nslaves || max_nslaves == 0);
|
||||
|
||||
if (slaves_connected < max_nslaves)
|
||||
{
|
||||
|
||||
@ -75,7 +75,7 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
|
||||
{
|
||||
if (backend->has_session_commands())
|
||||
{
|
||||
ss_dassert(GWBUF_IS_COLLECTED_RESULT(*ppPacket));
|
||||
mxb_assert(GWBUF_IS_COLLECTED_RESULT(*ppPacket));
|
||||
uint8_t cmd;
|
||||
gwbuf_copy_data(*ppPacket, MYSQL_HEADER_LEN, 1, &cmd);
|
||||
uint8_t command = backend->next_session_command()->get_command();
|
||||
@ -88,7 +88,7 @@ void RWSplitSession::process_sescmd_response(SRWBackend& backend, GWBUF** ppPack
|
||||
{
|
||||
// This should never fail or the backend protocol is broken
|
||||
MXB_AT_DEBUG(bool b = )mxs_mysql_extract_ps_response(*ppPacket, &resp);
|
||||
ss_dassert(b);
|
||||
mxb_assert(b);
|
||||
backend->add_ps_handle(id, resp.id);
|
||||
}
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ int32_t RWSplitSession::routeQuery(GWBUF* querybuf)
|
||||
* We are already processing a request from the client. Store the
|
||||
* new query and wait for the previous one to complete.
|
||||
*/
|
||||
ss_dassert(m_expected_responses > 0 || m_query_queue);
|
||||
mxb_assert(m_expected_responses > 0 || m_query_queue);
|
||||
MXS_INFO("Storing query (len: %d cmd: %0x), expecting %d replies to current command",
|
||||
gwbuf_length(querybuf), GWBUF_DATA(querybuf)[4], m_expected_responses);
|
||||
m_query_queue = gwbuf_append(m_query_queue, querybuf);
|
||||
@ -185,7 +185,7 @@ bool RWSplitSession::route_stored_query()
|
||||
MXS_INFO("Routing stored queries");
|
||||
GWBUF* query_queue = modutil_get_next_MySQL_packet(&m_query_queue);
|
||||
query_queue = gwbuf_make_contiguous(query_queue);
|
||||
ss_dassert(query_queue);
|
||||
mxb_assert(query_queue);
|
||||
|
||||
if (query_queue == NULL)
|
||||
{
|
||||
@ -269,7 +269,7 @@ GWBUF* RWSplitSession::discard_master_wait_gtid_result(GWBUF *buffer)
|
||||
*/
|
||||
SRWBackend& RWSplitSession::get_backend_from_dcb(DCB *dcb)
|
||||
{
|
||||
ss_dassert(dcb->dcb_role == DCB_ROLE_BACKEND_HANDLER);
|
||||
mxb_assert(dcb->dcb_role == DCB_ROLE_BACKEND_HANDLER);
|
||||
|
||||
for (auto it = m_backends.begin(); it != m_backends.end(); it++)
|
||||
{
|
||||
@ -340,7 +340,7 @@ static void log_unexpected_response(SRWBackend& backend, GWBUF* buffer, GWBUF* c
|
||||
uint16_t errcode = MYSQL_GET_ERRCODE(data);
|
||||
std::string errstr((char*)data + 7, (char*)data + 7 + len - 3);
|
||||
|
||||
ss_dassert(errcode != ER_CONNECTION_KILLED);
|
||||
mxb_assert(errcode != ER_CONNECTION_KILLED);
|
||||
MXS_WARNING("Server '%s' sent an unexpected error: %hu, %s",
|
||||
backend->name(), errcode, errstr.c_str());
|
||||
}
|
||||
@ -352,7 +352,7 @@ static void log_unexpected_response(SRWBackend& backend, GWBUF* buffer, GWBUF* c
|
||||
"Query: %s", mxs_mysql_get_command(buffer), backend->name(),
|
||||
backend->current_command(), sql.c_str());
|
||||
session_dump_statements(backend->dcb()->session);
|
||||
ss_dassert(false);
|
||||
mxb_assert(false);
|
||||
}
|
||||
}
|
||||
|
||||
@ -432,7 +432,7 @@ void RWSplitSession::trx_replay_next_stmt()
|
||||
* whereas the original interrupted transaction had none. Due to this,
|
||||
* the checksums would not match if they were to be compared.
|
||||
*/
|
||||
ss_info_dassert(!m_interrupted_query.get(), "Interrupted query should be empty");
|
||||
mxb_assert_message(!m_interrupted_query.get(), "Interrupted query should be empty");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -472,7 +472,7 @@ void RWSplitSession::clientReply(GWBUF *writebuf, DCB *backend_dcb)
|
||||
/** This is the response to the ROLLBACK. If it fails, we must close
|
||||
* the connection. The replaying of the transaction can continue
|
||||
* regardless of the ROLLBACK result. */
|
||||
ss_dassert(backend == m_prev_target);
|
||||
mxb_assert(backend == m_prev_target);
|
||||
|
||||
if (!mxs_mysql_is_ok_packet(writebuf))
|
||||
{
|
||||
@ -535,14 +535,14 @@ void RWSplitSession::clientReply(GWBUF *writebuf, DCB *backend_dcb)
|
||||
/** Got a complete reply, acknowledge the write and decrement expected response count */
|
||||
backend->ack_write();
|
||||
m_expected_responses--;
|
||||
ss_dassert(m_expected_responses >= 0);
|
||||
ss_dassert(backend->get_reply_state() == REPLY_STATE_DONE);
|
||||
mxb_assert(m_expected_responses >= 0);
|
||||
mxb_assert(backend->get_reply_state() == REPLY_STATE_DONE);
|
||||
MXS_INFO("Reply complete, last reply from %s", backend->name());
|
||||
|
||||
if (m_config.causal_reads)
|
||||
{
|
||||
// The reply should never be complete while we are still waiting for the header.
|
||||
ss_dassert(m_wait_gtid != WAITING_FOR_HEADER);
|
||||
mxb_assert(m_wait_gtid != WAITING_FOR_HEADER);
|
||||
m_wait_gtid = NONE;
|
||||
}
|
||||
|
||||
@ -578,7 +578,7 @@ void RWSplitSession::clientReply(GWBUF *writebuf, DCB *backend_dcb)
|
||||
}
|
||||
else if (m_is_replay_active)
|
||||
{
|
||||
ss_dassert(m_config.transaction_replay);
|
||||
mxb_assert(m_config.transaction_replay);
|
||||
|
||||
if (m_expected_responses == 0)
|
||||
{
|
||||
@ -633,8 +633,8 @@ void RWSplitSession::clientReply(GWBUF *writebuf, DCB *backend_dcb)
|
||||
|
||||
if (writebuf)
|
||||
{
|
||||
ss_dassert(client_dcb);
|
||||
ss_info_dassert(backend->in_use(), "Backend should be in use when routing reply");
|
||||
mxb_assert(client_dcb);
|
||||
mxb_assert_message(backend->in_use(), "Backend should be in use when routing reply");
|
||||
/** Write reply to client DCB */
|
||||
MXS_SESSION_ROUTE_REPLY(backend_dcb->session, writebuf);
|
||||
}
|
||||
@ -649,7 +649,7 @@ void check_and_log_backend_state(const SRWBackend& backend, DCB* problem_dcb)
|
||||
{
|
||||
MXS_ERROR("Backend '%s' is still in use and points to the problem DCB.",
|
||||
backend->name());
|
||||
ss_dassert(false);
|
||||
mxb_assert(false);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -698,14 +698,14 @@ bool RWSplitSession::start_trx_replay()
|
||||
* executed. The buffer should contain a query that starts
|
||||
* a transaction.
|
||||
*/
|
||||
ss_info_dassert(qc_get_trx_type_mask(m_interrupted_query.get()) & QUERY_TYPE_BEGIN_TRX,
|
||||
mxb_assert_message(qc_get_trx_type_mask(m_interrupted_query.get()) & QUERY_TYPE_BEGIN_TRX,
|
||||
"The current query should start a transaction");
|
||||
retry_query(m_interrupted_query.release(), 0);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
ss_info_dassert(!session_is_autocommit(m_client->session),
|
||||
mxb_assert_message(!session_is_autocommit(m_client->session),
|
||||
"Session should have autocommit disabled if the transaction "
|
||||
"had no statements and no query was interrupted");
|
||||
}
|
||||
@ -734,12 +734,12 @@ bool RWSplitSession::start_trx_replay()
|
||||
void RWSplitSession::handleError(GWBUF *errmsgbuf, DCB *problem_dcb,
|
||||
mxs_error_action_t action, bool *succp)
|
||||
{
|
||||
ss_dassert(problem_dcb->dcb_role == DCB_ROLE_BACKEND_HANDLER);
|
||||
mxb_assert(problem_dcb->dcb_role == DCB_ROLE_BACKEND_HANDLER);
|
||||
MXS_SESSION *session = problem_dcb->session;
|
||||
ss_dassert(session);
|
||||
mxb_assert(session);
|
||||
|
||||
SRWBackend& backend = get_backend_from_dcb(problem_dcb);
|
||||
ss_dassert(backend->in_use());
|
||||
mxb_assert(backend->in_use());
|
||||
|
||||
switch (action)
|
||||
{
|
||||
@ -772,7 +772,7 @@ void RWSplitSession::handleError(GWBUF *errmsgbuf, DCB *problem_dcb,
|
||||
else
|
||||
{
|
||||
// We were expecting a response but we aren't going to get one
|
||||
ss_dassert(m_expected_responses > 0);
|
||||
mxb_assert(m_expected_responses > 0);
|
||||
m_expected_responses--;
|
||||
|
||||
if (can_retry_query())
|
||||
@ -828,7 +828,7 @@ void RWSplitSession::handleError(GWBUF *errmsgbuf, DCB *problem_dcb,
|
||||
* on the master.
|
||||
*/
|
||||
|
||||
ss_dassert(session_trx_is_active(session));
|
||||
mxb_assert(session_trx_is_active(session));
|
||||
m_otrx_state = OTRX_INACTIVE;
|
||||
can_continue = start_trx_replay();
|
||||
backend->close();
|
||||
@ -853,7 +853,7 @@ void RWSplitSession::handleError(GWBUF *errmsgbuf, DCB *problem_dcb,
|
||||
}
|
||||
|
||||
default:
|
||||
ss_dassert(!true);
|
||||
mxb_assert(!true);
|
||||
*succp = false;
|
||||
break;
|
||||
}
|
||||
@ -882,7 +882,7 @@ bool RWSplitSession::handle_error_new_connection(DCB *backend_dcb, GWBUF *errmsg
|
||||
|
||||
if (backend->is_waiting_result())
|
||||
{
|
||||
ss_dassert(m_expected_responses > 0);
|
||||
mxb_assert(m_expected_responses > 0);
|
||||
m_expected_responses--;
|
||||
|
||||
/**
|
||||
@ -1002,12 +1002,12 @@ bool RWSplitSession::supports_hint(HINT_TYPE hint_type) const
|
||||
|
||||
case HINT_ROUTE_TO_UPTODATE_SERVER:
|
||||
case HINT_ROUTE_TO_ALL:
|
||||
ss_dassert(!true);
|
||||
mxb_assert(!true);
|
||||
rv = false;
|
||||
break;
|
||||
|
||||
default:
|
||||
ss_dassert(!true);
|
||||
mxb_assert(!true);
|
||||
rv = false;
|
||||
}
|
||||
|
||||
|
||||
@ -268,9 +268,9 @@ private:
|
||||
uint32_t buflen = gwbuf_length(buf);
|
||||
|
||||
// The buffer should contain at most (2^24 - 1) + 4 bytes ...
|
||||
ss_dassert(buflen <= MYSQL_HEADER_LEN + GW_MYSQL_MAX_PACKET_LEN);
|
||||
mxb_assert(buflen <= MYSQL_HEADER_LEN + GW_MYSQL_MAX_PACKET_LEN);
|
||||
// ... and the payload should be buflen - 4 bytes
|
||||
ss_dassert(MYSQL_GET_PAYLOAD_LEN(GWBUF_DATA(buf)) == buflen - MYSQL_HEADER_LEN);
|
||||
mxb_assert(MYSQL_GET_PAYLOAD_LEN(GWBUF_DATA(buf)) == buflen - MYSQL_HEADER_LEN);
|
||||
|
||||
return buflen == MYSQL_HEADER_LEN + GW_MYSQL_MAX_PACKET_LEN;
|
||||
}
|
||||
|
||||
@ -39,7 +39,7 @@ public:
|
||||
*/
|
||||
void add_stmt(GWBUF* buf)
|
||||
{
|
||||
ss_info_dassert(buf, "Trx::add_stmt: Buffer must not be empty");
|
||||
mxb_assert_message(buf, "Trx::add_stmt: Buffer must not be empty");
|
||||
|
||||
if (mxs_log_is_priority_enabled(LOG_INFO))
|
||||
{
|
||||
@ -72,7 +72,7 @@ public:
|
||||
*/
|
||||
GWBUF* pop_stmt()
|
||||
{
|
||||
ss_dassert(!m_log.empty());
|
||||
mxb_assert(!m_log.empty());
|
||||
GWBUF* rval = m_log.front().release();
|
||||
m_log.pop_front();
|
||||
return rval;
|
||||
|
||||
Reference in New Issue
Block a user