Fix bugs introduced by refactoring
Fixed minor bugs that were introduced by the refactoring.
This commit is contained in:
@ -527,7 +527,7 @@ int32_t SchemaRouterSession::routeQuery(GWBUF* pPacket)
|
||||
ret = 1;
|
||||
}
|
||||
}
|
||||
else
|
||||
else if (target == NULL)
|
||||
{
|
||||
target = resolve_query_target(pPacket, type, command, route_target);
|
||||
}
|
||||
@ -601,7 +601,7 @@ void SchemaRouterSession::handle_mapping_reply(Backend* bref, GWBUF** pPacket)
|
||||
|
||||
if (m_queue.size() && rc != -1)
|
||||
{
|
||||
ss_dassert(m_state == INIT_READY);
|
||||
ss_dassert(m_state == INIT_READY || m_state == INIT_USE_DB);
|
||||
route_queued_query();
|
||||
}
|
||||
}
|
||||
@ -1726,6 +1726,7 @@ SERVER* SchemaRouterSession::get_shard_target(GWBUF* buffer, uint32_t qtype)
|
||||
MXS_INFO("Routing hint found (%s)", rval->unique_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (rval == NULL && !has_dbs && m_current_db.length())
|
||||
{
|
||||
@ -1742,7 +1743,6 @@ SERVER* SchemaRouterSession::get_shard_target(GWBUF* buffer, uint32_t qtype)
|
||||
m_current_db.c_str(), rval->unique_name);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return rval;
|
||||
}
|
||||
|
Reference in New Issue
Block a user