diff --git a/server/modules/protocol/mysql_common.c b/server/modules/protocol/mysql_common.c index 280b07708..8473e365b 100644 --- a/server/modules/protocol/mysql_common.c +++ b/server/modules/protocol/mysql_common.c @@ -34,6 +34,7 @@ * */ +#include #include "mysql_client_server_protocol.h" #include #include @@ -741,6 +742,7 @@ int gw_do_connect_to_backend( struct sockaddr_in serv_addr; int rv; int so = 0; + int bufsize; memset(&serv_addr, 0, sizeof serv_addr); serv_addr.sin_family = AF_INET; @@ -764,6 +766,10 @@ int gw_do_connect_to_backend( /* prepare for connect */ setipaddress(&serv_addr.sin_addr, host); serv_addr.sin_port = htons(port); + bufsize = GW_CLIENT_SO_SNDBUF; + setsockopt(so, SOL_SOCKET, SO_SNDBUF, &bufsize, sizeof(bufsize)); + bufsize = GW_CLIENT_SO_RCVBUF; + setsockopt(so, SOL_SOCKET, SO_RCVBUF, &bufsize, sizeof(bufsize)); /* set socket to as non-blocking here */ setnonblocking(so); rv = connect(so, (struct sockaddr *)&serv_addr, sizeof(serv_addr)); @@ -1387,9 +1393,9 @@ int gw_find_mysql_user_password_sha1(char *username, uint8_t *gateway_password, memset(&key.ipv4, 0, sizeof(struct sockaddr_in)); - LOGIF(LE, + LOGIF(LD, (skygw_log_write_flush( - LOGFILE_ERROR, + LOGFILE_DEBUG, "%lu [MySQL Client Auth], checking user [%s@%s] with wildcard host [%%]", pthread_self(), key.user,