Merge remote-tracking branch 'origin/develop' into MXS-122

Conflicts:
	server/core/dcb.c
This commit is contained in:
counterpoint
2015-07-08 14:54:22 +01:00
45 changed files with 1189 additions and 774 deletions

View File

@ -58,6 +58,7 @@ extern __thread log_info_t tls_log_info;
* Revision History
* Date Who Description
* 13/06/2014 Mark Riddoch Initial implementation
* 07/07/15 Martin Brampton Correct failure handling
*
* @endverbatim
*/
@ -270,9 +271,7 @@ int n_connect = 0;
{
atomic_add(&dcb->stats.n_accepts, 1);
client_dcb = dcb_alloc(DCB_ROLE_REQUEST_HANDLER);
if (client_dcb == NULL)
{
close(so);
return n_connect;
@ -283,7 +282,8 @@ int n_connect = 0;
if ((maxscaled_pr = (MAXSCALED *)malloc(sizeof(MAXSCALED))) == NULL)
{
client_dcb->protocol = NULL;
dcb_add_to_zombieslist(client_dcb);
close(so);
dcb_close(client_dcb);
return n_connect;
}
maxscaled_pr->username = NULL;
@ -293,9 +293,9 @@ int n_connect = 0;
client_dcb->session =
session_alloc(dcb->session->service, client_dcb);
if (poll_add_dcb(client_dcb) == -1)
if (poll_add_dcb(client_dcb))
{
dcb_add_to_zombieslist(dcb);
dcb_close(dcb);
return n_connect;
}
n_connect++;

View File

@ -1452,8 +1452,8 @@ int gw_MySQLListener(
// add listening socket to poll structure
if (poll_add_dcb(listen_dcb) == -1) {
fprintf(stderr,
"\n* Failed to start polling the socket due error "
"%i, %s.\n\n",
"\n* MaxScale encountered system limit while "
"attempting to register on an epoll instance.\n\n",
errno,
strerror(errno));
return 0;
@ -1688,7 +1688,8 @@ int gw_MySQLAccept(DCB *listener)
client_dcb,
1,
0,
"MaxScale internal error.");
"MaxScale encountered system limit while "
"attempting to register on an epoll instance.");
/** close client_dcb */
dcb_close(client_dcb);

View File

@ -36,6 +36,7 @@
* 03/10/2014 Massimiliano Pinto Added netmask for wildcard in IPv4 hosts.
* 24/10/2014 Massimiliano Pinto Added Mysql user@host @db authentication support
* 10/11/2014 Massimiliano Pinto Charset at connect is passed to backend during authentication
* 07/07/15 Martin Brampton Fix problem recognising null password
*
*/
@ -1550,13 +1551,6 @@ int gw_find_mysql_user_password_sha1(char *username, uint8_t *gateway_password,
break;
}
/** See if ANYDB == Y */
if(key.resource)
{
key.resource = NULL;
continue;
}
if (!user_password) {
/*
* user@% not found.

View File

@ -67,6 +67,7 @@ extern __thread log_info_t tls_log_info;
* Date Who Description
* 17/06/2013 Mark Riddoch Initial version
* 17/07/2013 Mark Riddoch Addition of login phase
* 07/07/2015 Martin Brampton Call unified dcb_close on error
*
* @endverbatim
*/
@ -315,13 +316,13 @@ int n_connect = 0;
if (telnetd_pr == NULL)
{
dcb_add_to_zombieslist(client_dcb);
dcb_close(client_dcb);
return n_connect;
}
if (poll_add_dcb(client_dcb) == -1)
if (poll_add_dcb(client_dcb))
{
dcb_add_to_zombieslist(dcb);
dcb_close(dcb);
return n_connect;
}
n_connect++;