MXS-1625 Move internal/external id map to QueryClassifier

This commit is contained in:
Johan Wikman
2018-04-06 15:20:09 +03:00
parent 304499bd36
commit 300de4ecc6
5 changed files with 70 additions and 23 deletions

View File

@ -737,24 +737,3 @@ void RWSplitSession::handle_error_reply_client(DCB *backend_dcb, GWBUF *errmsg)
m_client->func.write(m_client, gwbuf_clone(errmsg));
}
}
uint32_t get_internal_ps_id(RWSplitSession* rses, GWBUF* buffer)
{
uint32_t rval = 0;
// All COM_STMT type statements store the ID in the same place
uint32_t id = mxs_mysql_extract_ps_id(buffer);
ClientHandleMap::iterator it = rses->m_ps_handles.find(id);
if (it != rses->m_ps_handles.end())
{
rval = it->second;
}
else
{
MXS_WARNING("Client requests unknown prepared statement ID '%u' that "
"does not map to an internal ID", id);
}
return rval;
}