Use derived version of write for session commands

Prepared statements via readwritesplit need to have their IDs mapped from
the internal representation to the backend specific one. The RWBackend
class does this in its write method but the fix in commit
e561c3995c7396cf3749ccdf6a3357d7dd32c856 caused this to be bypassed and
the base version was always used.
This commit is contained in:
Markus Mäkelä 2018-06-26 13:17:35 +03:00
parent f97f422379
commit f49c31625d
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19

View File

@ -96,7 +96,7 @@ bool Backend::execute_session_command()
case MXS_COM_QUIT:
case MXS_COM_STMT_CLOSE:
/** These commands do not generate responses */
rval = Backend::write(buffer, NO_RESPONSE);
rval = write(buffer, NO_RESPONSE);
complete_session_command();
ss_dassert(!is_waiting_result());
break;
@ -112,7 +112,7 @@ bool Backend::execute_session_command()
// TODO: Remove use of GWBUF_TYPE_SESCMD
//Mark session command buffer, it triggers writing MySQL command to protocol
gwbuf_set_type(buffer, GWBUF_TYPE_SESCMD);
rval = Backend::write(buffer);
rval = write(buffer, EXPECT_RESPONSE);
ss_dassert(is_waiting_result());
break;
}