Merge branch '2.2' into develop

This commit is contained in:
Markus Mäkelä
2018-06-22 10:44:00 +03:00
7 changed files with 184 additions and 15 deletions

View File

@ -87,19 +87,19 @@ bool Backend::execute_session_command()
CHK_DCB(m_dcb);
SessionCommandList::iterator iter = m_session_commands.begin();
SessionCommand& sescmd = *(*iter);
GWBUF *buffer = sescmd.deep_copy_buffer();
SSessionCommand& sescmd = m_session_commands.front();
GWBUF *buffer = sescmd->deep_copy_buffer();
bool rval = false;
switch (sescmd.get_command())
switch (sescmd->get_command())
{
case MXS_COM_QUIT:
case MXS_COM_STMT_CLOSE:
case MXS_COM_STMT_SEND_LONG_DATA:
/** These commands do not generate responses */
rval = write(buffer, NO_RESPONSE);
rval = Backend::write(buffer, NO_RESPONSE);
complete_session_command();
ss_dassert(!is_waiting_result());
break;
case MXS_COM_CHANGE_USER:
@ -110,12 +110,11 @@ bool Backend::execute_session_command()
case MXS_COM_QUERY:
default:
/**
* Mark session command buffer, it triggers writing
* MySQL command to protocol
*/
// 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 = write(buffer);
rval = Backend::write(buffer);
ss_dassert(is_waiting_result());
break;
}