diff --git a/query_classifier/query_classifier.cc b/query_classifier/query_classifier.cc index 92931e7ab..1e8916208 100644 --- a/query_classifier/query_classifier.cc +++ b/query_classifier/query_classifier.cc @@ -542,11 +542,6 @@ static skygw_query_type_t resolve_query_type( } } - - if(lex->sql_command == SQLCOM_DROP_TABLE) - { - type |= QUERY_TYPE_DROP_TABLE; - } goto return_qtype; } @@ -741,19 +736,7 @@ static skygw_query_type_t resolve_query_type( break; } } /**< for */ -#if defined(TEMPORARY_TABLES) - if ((skygw_query_type_t)type == QUERY_TYPE_READ) - { - /** - * Find out the database name and all tables the query - * uses. Create a hashvalue from each and if any of the - * values can be found from property's hashtable, set - * query type to QUERY_TYPE_READ_TMP_TABLE. - */ - - } -#endif } /**< if */ return_qtype: qtype = (skygw_query_type_t)type; diff --git a/query_classifier/query_classifier.h b/query_classifier/query_classifier.h index 86d5033d4..a0dccf988 100644 --- a/query_classifier/query_classifier.h +++ b/query_classifier/query_classifier.h @@ -47,7 +47,6 @@ typedef enum { QUERY_TYPE_EXEC_STMT = 0x1000, /*< Execute prepared statement */ QUERY_TYPE_CREATE_TMP_TABLE = 0x2000, /*< Create temporary table */ QUERY_TYPE_READ_TMP_TABLE = 0x4000, /*< Read temporary table */ - QUERY_TYPE_DROP_TABLE = 0x8000 } skygw_query_type_t; diff --git a/server/modules/routing/readwritesplit/readwritesplit.c b/server/modules/routing/readwritesplit/readwritesplit.c index ba4f70489..10d738d6c 100644 --- a/server/modules/routing/readwritesplit/readwritesplit.c +++ b/server/modules/routing/readwritesplit/readwritesplit.c @@ -1365,7 +1365,7 @@ static int routeQuery( */ if(QUERY_IS_TYPE(qtype, QUERY_TYPE_CREATE_TMP_TABLE) || - QUERY_IS_TYPE(qtype, QUERY_TYPE_DROP_TABLE)){ + packet_type == MYSQL_COM_DROP_DB){ tbl = skygw_get_table_names(querybuf,&tsize); @@ -1439,7 +1439,7 @@ static int routeQuery( } /**Check if DROP TABLE... targets a temporary table*/ - if(QUERY_IS_TYPE(qtype, QUERY_TYPE_DROP_TABLE)) + if(packet_type == MYSQL_COM_DROP_DB) { if(rses_prop_tmp && rses_prop_tmp->rses_prop_data.temp_tables) {