MXS-1891: dealloc named prepare should route to all (#174)

* dealloc named prepare route to all

* add newline

* erase from ps manager too

* little refactor
This commit is contained in:
dapeng huang
2018-06-12 15:45:11 +08:00
committed by Johan Wikman
parent 1a24f0a956
commit cd136b11a7
5 changed files with 10 additions and 2 deletions

View File

@ -344,6 +344,10 @@ bool route_session_write(RWSplitSession *rses, GWBUF *querybuf,
{
rses->ps_manager.store(querybuf, id);
}
else if (qc_query_is_type(type, QUERY_TYPE_DEALLOC_PREPARE))
{
rses->ps_manager.erase(get_text_ps_id(querybuf));
}
MXS_INFO("Session write, routing to all servers.");
@ -624,6 +628,7 @@ route_target_t get_route_target(RWSplitSession *rses, uint8_t command,
*/
if (qc_query_is_type(qtype, QUERY_TYPE_PREPARE_STMT) ||
qc_query_is_type(qtype, QUERY_TYPE_PREPARE_NAMED_STMT) ||
qc_query_is_type(qtype, QUERY_TYPE_DEALLOC_PREPARE) ||
command == MXS_COM_STMT_CLOSE ||
command == MXS_COM_STMT_RESET)
{