KILL [CONNECTION | QUERY] support, part1

Preparation for adding KILL syntax support.
Session id changed to uint32 everywhere. Added atomic op.
Session id can be acquired before session_alloc().
Added session_alloc_with_id(), which is given a session id number.
Worker object has a session_id->SESSION* mapping, not used yet.
This commit is contained in:
Esa Korhonen
2017-04-27 18:09:06 +03:00
parent 46da2d3ad2
commit bfd94c2b31
13 changed files with 120 additions and 53 deletions

View File

@ -116,4 +116,9 @@ bool mxs_worker_post_message(MXS_WORKER* worker, uint32_t msg_id, intptr_t arg1,
*/
size_t mxs_worker_broadcast_message(uint32_t msg_id, intptr_t arg1, intptr_t arg2);
// These automatically act on the currently executing worker thread. Not implemented yet.
void mxs_add_to_session_map(uint32_t id, MXS_SESSION* session);
void mxs_remove_from_session_map(uint32_t id);
MXS_SESSION* mxs_find_in_session_map(uint32_t id);
MXS_END_DECLS