Merge branch '2.2' into develop
This commit is contained in:
@ -47,6 +47,13 @@
|
||||
# define __STDC_FORMAT_MACROS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Needs to be defined for INT32_MAX and others
|
||||
*/
|
||||
#ifndef __STDC_LIMIT_MACROS
|
||||
#define __STDC_LIMIT_MACROS
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Define intended for use with strerror.
|
||||
*
|
||||
|
@ -232,6 +232,7 @@ typedef struct
|
||||
time_t query_retry_timeout; /**< Timeout for query retries */
|
||||
bool substitute_variables; /**< Should environment variables be substituted */
|
||||
char* local_address; /**< Local address to use when connecting */
|
||||
time_t users_refresh_time; /**< How often the users can be refreshed */
|
||||
} MXS_CONFIG;
|
||||
|
||||
/**
|
||||
|
@ -385,14 +385,15 @@ void load_server_journal(MXS_MONITOR *monitor, MXS_MONITORED_SERVER **master);
|
||||
MXS_MONITORED_SERVER* mon_get_monitored_server(const MXS_MONITOR* mon, SERVER* search_server);
|
||||
|
||||
/**
|
||||
* Get an array of monitored servers. All the servers defined in the config setting must be monitored by
|
||||
* the given monitor.
|
||||
* Get an array of monitored servers. If a server defined in the config setting is not monitored by
|
||||
* the given monitor, that server is ignored and not inserted into the output array.
|
||||
*
|
||||
* @param params Config parameters
|
||||
* @param key Setting name
|
||||
* @param mon Monitor which should monitor the servers
|
||||
* @param monitored_servers_out Where to save output. The caller should free the array, but not the elements.
|
||||
* @return Output array size if successful, negative value otherwise
|
||||
* @param monitored_servers_out Where to save output array. The caller should free the array, but not the
|
||||
* elements. The output must contain NULL before calling this function.
|
||||
* @return Output array size.
|
||||
*/
|
||||
int mon_config_get_servers(const MXS_CONFIG_PARAMETER* params, const char* key, const MXS_MONITOR* mon,
|
||||
MXS_MONITORED_SERVER*** monitored_array_out);
|
||||
|
@ -78,8 +78,8 @@ typedef struct
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
int nloads;
|
||||
time_t last;
|
||||
time_t last; /*<< When was the users loaded the last time. */
|
||||
bool warned; /**< Has it been warned that the limit has been exceeded. */
|
||||
} SERVICE_REFRESH_RATE;
|
||||
|
||||
typedef struct server_ref_t
|
||||
@ -106,8 +106,8 @@ typedef struct server_ref_t
|
||||
#define SERVICE_PARAM_UNINIT -1
|
||||
|
||||
/* Refresh rate limits for load users from database */
|
||||
#define USERS_REFRESH_TIME 30 /* Allowed time interval (in seconds) after last update*/
|
||||
#define USERS_REFRESH_MAX_PER_TIME 4 /* Max number of load calls within the time interval */
|
||||
#define USERS_REFRESH_TIME_DEFAULT 30 /* Allowed time interval (in seconds) after last update*/
|
||||
#define USERS_REFRESH_TIME_MIN 10 /* Minimum allowed time interval (in seconds)*/
|
||||
|
||||
/** Default timeout values used by the connections which fetch user authentication data */
|
||||
#define DEFAULT_AUTH_CONNECT_TIMEOUT 3
|
||||
|
Reference in New Issue
Block a user