From b5da527555d38f1332a8a7525a34aaaf3f47c29e Mon Sep 17 00:00:00 2001 From: Massimiliano Pinto Date: Mon, 14 Oct 2013 18:41:49 +0200 Subject: [PATCH] myql_common.c:gw_send_change_user_to_backend checks func.write for 0 and 1 mysql_client.c:gw_MySQLWrite_client is simply return dcb_write(dcb, queue); The return codes are not the same of the code replaced, but they are not checked in the caller routines. --- server/modules/protocol/mysql_client.c | 2 +- server/modules/protocol/mysql_common.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/server/modules/protocol/mysql_client.c b/server/modules/protocol/mysql_client.c index 82a4c7847..8a8f137bb 100644 --- a/server/modules/protocol/mysql_client.c +++ b/server/modules/protocol/mysql_client.c @@ -433,7 +433,7 @@ static int gw_mysql_do_authentication(DCB *dcb, GWBUF *queue) { int gw_MySQLWrite_client(DCB *dcb, GWBUF *queue) { -#if 0 +#if 1 return dcb_write(dcb, queue); #else int w, saved_errno = 0; diff --git a/server/modules/protocol/mysql_common.c b/server/modules/protocol/mysql_common.c index a1e602083..16e78b92a 100644 --- a/server/modules/protocol/mysql_common.c +++ b/server/modules/protocol/mysql_common.c @@ -986,7 +986,7 @@ int gw_send_change_user_to_backend(char *dbname, char *user, uint8_t *passwd, My rv = dcb->func.write(dcb, buffer); - if (rv < 0) + if (rv == 0) return 0; else return 1;