removed unneeded QUERY_TYPE_DROP_TABLE type from query_classifier.h
This commit is contained in:
@ -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;
|
goto return_qtype;
|
||||||
}
|
}
|
||||||
@ -741,19 +736,7 @@ static skygw_query_type_t resolve_query_type(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} /**< for */
|
} /**< 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 */
|
} /**< if */
|
||||||
return_qtype:
|
return_qtype:
|
||||||
qtype = (skygw_query_type_t)type;
|
qtype = (skygw_query_type_t)type;
|
||||||
|
@ -47,7 +47,6 @@ typedef enum {
|
|||||||
QUERY_TYPE_EXEC_STMT = 0x1000, /*< Execute prepared statement */
|
QUERY_TYPE_EXEC_STMT = 0x1000, /*< Execute prepared statement */
|
||||||
QUERY_TYPE_CREATE_TMP_TABLE = 0x2000, /*< Create temporary table */
|
QUERY_TYPE_CREATE_TMP_TABLE = 0x2000, /*< Create temporary table */
|
||||||
QUERY_TYPE_READ_TMP_TABLE = 0x4000, /*< Read temporary table */
|
QUERY_TYPE_READ_TMP_TABLE = 0x4000, /*< Read temporary table */
|
||||||
QUERY_TYPE_DROP_TABLE = 0x8000
|
|
||||||
} skygw_query_type_t;
|
} skygw_query_type_t;
|
||||||
|
|
||||||
|
|
||||||
|
@ -1365,7 +1365,7 @@ static int routeQuery(
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
if(QUERY_IS_TYPE(qtype, QUERY_TYPE_CREATE_TMP_TABLE) ||
|
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);
|
tbl = skygw_get_table_names(querybuf,&tsize);
|
||||||
|
|
||||||
@ -1439,7 +1439,7 @@ static int routeQuery(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**Check if DROP TABLE... targets a temporary table*/
|
/**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)
|
if(rses_prop_tmp && rses_prop_tmp->rses_prop_data.temp_tables)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user