Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix route_by_statement return value
The return value of route_by_statement was not initialized and not set if
a COM_CHANGE_USER was processed.
  • Loading branch information
markus456 committed Jun 12, 2018
1 parent 24870e2 commit e99d982
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion server/modules/protocol/MySQL/mariadbclient/mysql_client.cc
Expand Up @@ -1575,7 +1575,7 @@ static bool reauthenticate_client(MXS_SESSION* session, GWBUF* packetbuf)
*/
static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF** p_readbuf)
{
int rc;
int rc = 1;
GWBUF* packetbuf;
do
{
Expand Down Expand Up @@ -1682,6 +1682,7 @@ static int route_by_statement(MXS_SESSION* session, uint64_t capabilities, GWBUF
// Store the original COM_CHANGE_USER for later
proto->stored_query = packetbuf;
packetbuf = NULL;
rc = 1;
}
else if (proto->changing_user)
{
Expand Down

0 comments on commit e99d982

Please sign in to comment.