Fix to MXS-365: https://mariadb.atlassian.net/browse/MXS-365 Added tracking of LOAD DATA LOCAL INFILE

While a LOAD DATA LOCAL INFILE query is being executed, all queries will be sent to the master
and they will not be processed as normal packets.
This commit is contained in:
Markus Makela
2015-11-03 23:34:12 +02:00
parent 126b4c1d79
commit 0accf869de
4 changed files with 77 additions and 31 deletions

View File

@ -1647,6 +1647,11 @@ retblock:
skygw_query_op_t query_classifier_get_operation(GWBUF* querybuf)
{
if (!query_is_parsed(querybuf))
{
parse_query(querybuf);
}
LEX* lex = get_lex(querybuf);
skygw_query_op_t operation = QUERY_OP_UNDEFINED;
if(lex){
@ -1687,6 +1692,9 @@ skygw_query_op_t query_classifier_get_operation(GWBUF* querybuf)
case SQLCOM_CHANGE_DB:
operation = QUERY_OP_CHANGE_DB;
break;
case SQLCOM_LOAD:
operation = QUERY_OP_LOAD;
break;
default:
operation = QUERY_OP_UNDEFINED;

View File

@ -75,7 +75,8 @@ typedef enum {
QUERY_OP_CREATE_INDEX = (1 << 8),
QUERY_OP_DROP_TABLE = (1 << 9),
QUERY_OP_DROP_INDEX = (1 << 10),
QUERY_OP_CHANGE_DB = (1 << 11)
QUERY_OP_CHANGE_DB = (1 << 11),
QUERY_OP_LOAD = (1 << 12)
}skygw_query_op_t;
typedef struct parsing_info_st {