Merge branch 'develop' into 1.2.1-binlog_router_trx
This commit is contained in:
@ -267,10 +267,10 @@ Query OK, 0 rows affected (0.00 sec)
|
||||
Additionally, `GRANT SELECT` on the `mysql.db` table and `SHOW DATABASES` privileges are required in order to load databases name and grants suitable for database name authorization.
|
||||
|
||||
```
|
||||
MariaDB [(none)]> GRANT SELECT ON mysql.db TO 'username'@'maxscalehost';
|
||||
MariaDB [(none)]> GRANT SELECT ON mysql.db TO 'maxscale'@'maxscalehost';
|
||||
Query OK, 0 rows affected (0.00 sec)
|
||||
|
||||
MariaDB [(none)]> GRANT SHOW DATABASES ON *.* TO 'username'@'maxscalehost';
|
||||
MariaDB [(none)]> GRANT SHOW DATABASES ON *.* TO 'maxscale'@'maxscalehost';
|
||||
Query OK, 0 rows affected (0.00 sec)
|
||||
```
|
||||
|
||||
|
@ -6,7 +6,7 @@ The MySQL Monitor is a monitoring module for MaxScale that monitors a Master-Sla
|
||||
|
||||
## Configuration
|
||||
|
||||
A minimal configuration for a monitor requires a set of servers for monitoring and a username and a password to connect to these servers. The user requires the REPLICATION CLIENT privilege to successfully monitor the state of the servers.
|
||||
A minimal configuration for a monitor requires a set of servers for monitoring and a username and a password to connect to these servers.
|
||||
|
||||
```
|
||||
[MySQL Monitor]
|
||||
@ -18,6 +18,13 @@ passwd=mypwd
|
||||
|
||||
```
|
||||
|
||||
The user requires the REPLICATION CLIENT privilege to successfully monitor the state of the servers.
|
||||
|
||||
```
|
||||
MariaDB [(none)]> grant replication client on *.* to 'maxscale'@'maxscalehost';
|
||||
Query OK, 0 rows affected (0.00 sec)
|
||||
```
|
||||
|
||||
## Optional parameters for all monitors
|
||||
|
||||
Here are optional parameters that are common for all the monitors.
|
||||
|
@ -771,6 +771,8 @@ static int logmanager_write_log(
|
||||
wp = (char*)malloc(sizeof(char)*(timestamp_len-sizeof(char)+cmplen+str_len + 1));
|
||||
}
|
||||
|
||||
if(wp == NULL)
|
||||
return -1;
|
||||
|
||||
#if defined (SS_LOG_DEBUG)
|
||||
{
|
||||
@ -1042,7 +1044,9 @@ static char* blockbuf_get_writepos(
|
||||
/**
|
||||
* New node is created
|
||||
*/
|
||||
bb = blockbuf_init(id);
|
||||
if((bb = blockbuf_init(id)) == NULL)
|
||||
return NULL;
|
||||
|
||||
CHK_BLOCKBUF(bb);
|
||||
|
||||
/**
|
||||
@ -1128,7 +1132,9 @@ static char* blockbuf_get_writepos(
|
||||
* Create the first block buffer to logfile's blockbuf list.
|
||||
*/
|
||||
|
||||
bb = blockbuf_init(id);
|
||||
if((bb = blockbuf_init(id)) == NULL)
|
||||
return NULL;
|
||||
|
||||
CHK_BLOCKBUF(bb);
|
||||
|
||||
/** Lock buffer */
|
||||
@ -1210,9 +1216,10 @@ static void blockbuf_node_done(
|
||||
static blockbuf_t* blockbuf_init(
|
||||
logfile_id_t id)
|
||||
{
|
||||
blockbuf_t* bb;
|
||||
blockbuf_t* bb;
|
||||
|
||||
bb = (blockbuf_t *)calloc(1, sizeof(blockbuf_t));
|
||||
if ((bb = (blockbuf_t *) calloc(1, sizeof (blockbuf_t))))
|
||||
{
|
||||
bb->bb_fileid = id;
|
||||
#if defined(SS_DEBUG)
|
||||
bb->bb_chk_top = CHK_NUM_BLOCKBUF;
|
||||
@ -1221,15 +1228,18 @@ static blockbuf_t* blockbuf_init(
|
||||
simple_mutex_init(&bb->bb_mutex, "Blockbuf mutex");
|
||||
bb->bb_buf_left = MAX_LOGSTRLEN;
|
||||
bb->bb_buf_size = MAX_LOGSTRLEN;
|
||||
|
||||
#if defined(SS_LOG_DEBUG)
|
||||
sprintf(bb->bb_buf,"[block:%d]",atomic_add(&block_start_index,1));
|
||||
bb->bb_buf_used += strlen(bb->bb_buf);
|
||||
bb->bb_buf_left -= strlen(bb->bb_buf);
|
||||
sprintf(bb->bb_buf, "[block:%d]", atomic_add(&block_start_index, 1));
|
||||
bb->bb_buf_used += strlen(bb->bb_buf);
|
||||
bb->bb_buf_left -= strlen(bb->bb_buf);
|
||||
#endif
|
||||
|
||||
CHK_BLOCKBUF(bb);
|
||||
return bb;
|
||||
}
|
||||
else
|
||||
{
|
||||
fprintf(stderr, "Error: Memory allocation failed when initializing log manager block buffers.");
|
||||
}
|
||||
return bb;
|
||||
}
|
||||
|
||||
|
||||
|
@ -2438,9 +2438,8 @@ bool check_service_permissions(SERVICE* service)
|
||||
{
|
||||
if(mysql_errno(mysql) == ER_TABLEACCESS_DENIED_ERROR)
|
||||
{
|
||||
skygw_log_write(LE,"%s: Error: User '%s' is missing SELECT privileges on mysql.db table. MySQL error message: %s",
|
||||
skygw_log_write(LE,"%s: Warning: User '%s' is missing SELECT privileges on mysql.db table. Database name will be ignored in authentication. MySQL error message: %s",
|
||||
service->name,user,mysql_error(mysql));
|
||||
rval = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -324,7 +324,7 @@ static inline bool connect_to_db(MONITOR* mon,MONITOR_SERVERS *database)
|
||||
|
||||
static inline void monitor_mysql100_db(MONITOR_SERVERS* database)
|
||||
{
|
||||
bool isslave = false;
|
||||
int isslave = 0;
|
||||
MYSQL_RES* result;
|
||||
MYSQL_ROW row;
|
||||
|
||||
|
Reference in New Issue
Block a user