From 3f375e680a8aa9a8cad76910ebfc7ddc950ae877 Mon Sep 17 00:00:00 2001 From: VilhoRaatikka Date: Fri, 31 Oct 2014 20:09:43 +0200 Subject: [PATCH] Fix to #590, http://bugs.mariadb.com/show_bug.cgi?id=590 gw_change_user returned error code in cases where authentication failed. That is not right behavior in that context. gw_change_user succeeds to route query and should return succees to router's routeQuery. Possible error is handled by creating error message and by feeding it to client DCB's event queue. --- server/modules/protocol/mysql_backend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/modules/protocol/mysql_backend.c b/server/modules/protocol/mysql_backend.c index c006c3788..c6ef05ee8 100644 --- a/server/modules/protocol/mysql_backend.c +++ b/server/modules/protocol/mysql_backend.c @@ -1327,7 +1327,7 @@ static int gw_change_user( /** Create an incoming event for backend DCB */ poll_add_epollin_event_to_dcb(backend, gwbuf_clone(buf)); gwbuf_free(buf); - rv = 0; + rv = 1; } else { rv = gw_send_change_user_to_backend(database, username, client_sha1, backend_protocol); /*