MXS-2027: Store LOAD DATA state inside MXS_SESSION

By storing the data gathere by readwritesplit inside the session, the
protocol will be aware of the state of the LOAD DATA LOCAL INFILE
execution. This prevents misinterpretation of the data which previously
led to closed connections, effectively rendering LOAD DATA LOCAL INFILE
unusable.

This change is a temporary solution to a problem that needs to be solved
at the protocol level. The changes required to implement this are too big
to add into a bug fix release.
This commit is contained in:
Markus Mäkelä
2018-08-28 14:19:06 +03:00
parent e38e08089a
commit 5f4aa46552
5 changed files with 18 additions and 2 deletions

View File

@ -1622,7 +1622,7 @@ static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF
/**
* Update the currently command being executed.
*/
if (!proto->changing_user)
if (!proto->changing_user && !session_is_load_active(session))
{
update_current_command(session->client_dcb, packetbuf);
}
@ -1631,7 +1631,8 @@ static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF
{
ss_dassert(GWBUF_IS_CONTIGUOUS(packetbuf));
if (rcap_type_required(capabilities, RCAP_TYPE_TRANSACTION_TRACKING))
if (rcap_type_required(capabilities, RCAP_TYPE_TRANSACTION_TRACKING) &&
!session_is_load_active(session))
{
if (session_trx_is_ending(session))
{