Merge branch 'develop' into sigchld_handler
This commit is contained in:
commit
adee076242
@ -211,7 +211,7 @@ The binlog router module of MaxScale produces diagnostic output that can be view
|
||||
|
||||
|
||||
|
||||
# Binlog router compatibily
|
||||
# Binlog router compatibility
|
||||
|
||||
Binlog Router Plugin is compatible with MySQL 5.6, MariaDB 5.5, the current default.
|
||||
|
||||
@ -239,7 +239,7 @@ Note:
|
||||
|
||||
- If MASTER_LOG_POS is not set with CHANGE MASTER TO it defaults to 4
|
||||
|
||||
- Latest binlog file name and pos in MaxScale could be find via maxadmin ouput or from mysql client connected to MaxScale:
|
||||
- Latest binlog file name and pos in MaxScale could be find via maxadmin output or from mysql client connected to MaxScale:
|
||||
|
||||
Example:
|
||||
|
||||
@ -250,13 +250,13 @@ Example:
|
||||
File: mysql-bin.000181
|
||||
Position: 2569
|
||||
|
||||
# Enabling MariaDB 10 compatibilty
|
||||
# Enabling MariaDB 10 compatibility
|
||||
|
||||
MariaDB 10 has different slave registration phase so an option is reuqired:
|
||||
MariaDB 10 has different slave registration phase so an option is required:
|
||||
|
||||
router_options=...., mariadb10-compatibility=1
|
||||
|
||||
version_string should be modified in order to present MariaDB 10 version wen MaxScale sends server handshake packet.
|
||||
version_string should be modified in order to present MariaDB 10 version when MaxScale sends server handshake packet.
|
||||
|
||||
version_string=10.0.17-log
|
||||
|
||||
|
@ -259,7 +259,7 @@ GWPROTOCOL *funcs;
|
||||
{
|
||||
hashtable_free(service->users->data);
|
||||
free(service->users);
|
||||
dcb_free(port->listener);
|
||||
dcb_close(port->listener);
|
||||
port->listener = NULL;
|
||||
goto retblock;
|
||||
}
|
||||
@ -330,7 +330,7 @@ GWPROTOCOL *funcs;
|
||||
"Loaded %d MySQL Users for service [%s].",
|
||||
loaded, service->name)));
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (service->users == NULL) {
|
||||
@ -342,12 +342,8 @@ GWPROTOCOL *funcs;
|
||||
if ((funcs=(GWPROTOCOL *)load_module(port->protocol, MODULE_PROTOCOL))
|
||||
== NULL)
|
||||
{
|
||||
if (service->users->data)
|
||||
{
|
||||
hashtable_free(service->users->data);
|
||||
}
|
||||
free(service->users);
|
||||
dcb_free(port->listener);
|
||||
users_free(service->users);
|
||||
dcb_close(port->listener);
|
||||
port->listener = NULL;
|
||||
LOGIF(LE, (skygw_log_write_flush(
|
||||
LOGFILE_ERROR,
|
||||
@ -381,11 +377,7 @@ GWPROTOCOL *funcs;
|
||||
"Error : Failed to create session to service %s.",
|
||||
service->name)));
|
||||
|
||||
if (service->users->data)
|
||||
{
|
||||
hashtable_free(service->users->data);
|
||||
}
|
||||
free(service->users);
|
||||
users_free(service->users);
|
||||
dcb_close(port->listener);
|
||||
port->listener = NULL;
|
||||
goto retblock;
|
||||
@ -399,11 +391,7 @@ GWPROTOCOL *funcs;
|
||||
port->port,
|
||||
port->protocol,
|
||||
service->name)));
|
||||
if (service->users->data)
|
||||
{
|
||||
hashtable_free(service->users->data);
|
||||
}
|
||||
free(service->users);
|
||||
users_free(service->users);
|
||||
dcb_close(port->listener);
|
||||
port->listener = NULL;
|
||||
}
|
||||
|
@ -59,12 +59,16 @@ users_alloc()
|
||||
USERS *rval;
|
||||
|
||||
if ((rval = calloc(1, sizeof(USERS))) == NULL)
|
||||
return NULL;
|
||||
{
|
||||
skygw_log_write(LE,"[%s:%d] Error: Memory allocation failed.",__FUNCTION__,__LINE__);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
if ((rval->data = hashtable_alloc(USERS_HASHTABLE_DEFAULT_SIZE, user_hash, strcmp)) == NULL)
|
||||
{
|
||||
free(rval);
|
||||
return NULL;
|
||||
skygw_log_write(LE,"[%s:%d] Error: Memory allocation failed.",__FUNCTION__,__LINE__);
|
||||
free(rval);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
hashtable_memory_fns(rval->data, (HASHMEMORYFN)strdup, (HASHMEMORYFN)strdup, (HASHMEMORYFN)free, (HASHMEMORYFN)free);
|
||||
@ -80,8 +84,15 @@ USERS *rval;
|
||||
void
|
||||
users_free(USERS *users)
|
||||
{
|
||||
if(users == NULL)
|
||||
{
|
||||
skygw_log_write(LE,"[%s:%d] Error: NULL parameter.",__FUNCTION__,__LINE__);
|
||||
return;
|
||||
}
|
||||
|
||||
if(users->data)
|
||||
hashtable_free(users->data);
|
||||
free(users);
|
||||
free(users);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
x
Reference in New Issue
Block a user