Introduce internal protocol command enum
The enums exposed by the connector are not intended to be used by the users of the library. The fact that the protocol, and other, modules used it was in violation of how the library is intended to be used. Adding an internal mapping into MaxScale also removes some of the dependencies that the core has on the connector.
This commit is contained in:
@ -91,20 +91,20 @@ bool Backend::execute_session_command()
|
||||
|
||||
switch (sescmd.get_command())
|
||||
{
|
||||
case MYSQL_COM_QUIT:
|
||||
case MYSQL_COM_STMT_CLOSE:
|
||||
case MXS_COM_QUIT:
|
||||
case MXS_COM_STMT_CLOSE:
|
||||
/** These commands do not generate responses */
|
||||
rval = write(buffer, NO_RESPONSE);
|
||||
complete_session_command();
|
||||
break;
|
||||
|
||||
case MYSQL_COM_CHANGE_USER:
|
||||
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 MYSQL_COM_QUERY:
|
||||
case MXS_COM_QUERY:
|
||||
default:
|
||||
/**
|
||||
* Mark session command buffer, it triggers writing
|
||||
|
||||
Reference in New Issue
Block a user