From 4665f862d5bf6ad3b47fe00bf06deaf7ccb5bad8 Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Tue, 9 Sep 2014 14:34:08 +0300 Subject: [PATCH] Fixed handling of temporary table reads which also used user- or system variables. Temporary table handling rules have precedence over others. --- server/modules/routing/readwritesplit/readwritesplit.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index 8ac5f6117..c13f91cde 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -1422,7 +1422,11 @@ skygw_query_type_t is_read_tmp_table( data = (MYSQL_session*)master_dcb->session->data; dbname = (char*)data->db; - if (QUERY_IS_TYPE(qtype, QUERY_TYPE_READ)) + if (QUERY_IS_TYPE(qtype, QUERY_TYPE_READ) || + QUERY_IS_TYPE(qtype, QUERY_TYPE_LOCAL_READ) || + QUERY_IS_TYPE(qtype, QUERY_TYPE_USERVAR_READ) || + QUERY_IS_TYPE(qtype, QUERY_TYPE_SYSVAR_READ) || + QUERY_IS_TYPE(qtype, QUERY_TYPE_GSYSVAR_READ)) { tbl = skygw_get_table_names(querybuf,&tsize,false);