Commit Graph

29 Commits

Author SHA1 Message Date
cc0299aee6 Update change date of 2.3 2018-06-25 10:07:52 +03:00
8094c67ac2 Merge branch '2.2' into develop 2018-06-13 00:25:56 +03:00
91cc5b1e89 MXS-1828: Simplify LOAD DATA LOCAL INFILE handling
By relying on the server to tell us that it is requesting the loading of a
local infile, we can remove one state from the state machine that governs
the loading of local files. It also removes the need to handle error and
success cases separately.

A side-effect of this change is that execution of multi-statement LOAD
DATA LOCAL INFILE no longer hangs. This is done by checking whether the
completion of one command initiates a new load.

The current code recursively checks the reply state and clones the
buffers. Neither of these are required nor should they be done but
refactoring the code is to be done in a separate commit.

Added two helper functions that are used to detect requests for local
infiles and to extract the total packet length from a non-contiguous
GWBUF.
2018-05-18 09:46:07 +03:00
77a258de86 MXS-1625 Unnecessary function removed 2018-04-17 10:09:37 +03:00
9be98df41c MXS-1625 Move RouteInfo to QueryClassifier 2018-04-10 17:41:59 +03:00
91b1ce39b8 MXS-1625 Move routing target bits to QueryClassifier 2018-04-10 17:41:59 +03:00
d65af04d19 MXS-1625 Make as much private as possible in QueryClassifier
Some stuff that is manipulated from RWS must be left public
for the time being.
2018-04-10 14:14:55 +03:00
563a33ae56 MXS-1625 Move get_target_type() to QueryClassifier 2018-04-10 14:14:55 +03:00
42e72bfb81 MXS-1625 Move handle_multi_temp_and_load to QueryClasifier 2018-04-10 14:14:55 +03:00
369029b612 MXS-1625 Move check_for_multi_stmt to QueryClassifier 2018-04-10 14:14:55 +03:00
9a6d66f104 MXS-1625 Move functions to QueryClassifier 2018-04-10 14:14:55 +03:00
505d6b5889 MXS-1625 Move check_create_tmp_table() to QueryClassifier 2018-04-10 14:14:55 +03:00
c8673bc0b3 MXS-1625 Move determine_query_type() to QueryClassifier 2018-04-10 14:14:55 +03:00
18ca7018b1 MXS-1625 Move log_transaction_status() to QueryClassifier 2018-04-10 14:14:55 +03:00
5689613801 MXS-1625 Hint-handling moved to QueryClassifier 2018-04-10 14:14:55 +03:00
c8961a3d14 MXS-1625 Move QueryClassifier::Handler to RWSplitSession 2018-04-10 14:14:55 +03:00
a102ddf5de MXS-1625 Remove final traces of RWSplitSession
The code for figuring out the where to send a statement does no
longer depend upon RWSplitSession but only on QueryClassifier.
So now the functionality can be moved into QueryClassifier after
which further cleanup and streamlining can be done.
2018-04-10 14:14:55 +03:00
300de4ecc6 MXS-1625 Move internal/external id map to QueryClassifier 2018-04-10 14:14:55 +03:00
36bea39b63 MXS-1625 Remove need for RWS session from handle_multi_temp_and_load() 2018-04-05 15:05:04 +03:00
00ee271656 MXS-1625 Remove need for RWS session in log_transaction_status() 2018-04-05 13:54:37 +03:00
08987e3e85 MXS-1625 Remove need for RWS session in check_create_tmp_table 2018-04-05 13:42:39 +03:00
1133173a65 MXS-1625 Move tmp table management to QueryClassifier
Eventually only managed by QueryClassifier.
2018-04-05 13:38:55 +03:00
59d257579c MXS-1625 Move LOAD DATA sent statistics to QueryClassifier
Eventually the tracking will be internal to QueryClassifier.
2018-04-05 12:46:27 +03:00
8c0033ccb2 MXS-1625 Figure out multi statement state at startup
Whether or not multi statements are allowed is checked when
the QueryClassifier instance is created.
2018-04-05 10:16:23 +03:00
dbce77f9ee MXS-1625 Add PSManager to QueryClassifier
A copy of the PSManager of ReadWriteSplit.
2018-04-05 10:16:23 +03:00
c08120846c MXS-1625 large_query flag moved from RWS session to query classifier 2018-04-04 15:20:38 +03:00
bc22790e1b MXS-1625 Move tmp table state variable to mxs::QueryClassifier 2018-04-04 15:18:51 +03:00
8220c31664 MXS-1625 Move load data state to QueryClassifier
Still managed from the outside, but eventually will be managed
entirelly by QueryClassifier.
2018-04-04 15:16:46 +03:00
1556bac6e4 MXS-1625 Add QueryClassifier class
This is the first step in providing a QueryClassifier class
that is capable of performing context dependent query classification,
where the context is essentially the session state.
2018-04-03 16:02:18 +03:00