Commit Graph

10 Commits

Author SHA1 Message Date
a417567a18 Format readwritesplit with Astyle
Formatted readwritesplit with Astyle. Changed the initialization of
Backend::m_modutil_state to use curly braces to cope with Astyle's lack of
support for curly braces inside parentheses.
2018-07-02 13:29:18 +03:00
b96228f95c Merge branch '2.2' into develop 2018-06-22 10:44:39 +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
d6c44aaf52 MXS-1804: Allow large session commands
Session commands that span multiple packets are now allowed and will
work. However, if one is executed the session command history is disabled
as no interface for appending to session commands exists.

The backend protocol modules now also correctly track the current
command. This was a pre-requisite for large session commands as they
needed to be gathered into a single buffer and to do this the current
command had to be accurate.

Updated tests to expect success instead of failure for large prepared
statements.
2018-05-03 09:46:47 +03:00
880e0fb74e Merge branch '2.2' into develop 2018-04-26 16:39:00 +03:00
ec33fcf87d Merge branch '2.2' into develop 2018-04-13 14:53:00 +03:00
c8d25f293f MXS-1506: Clean up various functions
Reduced variable scopes and removed unused code.
2018-04-10 15:31:51 +03:00
951a55ef43 Format readwritesplit source code
Formatted all files with Astyle.
2018-04-10 15:30:27 +03:00
d5643bc14d Create RWBackends from servers
Added a helper function that creates a list of servers to use. This should
remove some of the duplicate code in the routers.
2018-04-03 13:30:55 +03:00
6ef9e1fd9a Move RWBackend into a separate file
Moved the RWBackend class implementation into its own file. Made some of
the command type functions a part of the <maxscale/protocol/mysql.h>
header to make it reusable.
2018-04-03 13:30:55 +03:00