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:
parent
1a24f0a956
commit
cd136b11a7
@ -84,7 +84,8 @@ typedef enum qc_query_type
|
||||
QUERY_TYPE_CREATE_TMP_TABLE = 0x080000, /*< Create temporary table:master (could be all) */
|
||||
QUERY_TYPE_READ_TMP_TABLE = 0x100000, /*< Read temporary table:master (could be any) */
|
||||
QUERY_TYPE_SHOW_DATABASES = 0x200000, /*< Show list of databases */
|
||||
QUERY_TYPE_SHOW_TABLES = 0x400000 /*< Show list of tables */
|
||||
QUERY_TYPE_SHOW_TABLES = 0x400000, /*< Show list of tables */
|
||||
QUERY_TYPE_DEALLOC_PREPARE = 0x1000000 /*< Dealloc named prepare stmt:all */
|
||||
} qc_query_type_t;
|
||||
|
||||
/**
|
||||
|
@ -2136,7 +2136,7 @@ public:
|
||||
ss_dassert(this_thread.initialized);
|
||||
|
||||
m_status = QC_QUERY_PARSED;
|
||||
m_type_mask = QUERY_TYPE_WRITE;
|
||||
m_type_mask = QUERY_TYPE_DEALLOC_PREPARE;
|
||||
|
||||
// If information is collected in several passes, then we may
|
||||
// this information already.
|
||||
|
@ -23,3 +23,4 @@ QUERY_TYPE_READ|QUERY_TYPE_WRITE
|
||||
QUERY_TYPE_READ|QUERY_TYPE_WRITE
|
||||
QUERY_TYPE_READ|QUERY_TYPE_WRITE
|
||||
QUERY_TYPE_READ|QUERY_TYPE_WRITE
|
||||
QUERY_TYPE_DEALLOC_PREPARE
|
||||
|
@ -23,3 +23,4 @@ SELECT GET_LOCK('lock1',10);
|
||||
SELECT IS_FREE_LOCK('lock1');
|
||||
SELECT IS_USED_LOCK('lock1');
|
||||
SELECT RELEASE_LOCK('lock1');
|
||||
deallocate prepare select_stmt;
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user