From f380c707f9c3ec46e849df157d05c1ce80087955 Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Wed, 26 Mar 2014 22:33:57 +0200 Subject: [PATCH] In resolve_query_type type can be QUERY_TYPE_COMMIT even if lex->option_type is OPT_DEFAULT. --- query_classifier/query_classifier.cc | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/query_classifier/query_classifier.cc b/query_classifier/query_classifier.cc index ae3627356..410f47d61 100644 --- a/query_classifier/query_classifier.cc +++ b/query_classifier/query_classifier.cc @@ -445,13 +445,15 @@ static skygw_query_type_t resolve_query_type( "next command."); } } + type |= QUERY_TYPE_COMMIT; + if (lex->option_type == OPT_GLOBAL) { - type |= (QUERY_TYPE_GLOBAL_WRITE|QUERY_TYPE_COMMIT); + type |= QUERY_TYPE_GLOBAL_WRITE; } - else + else if (lex->option_type == OPT_SESSION) { - type |= (QUERY_TYPE_SESSION_WRITE|QUERY_TYPE_COMMIT); + type |= QUERY_TYPE_SESSION_WRITE; } goto return_qtype; }