MXS-1896: Distinct LOAD DATA LOCAL INFILE from LOAD DATA INFILE

The two operations return different types of results and need to be
treated differently in order for them to be handled correctly in 2.2.

This fixes the unexpected internal state errors that happened in all 2.2
versions due to a wrong assumption made by readwritesplit. This fix is not
necessary for newer versions as the LOAD DATA LOCAL INFILE processing is
done with a simpler, and more robust, method.
This commit is contained in:
Markus Mäkelä
2018-06-02 22:24:51 +03:00
parent c88aa11e11
commit cddcc6d7d5
10 changed files with 57 additions and 14 deletions

View File

@ -85,6 +85,7 @@ static inline fw_op_t qc_op_to_fw_op(qc_query_op_t op)
case QUERY_OP_INSERT:
return FW_OP_INSERT;
case QUERY_OP_LOAD_LOCAL:
case QUERY_OP_LOAD:
return FW_OP_LOAD;
@ -288,4 +289,4 @@ char* create_error(const char* format, ...);
*/
bool rule_matches(Dbfw* my_instance, DbfwSession* my_session,
GWBUF *queue, SRule rule, char* query);
bool rule_is_active(SRule rule);
bool rule_is_active(SRule rule);