mysql_common.c:gw_send_change_user_to_backend creates new authentication message which is to be sent to backend. GWBUG type flags were not copied from original GWBUF to new one. Thus the information that this is a session command was lost and it was processed in a wrong way. Especially replies were all routed back to client which caused misbehavior.
This commit is contained in:
VilhoRaatikka
2014-10-25 00:19:31 +03:00
parent 18ec838ba7
commit 236a72a6b6
2 changed files with 20 additions and 7 deletions

View File

@ -1137,6 +1137,11 @@ int gw_send_change_user_to_backend(
// allocating the GWBUF
buffer = gwbuf_alloc(bytes);
/**
* Set correct type to GWBUF so that it will be handled like session
* commands should
*/
buffer->gwbuf_type = GWBUF_TYPE_MYSQL|GWBUF_TYPE_SINGLE_STMT|GWBUF_TYPE_SESCMD;
payload = GWBUF_DATA(buffer);
// clearing data