Remove session command processing from mariadbbackend

With the removal of the old session command implementation, the code that
used it can be removed or replaced with newer constructs. As a result, the
backend protocol no longer does any session command processing.

The three buffer types, GWBUF_TYPE_SESCMD_RESPONSE,
GWBUF_TYPE_RESPONSE_END and GWBUF_TYPE_SESCMD as well as their related
macros are no longer used and can be removed.
This commit is contained in:
Markus Mäkelä
2018-07-16 19:43:06 +03:00
parent 19feee9e0e
commit 28609a2c77
5 changed files with 87 additions and 345 deletions

View File

@ -103,16 +103,13 @@ bool Backend::execute_session_command()
break;
case MXS_COM_CHANGE_USER:
/** This makes it possible to handle replies correctly */
gwbuf_set_type(buffer, GWBUF_TYPE_SESCMD);
rval = auth(buffer);
break;
case MXS_COM_QUERY:
default:
// 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);
// We want the complete response in one packet
gwbuf_set_type(buffer, GWBUF_TYPE_COLLECT_RESULT);
rval = write(buffer, EXPECT_RESPONSE);
ss_dassert(is_waiting_result());
break;