Fix to bug #590, http://bugs.mariadb.com/show_bug.cgi?id=590
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:
@ -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
|
||||
|
Reference in New Issue
Block a user