Format all sources with Uncrustify

Formatted all sources and manually tuned some files to make the code look
neater.
This commit is contained in:
Markus Mäkelä 2018-09-10 12:40:03 +03:00
parent edd5ddcc88
commit d11c78ad80
No known key found for this signature in database
GPG Key ID: 72D48FCE664F7B19
183 changed files with 1865 additions and 1695 deletions

View File

@ -171,40 +171,40 @@ typedef enum
((s) == MXS_AUTH_STATE_INIT ? "MXS_AUTH_STATE_INIT" \
: ((s) == MXS_AUTH_STATE_PENDING_CONNECT ? "MXS_AUTH_STATE_PENDING_CONNECT" \
: ((s) \
== MXS_AUTH_STATE_CONNECTED ? \
"MXS_AUTH_STATE_CONNECTED" \
: (( \
s) \
== \
MXS_AUTH_STATE_MESSAGE_READ \
? \
"MXS_AUTH_STATE_MESSAGE_READ" \
: (( \
s) \
== \
MXS_AUTH_STATE_RESPONSE_SENT \
? \
"MXS_AUTH_STATE_RESPONSE_SENT" \
: (( \
s) \
== \
MXS_AUTH_STATE_FAILED \
? \
"MXS_AUTH_STATE_FAILED" \
: (( \
s) \
== \
MXS_AUTH_STATE_HANDSHAKE_FAILED \
? \
"MXS_AUTH_STATE_HANDSHAKE_FAILED" \
: (( \
s) \
== \
MXS_AUTH_STATE_COMPLETE \
? \
"MXS_AUTH_STATE_COMPLETE" \
: \
"UNKNOWN AUTH STATE"))))))))
== MXS_AUTH_STATE_CONNECTED \
? "MXS_AUTH_STATE_CONNECTED" \
: (( \
s) \
== \
MXS_AUTH_STATE_MESSAGE_READ \
? \
"MXS_AUTH_STATE_MESSAGE_READ" \
: (( \
s) \
== \
MXS_AUTH_STATE_RESPONSE_SENT \
? \
"MXS_AUTH_STATE_RESPONSE_SENT" \
: (( \
s) \
== \
MXS_AUTH_STATE_FAILED \
? \
"MXS_AUTH_STATE_FAILED" \
: (( \
s) \
== \
MXS_AUTH_STATE_HANDSHAKE_FAILED \
? \
"MXS_AUTH_STATE_HANDSHAKE_FAILED" \
: (( \
s) \
== \
MXS_AUTH_STATE_COMPLETE \
? \
"MXS_AUTH_STATE_COMPLETE" \
: \
"UNKNOWN AUTH STATE"))))))))
/**
* The MXS_AUTHENTICATOR version data. The following should be updated whenever

View File

@ -242,53 +242,53 @@ typedef struct config_context
*/
typedef struct
{
bool config_check; /**< Only check config */
int n_threads; /**< Number of polling threads */
size_t thread_stack_size; /**< The stack size of each worker thread */
char* version_string; /**< The version string of embedded db library */
char release_string[RELEASE_STR_LENGTH]; /**< The release name string of the system */
char sysname[SYSNAME_LEN]; /**< The OS name of the system */
uint8_t mac_sha1[SHA_DIGEST_LENGTH]; /**< The SHA1 digest of an interface MAC address
* */
unsigned int n_nbpoll; /**< Tune number of non-blocking polls */
unsigned int pollsleep; /**< Wait time in blocking polls */
int syslog; /**< Log to syslog */
int maxlog; /**< Log to MaxScale's own logs */
unsigned int auth_conn_timeout; /**< Connection timeout for the user
* authentication */
unsigned int auth_read_timeout; /**< Read timeout for the user authentication */
unsigned int auth_write_timeout; /**< Write timeout for the user authentication */
bool skip_permission_checks; /**< Skip service and monitor permission checks */
int32_t passive; /**< True if MaxScale is in passive mode */
int64_t promoted_at; /**< Time when this Maxscale instance was
* promoted from a passive to an active */
char qc_name[PATH_MAX]; /**< The name of the query classifier to load */
char* qc_args; /**< Arguments for the query classifier */
QC_CACHE_PROPERTIES qc_cache_properties; /**< The query classifier cache properties. */
qc_sql_mode_t qc_sql_mode; /**< The query classifier sql mode */
char admin_host[MAX_ADMIN_HOST_LEN]; /**< Admin interface host */
uint16_t admin_port; /**< Admin interface port */
bool admin_auth; /**< Admin interface authentication */
bool admin_enabled; /**< Admin interface is enabled */
bool admin_log_auth_failures; /**< Log admin interface authentication failures
* */
char admin_ssl_key[PATH_MAX]; /**< Admin SSL key */
char admin_ssl_cert[PATH_MAX]; /**< Admin SSL cert */
char admin_ssl_ca_cert[PATH_MAX]; /**< Admin SSL CA cert */
int query_retries; /**< Number of times a interrupted query is
* retried */
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 */
uint64_t writeq_high_water; /**< High water mark of dcb write queue */
uint64_t writeq_low_water; /**< Low water mark of dcb write queue */
char peer_hosts[MAX_ADMIN_HOST_LEN]; /**< The protocol, address and port for peers
* (currently only one) */
char peer_user[MAX_ADMIN_HOST_LEN]; /**< Username for maxscale-to-maxscale traffic */
char peer_password[MAX_ADMIN_HOST_LEN]; /**< Password for maxscale-to-maxscale traffic */
mxb_log_target_t log_target; /**< Log type */
bool config_check; /**< Only check config */
int n_threads; /**< Number of polling threads */
size_t thread_stack_size; /**< The stack size of each worker thread */
char* version_string; /**< The version string of embedded db library */
char release_string[RELEASE_STR_LENGTH]; /**< The release name string of the system */
char sysname[SYSNAME_LEN]; /**< The OS name of the system */
uint8_t mac_sha1[SHA_DIGEST_LENGTH]; /**< The SHA1 digest of an interface MAC address
* */
unsigned int n_nbpoll; /**< Tune number of non-blocking polls */
unsigned int pollsleep; /**< Wait time in blocking polls */
int syslog; /**< Log to syslog */
int maxlog; /**< Log to MaxScale's own logs */
unsigned int auth_conn_timeout; /**< Connection timeout for the user
* authentication */
unsigned int auth_read_timeout; /**< Read timeout for the user authentication */
unsigned int auth_write_timeout; /**< Write timeout for the user authentication */
bool skip_permission_checks; /**< Skip service and monitor permission checks */
int32_t passive; /**< True if MaxScale is in passive mode */
int64_t promoted_at; /**< Time when this Maxscale instance was
* promoted from a passive to an active */
char qc_name[PATH_MAX]; /**< The name of the query classifier to load */
char* qc_args; /**< Arguments for the query classifier */
QC_CACHE_PROPERTIES qc_cache_properties; /**< The query classifier cache properties. */
qc_sql_mode_t qc_sql_mode; /**< The query classifier sql mode */
char admin_host[MAX_ADMIN_HOST_LEN]; /**< Admin interface host */
uint16_t admin_port; /**< Admin interface port */
bool admin_auth; /**< Admin interface authentication */
bool admin_enabled; /**< Admin interface is enabled */
bool admin_log_auth_failures; /**< Log admin interface authentication failures
* */
char admin_ssl_key[PATH_MAX]; /**< Admin SSL key */
char admin_ssl_cert[PATH_MAX]; /**< Admin SSL cert */
char admin_ssl_ca_cert[PATH_MAX]; /**< Admin SSL CA cert */
int query_retries; /**< Number of times a interrupted query is
* retried */
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 */
uint64_t writeq_high_water; /**< High water mark of dcb write queue */
uint64_t writeq_low_water; /**< Low water mark of dcb write queue */
char peer_hosts[MAX_ADMIN_HOST_LEN]; /**< The protocol, address and port for peers
* (currently only one) */
char peer_user[MAX_ADMIN_HOST_LEN]; /**< Username for maxscale-to-maxscale traffic */
char peer_password[MAX_ADMIN_HOST_LEN]; /**< Password for maxscale-to-maxscale traffic */
mxb_log_target_t log_target; /**< Log type */
} MXS_CONFIG;
/**

View File

@ -102,16 +102,16 @@ typedef enum
((r) == DCB_ROLE_SERVICE_LISTENER ? "DCB_ROLE_SERVICE_LISTENER" \
: ((r) == DCB_ROLE_CLIENT_HANDLER ? "DCB_ROLE_CLIENT_HANDLER" \
: ((r) \
== DCB_ROLE_BACKEND_HANDLER ? \
"DCB_ROLE_BACKEND_HANDLER" \
: (( \
r) \
== \
DCB_ROLE_INTERNAL \
? \
"DCB_ROLE_INTERNAL" \
: \
"UNKNOWN DCB ROLE"))))
== DCB_ROLE_BACKEND_HANDLER \
? "DCB_ROLE_BACKEND_HANDLER" \
: (( \
r) \
== \
DCB_ROLE_INTERNAL \
? \
"DCB_ROLE_INTERNAL" \
: \
"UNKNOWN DCB ROLE"))))
#define DCB_STRTYPE(dcb) \
(dcb->dcb_role == DCB_ROLE_CLIENT_HANDLER ? "Client DCB" \
@ -193,14 +193,14 @@ typedef struct dcb
MXS_PROTOCOL func; /**< The protocol functions for this descriptor */
MXS_AUTHENTICATOR authfunc; /**< The authenticator functions for this descriptor
* */
uint32_t writeqlen; /**< Current number of byes in the write queue */
uint32_t high_water; /**< High water mark of write queue */
uint32_t low_water; /**< Low water mark of write queue */
GWBUF* writeq; /**< Write Data Queue */
GWBUF* delayq; /**< Delay Backend Write Data Queue */
GWBUF* readq; /**< Read queue for storing incomplete reads */
GWBUF* fakeq; /**< Fake event queue for generated events */
uint32_t fake_event; /**< Fake event to be delivered to handler */
uint32_t writeqlen; /**< Current number of byes in the write queue */
uint32_t high_water; /**< High water mark of write queue */
uint32_t low_water; /**< Low water mark of write queue */
GWBUF* writeq; /**< Write Data Queue */
GWBUF* delayq; /**< Delay Backend Write Data Queue */
GWBUF* readq; /**< Read queue for storing incomplete reads */
GWBUF* fakeq; /**< Fake event queue for generated events */
uint32_t fake_event; /**< Fake event to be delivered to handler */
DCBSTATS stats; /**< DCB related statistics */
struct dcb* nextpersistent; /**< Next DCB in the persistent pool for SERVER */

View File

@ -88,7 +88,7 @@ typedef struct mxs_filter_object
*
* @return New filter instance on NULL on error
*/
MXS_FILTER*(*createInstance)(const char* name, MXS_CONFIG_PARAMETER* params);
MXS_FILTER*(*createInstance)(const char* name, MXS_CONFIG_PARAMETER * params);
/**
* Called to create a new user session within the filter
@ -103,7 +103,7 @@ typedef struct mxs_filter_object
*
* @return New filter session or NULL on error
*/
MXS_FILTER_SESSION*(*newSession)(MXS_FILTER * instance, MXS_SESSION* session);
MXS_FILTER_SESSION*(*newSession)(MXS_FILTER * instance, MXS_SESSION * session);
/**
* @brief Called when a session is closed
@ -113,7 +113,7 @@ typedef struct mxs_filter_object
* @param instance Filter instance
* @param fsession Filter session
*/
void (* closeSession)(MXS_FILTER* instance, MXS_FILTER_SESSION* fsession);
void (* closeSession)(MXS_FILTER * instance, MXS_FILTER_SESSION * fsession);
/**
* @brief Called when a session is freed
@ -123,7 +123,7 @@ typedef struct mxs_filter_object
* @param instance Filter instance
* @param fsession Filter session
*/
void (* freeSession)(MXS_FILTER* instance, MXS_FILTER_SESSION* fsession);
void (* freeSession)(MXS_FILTER * instance, MXS_FILTER_SESSION * fsession);
/**
* @brief Sets the downstream component of the filter pipeline
@ -131,7 +131,7 @@ typedef struct mxs_filter_object
* @param instance Filter instance
* @param fsession Filter session
*/
void (* setDownstream)(MXS_FILTER* instance, MXS_FILTER_SESSION* fsession, MXS_DOWNSTREAM* downstream);
void (* setDownstream)(MXS_FILTER * instance, MXS_FILTER_SESSION * fsession, MXS_DOWNSTREAM * downstream);
/**
* @brief Sets the upstream component of the filter pipeline
@ -139,7 +139,7 @@ typedef struct mxs_filter_object
* @param instance Filter instance
* @param fsession Filter session
*/
void (* setUpstream)(MXS_FILTER* instance, MXS_FILTER_SESSION* fsession, MXS_UPSTREAM* downstream);
void (* setUpstream)(MXS_FILTER * instance, MXS_FILTER_SESSION * fsession, MXS_UPSTREAM * downstream);
/**
* @brief Called on each query that requires routing
@ -176,7 +176,7 @@ typedef struct mxs_filter_object
* @param fsession Filter session, NULL if general information about the filter is queried
* @param dcb DCB where the diagnostic information should be written
*/
void (* diagnostics)(MXS_FILTER* instance, MXS_FILTER_SESSION* fsession, DCB* dcb);
void (* diagnostics)(MXS_FILTER * instance, MXS_FILTER_SESSION * fsession, DCB * dcb);
/**
* @brief Called for diagnostic output
@ -188,7 +188,7 @@ typedef struct mxs_filter_object
*
* @see jansson.h
*/
json_t* (*diagnostics_json)(const MXS_FILTER * instance, const MXS_FILTER_SESSION* fsession);
json_t* (*diagnostics_json)(const MXS_FILTER * instance, const MXS_FILTER_SESSION * fsession);
/**
* @brief Called to obtain the capabilities of the filter
@ -204,7 +204,7 @@ typedef struct mxs_filter_object
*
* @param instance Filter instance
*/
void (* destroyInstance)(MXS_FILTER* instance);
void (* destroyInstance)(MXS_FILTER * instance);
} MXS_FILTER_OBJECT;
/**

View File

@ -38,33 +38,33 @@ typedef enum
(t == HINT_ROUTE_TO_MASTER ? "HINT_ROUTE_TO_MASTER" \
: ((t) == HINT_ROUTE_TO_SLAVE ? "HINT_ROUTE_TO_SLAVE" \
: ((t) \
== HINT_ROUTE_TO_NAMED_SERVER ? \
"HINT_ROUTE_TO_NAMED_SERVER" \
: ((t) \
== \
HINT_ROUTE_TO_UPTODATE_SERVER \
? \
"HINT_ROUTE_TO_UPTODATE_SERVER" \
: (( \
t) \
== \
HINT_ROUTE_TO_ALL \
? \
"HINT_ROUTE_TO_ALL" \
: (( \
t) \
== \
HINT_ROUTE_TO_LAST_USED \
? \
"HINT_ROUTE_TO_LAST_USED" \
: (( \
t) \
== \
HINT_PARAMETER \
? \
"HINT_PARAMETER" \
: \
"UNKNOWN HINT TYPE")))))))
== HINT_ROUTE_TO_NAMED_SERVER \
? "HINT_ROUTE_TO_NAMED_SERVER" \
: ((t) \
== \
HINT_ROUTE_TO_UPTODATE_SERVER \
? \
"HINT_ROUTE_TO_UPTODATE_SERVER" \
: (( \
t) \
== \
HINT_ROUTE_TO_ALL \
? \
"HINT_ROUTE_TO_ALL" \
: (( \
t) \
== \
HINT_ROUTE_TO_LAST_USED \
? \
"HINT_ROUTE_TO_LAST_USED" \
: (( \
t) \
== \
HINT_PARAMETER \
? \
"HINT_PARAMETER" \
: \
"UNKNOWN HINT TYPE")))))))
/**
* A generic hint.

View File

@ -34,18 +34,18 @@ struct service;
*/
typedef struct servlistener
{
char* name; /**< Name of the listener */
char* protocol; /**< Protocol module to load */
unsigned short port; /**< Port to listen on */
char* address; /**< Address to listen with */
char* authenticator;/**< Name of authenticator */
char* auth_options; /**< Authenticator options */
void* auth_instance;/**< Authenticator instance created in MXS_AUTHENTICATOR::initialize()
* */
SSL_LISTENER* ssl; /**< Structure of SSL data or NULL */
struct dcb* listener; /**< The DCB for the listener */
struct users* users; /**< The user data for this listener */
struct service* service; /**< The service which used by this listener */
char* name; /**< Name of the listener */
char* protocol; /**< Protocol module to load */
unsigned short port; /**< Port to listen on */
char* address; /**< Address to listen with */
char* authenticator; /**< Name of authenticator */
char* auth_options; /**< Authenticator options */
void* auth_instance; /**< Authenticator instance created in MXS_AUTHENTICATOR::initialize()
* */
SSL_LISTENER* ssl; /**< Structure of SSL data or NULL */
struct dcb* listener; /**< The DCB for the listener */
struct users* users; /**< The user data for this listener */
struct service* service; /**< The service which used by this listener */
SPINLOCK lock;
int active; /**< True if the port has not been deleted */
struct servlistener* next; /**< Next service protocol */

View File

@ -128,8 +128,8 @@ typedef struct mxs_module_param
enum mxs_module_param_type type; /**< Type of the parameter */
const char* default_value; /**< Default value for the parameter, NULL for no default
* value */
uint64_t options; /**< Parameter options */
const MXS_ENUM_VALUE* accepted_values; /**< Only for enum values */
uint64_t options; /**< Parameter options */
const MXS_ENUM_VALUE* accepted_values; /**< Only for enum values */
} MXS_MODULE_PARAM;
/** Maximum number of parameters that modules can declare */

View File

@ -90,7 +90,7 @@ typedef struct mxs_monitor_api
*
* @param monitor The monitor object.
*/
void (* destroyInstance)(MXS_MONITOR_INSTANCE* monitor);
void (* destroyInstance)(MXS_MONITOR_INSTANCE * monitor);
/**
* @brief Start the monitor
@ -104,8 +104,8 @@ typedef struct mxs_monitor_api
*
* @return True, if the monitor could be started, false otherwise.
*/
bool (* startMonitor)(MXS_MONITOR_INSTANCE* monitor,
const MXS_CONFIG_PARAMETER* params);
bool (* startMonitor)(MXS_MONITOR_INSTANCE * monitor,
const MXS_CONFIG_PARAMETER * params);
/**
* @brief Stop the monitor
@ -115,7 +115,7 @@ typedef struct mxs_monitor_api
*
* @param monitor The monitor object
*/
void (* stopMonitor)(MXS_MONITOR_INSTANCE* monitor);
void (* stopMonitor)(MXS_MONITOR_INSTANCE * monitor);
/**
* @brief Write diagnostic information to a DCB.
@ -123,7 +123,7 @@ typedef struct mxs_monitor_api
* @param monitor The monitor object.
* @param dcb The dcb to write to.
*/
void (* diagnostics)(const MXS_MONITOR_INSTANCE* monitor, DCB* dcb);
void (* diagnostics)(const MXS_MONITOR_INSTANCE * monitor, DCB * dcb);
/**
* @brief Return diagnostic information about the monitor
@ -244,20 +244,20 @@ struct mxs_monitor
int connect_attempts; /**< How many times a connection is attempted */
int read_timeout; /**< Timeout in seconds to read from the server.
* There are retries and the total effective
*timeout
* timeout
* value is three times the option value.
*/
int write_timeout; /**< Timeout in seconds for each attempt to write
* to the server.
* There are retries and the total effective
*timeout value is
* timeout value is
* two times the option value.
*/
MXS_MONITOR_API* api; /**< The monitor api */
char* module_name; /**< Name of the monitor module */
MXS_MONITOR_INSTANCE* instance; /**< Instance returned from startMonitor */
size_t interval; /**< The monitor interval */
int check_maintenance_flag; /**< Set when admin requests a maintenance status
MXS_MONITOR_API* api; /**< The monitor api */
char* module_name; /**< Name of the monitor module */
MXS_MONITOR_INSTANCE* instance; /**< Instance returned from startMonitor */
size_t interval; /**< The monitor interval */
int check_maintenance_flag; /**< Set when admin requests a maintenance status
* change. */
bool active; /**< True if monitor is active */
time_t journal_max_age; /**< Maximum age of journal file */
@ -268,8 +268,8 @@ struct mxs_monitor
MxsDiskSpaceThreshold* disk_space_threshold; /**< Disk space thresholds */
int64_t disk_space_check_interval; /**< How often should a disk space check be made
* at most. */
uint64_t ticks; /**< Number of performed monitoring intervals */
struct mxs_monitor* next; /**< Next monitor in the linked list */
uint64_t ticks; /**< Number of performed monitoring intervals */
struct mxs_monitor* next; /**< Next monitor in the linked list */
};
/**

View File

@ -219,37 +219,37 @@ typedef enum
GW_MYSQL_CAPABILITIES_SSL_VERIFY_SERVER_CERT = (1 << 30),
GW_MYSQL_CAPABILITIES_REMEMBER_OPTIONS = (1 << 31),
GW_MYSQL_CAPABILITIES_CLIENT = (
GW_MYSQL_CAPABILITIES_CLIENT_MYSQL
| GW_MYSQL_CAPABILITIES_FOUND_ROWS
| GW_MYSQL_CAPABILITIES_LONG_FLAG
| GW_MYSQL_CAPABILITIES_CONNECT_WITH_DB
| GW_MYSQL_CAPABILITIES_LOCAL_FILES
| GW_MYSQL_CAPABILITIES_PLUGIN_AUTH
| GW_MYSQL_CAPABILITIES_TRANSACTIONS
| GW_MYSQL_CAPABILITIES_PROTOCOL_41
| GW_MYSQL_CAPABILITIES_MULTI_STATEMENTS
| GW_MYSQL_CAPABILITIES_MULTI_RESULTS
| GW_MYSQL_CAPABILITIES_PS_MULTI_RESULTS
| GW_MYSQL_CAPABILITIES_SECURE_CONNECTION),
GW_MYSQL_CAPABILITIES_CLIENT_MYSQL
| GW_MYSQL_CAPABILITIES_FOUND_ROWS
| GW_MYSQL_CAPABILITIES_LONG_FLAG
| GW_MYSQL_CAPABILITIES_CONNECT_WITH_DB
| GW_MYSQL_CAPABILITIES_LOCAL_FILES
| GW_MYSQL_CAPABILITIES_PLUGIN_AUTH
| GW_MYSQL_CAPABILITIES_TRANSACTIONS
| GW_MYSQL_CAPABILITIES_PROTOCOL_41
| GW_MYSQL_CAPABILITIES_MULTI_STATEMENTS
| GW_MYSQL_CAPABILITIES_MULTI_RESULTS
| GW_MYSQL_CAPABILITIES_PS_MULTI_RESULTS
| GW_MYSQL_CAPABILITIES_SECURE_CONNECTION),
GW_MYSQL_CAPABILITIES_SERVER = (
GW_MYSQL_CAPABILITIES_CLIENT_MYSQL
| GW_MYSQL_CAPABILITIES_FOUND_ROWS
| GW_MYSQL_CAPABILITIES_LONG_FLAG
| GW_MYSQL_CAPABILITIES_CONNECT_WITH_DB
| GW_MYSQL_CAPABILITIES_NO_SCHEMA
| GW_MYSQL_CAPABILITIES_ODBC
| GW_MYSQL_CAPABILITIES_LOCAL_FILES
| GW_MYSQL_CAPABILITIES_IGNORE_SPACE
| GW_MYSQL_CAPABILITIES_PROTOCOL_41
| GW_MYSQL_CAPABILITIES_INTERACTIVE
| GW_MYSQL_CAPABILITIES_IGNORE_SIGPIPE
| GW_MYSQL_CAPABILITIES_TRANSACTIONS
| GW_MYSQL_CAPABILITIES_RESERVED
| GW_MYSQL_CAPABILITIES_SECURE_CONNECTION
| GW_MYSQL_CAPABILITIES_MULTI_STATEMENTS
| GW_MYSQL_CAPABILITIES_MULTI_RESULTS
| GW_MYSQL_CAPABILITIES_PS_MULTI_RESULTS
| GW_MYSQL_CAPABILITIES_PLUGIN_AUTH),
GW_MYSQL_CAPABILITIES_CLIENT_MYSQL
| GW_MYSQL_CAPABILITIES_FOUND_ROWS
| GW_MYSQL_CAPABILITIES_LONG_FLAG
| GW_MYSQL_CAPABILITIES_CONNECT_WITH_DB
| GW_MYSQL_CAPABILITIES_NO_SCHEMA
| GW_MYSQL_CAPABILITIES_ODBC
| GW_MYSQL_CAPABILITIES_LOCAL_FILES
| GW_MYSQL_CAPABILITIES_IGNORE_SPACE
| GW_MYSQL_CAPABILITIES_PROTOCOL_41
| GW_MYSQL_CAPABILITIES_INTERACTIVE
| GW_MYSQL_CAPABILITIES_IGNORE_SIGPIPE
| GW_MYSQL_CAPABILITIES_TRANSACTIONS
| GW_MYSQL_CAPABILITIES_RESERVED
| GW_MYSQL_CAPABILITIES_SECURE_CONNECTION
| GW_MYSQL_CAPABILITIES_MULTI_STATEMENTS
| GW_MYSQL_CAPABILITIES_MULTI_RESULTS
| GW_MYSQL_CAPABILITIES_PS_MULTI_RESULTS
| GW_MYSQL_CAPABILITIES_PLUGIN_AUTH),
} gw_mysql_capabilities_t;
/**
@ -332,10 +332,10 @@ typedef struct
GWBUF* stored_query; /*< Temporarily stored queries */
bool collect_result; /*< Collect the next result set as one buffer */
bool changing_user;
uint32_t num_eof_packets; /*< Encountered eof packet number, used for check
* packet type */
bool large_query; /*< Whether to ignore the command byte of the next
* packet*/
uint32_t num_eof_packets; /*< Encountered eof packet number, used for check
* packet type */
bool large_query; /*< Whether to ignore the command byte of the next
* packet*/
} MySQLProtocol;
typedef struct

View File

@ -94,7 +94,7 @@ typedef struct mxs_router_object
*
* @return New router instance on NULL on error
*/
MXS_ROUTER*(*createInstance)(SERVICE * service, MXS_CONFIG_PARAMETER* params);
MXS_ROUTER*(*createInstance)(SERVICE * service, MXS_CONFIG_PARAMETER * params);
/**
* Called to create a new user session within the router
@ -109,7 +109,7 @@ typedef struct mxs_router_object
*
* @return New router session or NULL on error
*/
MXS_ROUTER_SESSION*(*newSession)(MXS_ROUTER * instance, MXS_SESSION* session);
MXS_ROUTER_SESSION*(*newSession)(MXS_ROUTER * instance, MXS_SESSION * session);
/**
* @brief Called when a session is closed
@ -119,7 +119,7 @@ typedef struct mxs_router_object
* @param instance Router instance
* @param router_session Router session
*/
void (* closeSession)(MXS_ROUTER* instance, MXS_ROUTER_SESSION* router_session);
void (* closeSession)(MXS_ROUTER * instance, MXS_ROUTER_SESSION * router_session);
/**
* @brief Called when a session is freed
@ -129,7 +129,7 @@ typedef struct mxs_router_object
* @param instance Router instance
* @param router_session Router session
*/
void (* freeSession)(MXS_ROUTER* instance, MXS_ROUTER_SESSION* router_session);
void (* freeSession)(MXS_ROUTER * instance, MXS_ROUTER_SESSION * router_session);
/**
* @brief Called on each query that requires routing
@ -152,7 +152,7 @@ typedef struct mxs_router_object
* @param instance Router instance
* @param dcb DCB where the diagnostic information should be written
*/
void (* diagnostics)(MXS_ROUTER* instance, DCB* dcb);
void (* diagnostics)(MXS_ROUTER * instance, DCB * dcb);
/**
* @brief Called for diagnostic output
@ -175,10 +175,10 @@ typedef struct mxs_router_object
* @param queue Response from the server
* @param backend_dcb The backend DCB which responded to the query
*/
void (* clientReply)(MXS_ROUTER* instance,
MXS_ROUTER_SESSION* router_session,
GWBUF* queue,
DCB* backend_dcb);
void (* clientReply)(MXS_ROUTER * instance,
MXS_ROUTER_SESSION * router_session,
GWBUF * queue,
DCB * backend_dcb);
/**
* @brief Called when a backend DCB has failed
@ -191,10 +191,10 @@ typedef struct mxs_router_object
*
* @param succp Pointer to a `bool` which should be set to true for success or false for error
*/
void (* handleError)(MXS_ROUTER* instance,
MXS_ROUTER_SESSION* router_session,
GWBUF* errmsgbuf,
DCB* backend_dcb,
void (* handleError)(MXS_ROUTER * instance,
MXS_ROUTER_SESSION * router_session,
GWBUF * errmsgbuf,
DCB * backend_dcb,
mxs_error_action_t action,
bool* succp);
@ -212,7 +212,7 @@ typedef struct mxs_router_object
*
* @param instance Router instance
*/
void (* destroyInstance)(MXS_ROUTER* instance);
void (* destroyInstance)(MXS_ROUTER * instance);
/**
* @brief Configure router instance at runtime
@ -233,7 +233,7 @@ typedef struct mxs_router_object
* failed. If reconfiguration failed, the state of the router
* instance should not be modified.
*/
bool (* configureInstance)(MXS_ROUTER* instance, MXS_CONFIG_PARAMETER* params);
bool (* configureInstance)(MXS_ROUTER * instance, MXS_CONFIG_PARAMETER * params);
} MXS_ROUTER_OBJECT;
/**

View File

@ -195,26 +195,21 @@ typedef struct server
: (server_is_ndb(s) \
? "RUNNING NDB" \
: (( \
server_is_running( \
s) \
server_is_running(s) \
&& \
server_is_in_maint( \
s)) \
server_is_in_maint(s)) \
? \
"RUNNING MAINTENANCE" \
: ( \
server_is_relay( \
s) \
server_is_relay(s) \
? \
"RUNNING RELAY" \
: ( \
server_is_usable( \
s) \
server_is_usable(s) \
? \
"RUNNING (only)" \
: ( \
server_is_down( \
s) \
server_is_down(s) \
? \
"DOWN" \
: \
@ -524,7 +519,7 @@ extern void dprintServer(DCB*, const SERVER*);
extern void dprintPersistentDCBs(DCB*, const SERVER*);
extern void dListServers(DCB*);
int server_response_time_num_samples(const SERVER* server);
int server_response_time_num_samples(const SERVER* server);
double server_response_time_average(const SERVER* server);
MXS_END_DECLS

View File

@ -32,7 +32,7 @@ bool server_clear_status(SERVER* server, int bit, std::string* errmsg_out = NULL
*/
inline bool almost_equal_server_scores(double lhs, double rhs)
{
constexpr double div = 100; // within 1% of each other.
constexpr double div = 100; // within 1% of each other.
return std::abs((long)(lhs - rhs)) < std::abs((long)std::max(lhs, rhs)) * (1 / div);
}
}

View File

@ -100,57 +100,57 @@ typedef struct server_ref_t
*/
typedef struct service
{
const char* name; /**< The service name */
int state; /**< The service state */
int client_count; /**< Number of connected clients */
int max_connections; /**< Maximum client connections */
SERV_LISTENER* ports; /**< Linked list of ports and
* protocols
* that this service will listen on */
const char* routerModule; /**< Name of router module to use */
struct mxs_router_object* router; /**< The router we are using */
struct mxs_router* router_instance; /**< The router instance for this
* service */
char version_string[MAX_SERVICE_VERSION_LEN]; /**< version string for this service
* listeners */
SERVER_REF* dbref; /**< server references */
int n_dbref; /**< Number of server references */
char user[MAX_SERVICE_USER_LEN]; /**< The user name to use to extract
* information */
char password[MAX_SERVICE_PASSWORD_LEN]; /**< The authentication data requied
* */
SERVICE_STATS stats; /**< The service statistics */
bool enable_root; /**< Allow root user access */
bool localhost_match_wildcard_host; /**< Match localhost against wildcard
* */
MXS_CONFIG_PARAMETER* svc_config_param; /**< list of config params and values
* */
int svc_config_version; /**< Version number of configuration
* */
bool svc_do_shutdown; /**< tells the service to exit loops
* etc. */
bool users_from_all; /**< Load users from one server or all
* of them */
bool strip_db_esc; /**< Remove the '\' characters from
* database names
* when querying them from the server.
*MySQL Workbench seems
* to escape at least the underscore
*character. */
int64_t conn_idle_timeout; /**< Session timeout in seconds */
char weightby[MAX_SERVICE_WEIGHTBY_LEN]; /**< Service weighting parameter name
* */
bool retry_start; /**< If starting of the service should
* be retried later */
bool log_auth_warnings; /**< Log authentication failures and
* warnings */
uint64_t capabilities; /**< The capabilities of the service,
* @see enum routing_capability */
int max_retry_interval; /**< Maximum retry interval */
bool session_track_trx_state; /**< Get transaction state via session
* track mechanism */
int active; /**< Whether the service is still
* active */
const char* name; /**< The service name */
int state; /**< The service state */
int client_count; /**< Number of connected clients */
int max_connections; /**< Maximum client connections */
SERV_LISTENER* ports; /**< Linked list of ports and
* protocols
* that this service will listen on */
const char* routerModule; /**< Name of router module to use */
struct mxs_router_object* router; /**< The router we are using */
struct mxs_router* router_instance; /**< The router instance for this
* service */
char version_string[MAX_SERVICE_VERSION_LEN]; /**< version string for this service
* listeners */
SERVER_REF* dbref; /**< server references */
int n_dbref; /**< Number of server references */
char user[MAX_SERVICE_USER_LEN]; /**< The user name to use to extract
* information */
char password[MAX_SERVICE_PASSWORD_LEN]; /**< The authentication data requied
* */
SERVICE_STATS stats; /**< The service statistics */
bool enable_root; /**< Allow root user access */
bool localhost_match_wildcard_host; /**< Match localhost against wildcard
* */
MXS_CONFIG_PARAMETER* svc_config_param; /**< list of config params and values
* */
int svc_config_version; /**< Version number of configuration
* */
bool svc_do_shutdown; /**< tells the service to exit loops
* etc. */
bool users_from_all; /**< Load users from one server or all
* of them */
bool strip_db_esc; /**< Remove the '\' characters from
* database names
* when querying them from the server.
* MySQL Workbench seems
* to escape at least the underscore
* character. */
int64_t conn_idle_timeout; /**< Session timeout in seconds */
char weightby[MAX_SERVICE_WEIGHTBY_LEN]; /**< Service weighting parameter name
* */
bool retry_start; /**< If starting of the service should
* be retried later */
bool log_auth_warnings; /**< Log authentication failures and
* warnings */
uint64_t capabilities; /**< The capabilities of the service,
* @see enum routing_capability */
int max_retry_interval; /**< Maximum retry interval */
bool session_track_trx_state; /**< Get transaction state via session
* track mechanism */
int active; /**< Whether the service is still
* active */
} SERVICE;
typedef enum count_spec_t

View File

@ -54,45 +54,45 @@ typedef enum
((s) == SESSION_STATE_ALLOC ? "SESSION_STATE_ALLOC" \
: ((s) == SESSION_STATE_READY ? "SESSION_STATE_READY" \
: ((s) \
== SESSION_STATE_ROUTER_READY ? \
"SESSION_STATE_ROUTER_READY" \
: ((s) \
== \
SESSION_STATE_STOPPING \
? \
"SESSION_STATE_STOPPING" \
: (( \
s) \
== \
SESSION_STATE_LISTENER \
? \
"SESSION_STATE_LISTENER" \
: (( \
s) \
== \
SESSION_STATE_LISTENER_STOPPED \
? \
"SESSION_STATE_LISTENER_STOPPED" \
: (( \
s) \
== \
SESSION_STATE_TO_BE_FREED \
? \
"SESSION_STATE_TO_BE_FREED" \
: (( \
s) \
== \
SESSION_STATE_FREE \
? \
"SESSION_STATE_TO_BE_FREE" \
: (( \
s) \
== \
SESSION_STATE_DUMMY \
? \
"SESSION_STATE_DUMMY" \
: \
"SESSION_STATE_UNKNOWN")))))))))
== SESSION_STATE_ROUTER_READY \
? "SESSION_STATE_ROUTER_READY" \
: ((s) \
== \
SESSION_STATE_STOPPING \
? \
"SESSION_STATE_STOPPING" \
: (( \
s) \
== \
SESSION_STATE_LISTENER \
? \
"SESSION_STATE_LISTENER" \
: (( \
s) \
== \
SESSION_STATE_LISTENER_STOPPED \
? \
"SESSION_STATE_LISTENER_STOPPED" \
: (( \
s) \
== \
SESSION_STATE_TO_BE_FREED \
? \
"SESSION_STATE_TO_BE_FREED" \
: (( \
s) \
== \
SESSION_STATE_FREE \
? \
"SESSION_STATE_TO_BE_FREE" \
: (( \
s) \
== \
SESSION_STATE_DUMMY \
? \
"SESSION_STATE_DUMMY" \
: \
"SESSION_STATE_UNKNOWN")))))))))
typedef enum
{

View File

@ -58,17 +58,17 @@ typedef enum ssl_method_type
typedef struct ssl_listener
{
SSL_CTX* ctx;
SSL_METHOD* method; /*< SSLv3 or TLS1.0/1.1/1.2 methods
* see: https://www.openssl.org/docs/ssl/SSL_CTX_new.html
**/
int ssl_cert_verify_depth; /*< SSL certificate verification depth */
ssl_method_type_t ssl_method_type; /*< Which of the SSLv3 or TLS1.0/1.1/1.2 methods to use */
char* ssl_cert; /*< SSL certificate */
char* ssl_key; /*< SSL private key */
char* ssl_ca_cert; /*< SSL CA certificate */
bool ssl_init_done; /*< If SSL has already been initialized for this service
* */
bool ssl_verify_peer_certificate; /*< Enable peer certificate verification */
SSL_METHOD* method; /*< SSLv3 or TLS1.0/1.1/1.2 methods
* see: https://www.openssl.org/docs/ssl/SSL_CTX_new.html
**/
int ssl_cert_verify_depth;/*< SSL certificate verification depth */
ssl_method_type_t ssl_method_type; /*< Which of the SSLv3 or TLS1.0/1.1/1.2 methods to use */
char* ssl_cert; /*< SSL certificate */
char* ssl_key; /*< SSL private key */
char* ssl_ca_cert; /*< SSL CA certificate */
bool ssl_init_done; /*< If SSL has already been initialized for this service
* */
bool ssl_verify_peer_certificate; /*< Enable peer certificate verification */
struct ssl_listener
* next; /*< Next SSL configuration, currently used to store obsolete configurations */
} SSL_LISTENER;

View File

@ -45,4 +45,4 @@ void load(long* new_inserts,
bool galera,
bool report_errors);
#endif // BIG_LOAD_H
#endif // BIG_LOAD_H

View File

@ -14,4 +14,4 @@
*/
int big_transaction(MYSQL* conn, int N);
#endif // BIG_TRANSACTION_H
#endif // BIG_TRANSACTION_H

View File

@ -1,6 +1,6 @@
/**
* @file binlog_big_transaction.cpp test of simple binlog router setup and execute a number of big
*transactions
* transactions
*/

View File

@ -1,6 +1,6 @@
/**
* @file binlog_change_master.cpp In the binlog router setup stop Master and promote one of the Slaves to be
*new Master
* new Master
* - setup binlog
* - start thread wich executes transactions
* - block master

View File

@ -10,7 +10,7 @@
* - stop all Maxscale machines with STOP SLAVE command
* - check which Maxscale machine contains most recent data (let's call this machine 'most_recent_maxscale')
* - use CHANGE MASETER on the second Maxscale machine to point it to the Maxscale machine from the previous
*step ('most_recent_maxscale')
* step ('most_recent_maxscale')
* - wait until second Maxscale is in sync with 'most_recent_maxscale' (use SHOW MASTER STATUS)
* - select new master (HOW??)
* - set all Maxscale machines to be a slaves of new master

View File

@ -23,7 +23,7 @@ int test_longblob(TestConnections* Test,
/**
* @brief check_longblob_data Does SELECT against table created by test_longblob() and cheks that data are
*correct
* correct
* @param Test TestConnection object
* @param conn MYSQL connection handler
* @param chunk_size size of one data chunk (in sizeof(long usingned))
@ -37,4 +37,4 @@ int check_longblob_data(TestConnections* Test,
int chunks,
int rows);
#endif // BLOB_TEST_H
#endif // BLOB_TEST_H

View File

@ -1,11 +1,11 @@
/**
* @file bug469 bug469 regression test case ("rwsplit counts every connection twice in master - counnection
*counts leak")
* counts leak")
* - use maxadmin command "show server server1" and check "Current no. of conns" and "Number of connections" -
*both should be 0
* both should be 0
* - execute simple query against RWSplit
* - use maxadmin command "show server server1" and check "Current no. of conns" (should be 0) and "Number of
*connections" (should be 1)
* connections" (should be 1)
*/

View File

@ -2,7 +2,7 @@
* @file bug471.cpp bug471 regression case ( Routing Hints route to server sometimes doesn't work )
*
* - try "select @@server_id; -- maxscale route to server server%d" (where %d - server number) and compares
*result
* result
* with "select @@server_id;" sent directly to backend node.
* - do it 25 times.
*/

View File

@ -2,7 +2,7 @@
* @file bug479.cpp regression case for bug 479 ( Undefined filter reference in MaxScale.cnf causes a crash)
*
* - Maxscale.cnf with "filters=non existing filter | не существуюший фильтер", cheks error log for warnings
*and
* and
* - check if Maxscale is alive
*/

View File

@ -1,6 +1,6 @@
/**
* @file bug488.cpp regression case for bug 488 ("SHOW VARIABLES randomly failing with "Lost connection to
*MySQL server")
* MySQL server")
*
* - try "SHOW VARIABLES;" 100 times against all Maxscale services
* First round: 100 iterations for RWSplit, then ReadConn Master, then ReadConn Slave

View File

@ -1,6 +1,6 @@
/**
* @file bug495.cpp regression case for bug 495 ( Referring to a nonexisting server in servers=... doesn't
*even raise a warning )
* even raise a warning )
*
* - Maxscale.cnf with "servers= server1, server2,server3 ,server4,server5"
* but 'server5' is not defined. Test checks error log for proper error message.

View File

@ -98,17 +98,15 @@ int main(int argc, char* argv[])
char last_insert_id1[1024];
char last_insert_id2[1024];
if ((
find_field(
Test->maxscales->conn_rwsplit[0],
sel1,
"@@server_id",
&last_insert_id1[0])
find_field(Test->maxscales->conn_rwsplit[0],
sel1,
"@@server_id",
&last_insert_id1[0])
!= 0 ) || (
find_field(
Test->repl->nodes[0],
sel1,
"@@server_id",
&last_insert_id2[0])
find_field(Test->repl->nodes[0],
sel1,
"@@server_id",
&last_insert_id2[0])
!= 0 ))
{
Test->tprintf("@@server_id fied not found!!\n");

View File

@ -1,12 +1,12 @@
/**
* @file bug509.cpp regression case for bug 509 and 507 ( "Referring to a nonexisting server in servers=...
*doesn't even raise a warning"
* doesn't even raise a warning"
* and "rw-split router does not send last_insert_id() to master" )
*
* - "CREATE TABLE t2 (id INT(10) NOT NULL AUTO_INCREMENT, x int, PRIMARY KEY (id));",
* - do a number of INSERTs first using RWsplit, then directly Galera nodes.
* - do "select @@wsrep_node_address, last_insert_id();" and "select last_insert_id(), @@wsrep_node_address;"
*and compares results.
* and compares results.
* - do "insert into t2 (x) values (i);" 1000 times and compares results of
* "select @@wsrep_node_address, last_insert_id();" and "select last_insert_id(), @@wsrep_node_address;"
*
@ -86,17 +86,15 @@ int main(int argc, char* argv[])
char last_insert_id1[1024];
char last_insert_id2[1024];
if ((
find_field(
Test->maxscales->conn_rwsplit[0],
sel1,
"last_insert_id()",
&last_insert_id1[0])
find_field(Test->maxscales->conn_rwsplit[0],
sel1,
"last_insert_id()",
&last_insert_id1[0])
!= 0 ) || (
find_field(
Test->maxscales->conn_rwsplit[0],
sel2,
"last_insert_id()",
&last_insert_id2[0])
find_field(Test->maxscales->conn_rwsplit[0],
sel2,
"last_insert_id()",
&last_insert_id2[0])
!= 0 ))
{
Test->tprintf("last_insert_id() fied not found!!\n");

View File

@ -5,11 +5,11 @@
* - check number of connections to Master - failure if there are more then 100 connections to master.
* - close RWSptit and ReadConn master connections and check connections to master again.
* - create 50 ReadConn slave connection in parallel threads, execute "SELECT * FROM t1" ones for every
*connections, then
* connections, then
* start using one of connections to create "SELECT" load.
* - check number of connections to Master again, wait 5 seconds and check number of connections to
* master ones more time: now expecting 0 connections to master (fail if there is a least one connection to
*master).
* master).
* - close and reopens all ReadConn slave connections in the main thread and check connections to master again
* - close all connection in all threads, close parallel thread
* - do final 'connections to master' check

View File

@ -1,6 +1,6 @@
/**
* @file bug587.cpp regression case for the bug 587 ( "Hint filter don't work if listed before regex filter
*in configuration file" )
* in configuration file" )
*
* - Maxscale.cnf
* @verbatim

View File

@ -2,7 +2,7 @@
* @file bug592.cpp regression case for bug 592 ( "slave in "Running" state breaks authorization" ) MXS-326
*
* - stop all slaves: "stop slave;" directly to every node (now they are in "Running" state, not in "Russning,
*Slave")
* Slave")
* - via RWSplit "CREATE USER 'test_user'@'%' IDENTIFIED BY 'pass'"
* - try to connect using 'test_user' (expecting success)
* - start all slaves: "start slave;" directly to every node

View File

@ -1,6 +1,6 @@
/**
* @file bug601.cpp regression case for bug 601 ("COM_CHANGE_USER fails with correct user/pwd if executed
*during authentication")
* during authentication")
* - configure Maxscale.cnf to use only one thread
* - in 100 parallel threads start to open/close session
* - do change_user 2000 times

View File

@ -1,6 +1,6 @@
/**
* @file bug643.cpp regression case for bugs 643 ("Hints, RWSplit: MaxScale goes into infinite loop and
*crashes") and bug645
* crashes") and bug645
* - setup RWSplit in the following way for bug643
* @verbatim
* [RW Split Router]

View File

@ -1,6 +1,6 @@
/**
* @file bug643.cpp regression case for bugs 643 ("Hints, RWSplit: MaxScale goes into infinite loop and
*crashes") and bug645
* crashes") and bug645
* - setup RWSplit in the following way for bug643
* @verbatim
* [hints]

View File

@ -1,6 +1,6 @@
/**
* @file bug650.cpp regression case for bug 650 ("Hints, RWSplit: MaxScale goes into infinite loop and
*crashes") and bug645
* crashes") and bug645
* - try simple query using all services
* - check for errors in the log
*/

View File

@ -1,10 +1,10 @@
/**
* @file bug653.cpp regression case for bug 653 ("Memory corruption when users with long hostnames that can
*no the resolved are loaded into MaxScale")
* no the resolved are loaded into MaxScale")
*
* - CREATE USER
*'user_with_very_long_hostname'@'very_long_hostname_that_can_not_be_resolved_and_it_probably_caused_crash.com.net.org'
*IDENTIFIED BY 'old';
* IDENTIFIED BY 'old';
* - try to connect using user 'user_with_very_long_hostname'
* - DROP USER
*'user_with_very_long_hostname'@'very_long_hostname_that_can_not_be_resolved_and_it_probably_caused_crash.com.net.org'

View File

@ -1,6 +1,6 @@
/**
* @file bug654.cpp regression case for bug654 abd 698 ("maxadm: show dbusers <two-part service name without
*quotation> causes SEGFAULT", "Using invalid parameter in many maxadmin commands causes MaxScale to fail")
* quotation> causes SEGFAULT", "Using invalid parameter in many maxadmin commands causes MaxScale to fail")
*
* - execute maxadmin command show dbusers RW Split Router and show dbusers "RW Split Router"
* . execute different maxadmin commands with wrong parameters

View File

@ -1,6 +1,6 @@
/**
* @file bug656.cpp Checks Maxscale behaviour in case if Master node is blocked - NOT NEEDED BECAUSE IT IS
*ALREADY CHECKED BY OTHER TESTS!!!!
* ALREADY CHECKED BY OTHER TESTS!!!!
*
* - ConnecT to RWSplit
* - block Mariadb server on Master node by Firewall

View File

@ -1,7 +1,7 @@
/**
* @file bug662.cpp regression case for bug 662 ("MaxScale hangs in startup if backend server is not
*responsive"), covers also bug680 ("RWSplit can't load DB user if backend is not available at MaxScale
*start")
* responsive"), covers also bug680 ("RWSplit can't load DB user if backend is not available at MaxScale
* start")
*
* - Block all Mariadb servers
* - Restart MaxScale

View File

@ -41,4 +41,4 @@ const char* bug670_sql
delete from mysql.t1 where id = 7; \
select 1 as \"endof cycle\" from dual;\n";
#endif // BUG670_SQL_H
#endif // BUG670_SQL_H

View File

@ -1,6 +1,6 @@
/**
* @file bug673.cpp regression case for bug673 ("MaxScale crashes if "Users table data" is empty and "show
*dbusers" is executed in maxadmin")
* dbusers" is executed in maxadmin")
*
* - Configure wrong IP for all backends
* - Execute maxadmin command show dbusers "RW Split Router"

View File

@ -1,6 +1,6 @@
/**
* @file bug681.cpp - regression test for bug681 ("crash if max_slave_connections=10% and 4 or less backends
*are configured")
* are configured")
*
* - Configure RWSplit with max_slave_connections=10%
* - check ReadConn master and ReadConn slave are alive and RWSplit is not started

View File

@ -1,6 +1,6 @@
/**
* @file bug694.cpp - regression test for bug694 ("RWSplit: SELECT @a:=@a+1 as a, test.b FROM test breaks
*client session")
* client session")
*
* - set use_sql_variables_in=all in MaxScale.cnf
* - connect to readwritesplit router and execute:

View File

@ -1,6 +1,6 @@
/**
* @file bug699.cpp regression case for bug 699 ( "rw-split sensitive to order of terms in field list of
*SELECT (round 2)" )
* SELECT (round 2)" )
*
* - compare @@hostname from "select @@wsrep_node_name, @@hostname" and "select @@hostname,
*@@wsrep_node_name"
@ -223,17 +223,15 @@ int main(int argc, char* argv[])
char serverid2[1024];
if ((
find_field(
Test->maxscales->conn_rwsplit[0],
sel3,
"@@server_id",
&serverid1[0])
find_field(Test->maxscales->conn_rwsplit[0],
sel3,
"@@server_id",
&serverid1[0])
!= 0 ) || (
find_field(
Test->maxscales->conn_rwsplit[0],
sel4,
"@@server_id",
&serverid2[0])
find_field(Test->maxscales->conn_rwsplit[0],
sel4,
"@@server_id",
&serverid2[0])
!= 0 ))
{
Test->add_result(1, "@@server_id field not found!!\n");
@ -249,17 +247,15 @@ int main(int argc, char* argv[])
}
if ((
find_field(
Test->maxscales->conn_rwsplit[0],
sel1,
"@@hostname",
&serverid1[0])
find_field(Test->maxscales->conn_rwsplit[0],
sel1,
"@@hostname",
&serverid1[0])
!= 0 ) || (
find_field(
Test->maxscales->conn_rwsplit[0],
sel2,
"@@hostname",
&serverid2[0])
find_field(Test->maxscales->conn_rwsplit[0],
sel2,
"@@hostname",
&serverid2[0])
!= 0 ))
{
Test->add_result(1, "@@hostname field not found!!\n");

View File

@ -1,6 +1,6 @@
/**
* @file bug705.cpp regression case for bug 705 ("Authentication fails when the user connects to a database
*when the SQL mode includes ANSI_QUOTES")
* when the SQL mode includes ANSI_QUOTES")
*
* - use only one backend
* - derectly to backend SET GLOBAL sql_mode="ANSI"
@ -117,11 +117,11 @@
|
| mysql root@centos-7-minimal:[Mon Jan 26 14:27:33 2015][(none)]> SET SESSION sql_mode = "POSTGRESQL";
|select @@sql_mode;
|
|
|
|
|
|
|
|
|
|
| Query
|OK, 0 rows affected (0.00 sec)
|
@ -197,7 +197,8 @@
|via mysql client
| Comment 5 ivan.stoykov@skysql.com 2015-01-26 16:37:32 UTC
| There is at least one case that after setting the sql_mode to string :
| "REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|
|"REAL_AS_FLOAT,PIPES_AS_CONCAT,ANSI_QUOTES,IGNORE_SPACE,ONLY_FULL_GROUP_BY,ANSI,STRICT_TRANS_TABLES,STRICT_ALL_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,TRADITIONAL,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION"
|at 10.0.15-MariaDB-wsrep-log , using maxscale in this way returned an error.
|
| $ mysql --host max-scale-host --user=test --password=xxx --port 4449 mysqlslap

View File

@ -1,6 +1,6 @@
/**
* @file bug711.cpp bug711 regression case (Some MySQL Workbench Management actions hang with R/W split
*router)
* router)
* - configure rwsplit with use_sql_variables_in=all
* - try SHOW GLOBAL STATUS with all maxscales->routers[0]
* - check if Maxscale is still alive

View File

@ -1,6 +1,6 @@
/**
* @file bug730.cpp regression case for bug 730 ("Regex filter and shorter than original replacement queries
*MaxScale")
* MaxScale")
*
* - setup regex filter, add it to all maxscales->routers[0]
* @verbatim

View File

@ -123,9 +123,9 @@ int bind_by_row(MYSQL* mysql)
struct st_data data[] =
{
{0, STMT_INDICATOR_NULL, "Monty", STMT_INDICATOR_NTS, "Widenius", STMT_INDICATOR_NTS },
{0, STMT_INDICATOR_NULL, "David", STMT_INDICATOR_NTS, "Axmark", STMT_INDICATOR_NTS },
{0, STMT_INDICATOR_NULL, "default", STMT_INDICATOR_DEFAULT, "N.N.", STMT_INDICATOR_NTS },
{0, STMT_INDICATOR_NULL, "Monty", STMT_INDICATOR_NTS, "Widenius", STMT_INDICATOR_NTS},
{0, STMT_INDICATOR_NULL, "David", STMT_INDICATOR_NTS, "Axmark", STMT_INDICATOR_NTS},
{0, STMT_INDICATOR_NULL, "default", STMT_INDICATOR_DEFAULT, "N.N.", STMT_INDICATOR_NTS},
};
unsigned int array_size = 3;

View File

@ -1,6 +1,6 @@
/**
* @file change_master_during_seesion.cpp Tries to reconfigure replication setup to use another node as a
*Master
* Master
* - connect to RWSplit
* - reconfugure backend
* - checks that after time > monitor_interval everything is ok

View File

@ -2,13 +2,13 @@
* @file change_user.cpp mysql_change_user test
*
* - using RWSplit and user 'skysql': GRANT SELECT ON test.* TO user@'%' identified by 'pass2'; FLUSH
*PRIVILEGES;
* PRIVILEGES;
* - create a new connection to RSplit as 'user'
* - try INSERT expecting 'access denied'
* - call mysql_change_user() to change user to 'skysql'
* - try INSERT again expecting success
* - try to execute mysql_change_user() to switch to user 'user' but use rong password (expecting access
*denied)
* denied)
* - try INSERT again expecting success (user should not be changed)
*/

View File

@ -2,7 +2,7 @@
* @file connection_limit.cpp connection_limit check if max_connections parameter works
*
* - Maxscale.cnf contains max_connections=10 for RWSplit, max_connections=20 for ReadConn master and
*max_connections=25 for ReadConn slave
* max_connections=25 for ReadConn slave
* - create max num of connections and check tha N+1 connection fails
*/

View File

@ -22,7 +22,7 @@ MYSQL* connect_to_serv(TestConnections* Test, bool binlog);
/**
* @brief set_max_packet Executes 'cmd' on Master of RWSplit ('cmd' should be 'set global
*max_paxket_size=...')
* max_paxket_size=...')
* @param Test TestConnections object
* @param binlog if true - connects to Master, otherwise - to RWSplit router
* @param cmd command to execute
@ -36,4 +36,4 @@ void set_max_packet(TestConnections* Test, bool binlog, char* cmd);
*/
void different_packet_size(TestConnections* Test, bool binlog);
#endif // DIFFERENT_SIZE_H
#endif // DIFFERENT_SIZE_H

View File

@ -14,4 +14,4 @@ using namespace std;
*/
int execute_cmd(char* cmd, char** res);
#endif // EXECUTE_CMD_H
#endif // EXECUTE_CMD_H

View File

@ -7,7 +7,7 @@
* - unblock backend nodes
* - wait for monitor
* - check that we are still using the last node to which we failed over to and that the old nodes are in
*maintenance mode
* maintenance mode
*/

View File

@ -11,4 +11,4 @@
*/
void copy_rules(TestConnections* Test, const char* rules_name, const char* rules_dir);
#endif // FW_COPY_RULES_H
#endif // FW_COPY_RULES_H

View File

@ -1,16 +1,16 @@
/**
* @file fwf - Firewall filter test (also regression test for MXS-683 "qc_mysqlembedded reports as-name
*instead of original-name")
* instead of original-name")
* - setup Firewall filter to use rules from rule file fw/ruleXX, where XX - number of sub-test
* - execute queries for fw/passXX file, expect OK
* - execute queries from fw/denyXX, expect Access Denied error (mysql_error 1141)
* - repeat for all XX
* - setup Firewall filter to block queries next 2 minutes using 'at_time' statement (see template
*fw/rules_at_time)
* fw/rules_at_time)
* - start sending queries, expect Access Denied now and OK after two mintes
* - setup Firewall filter to limit a number of queries during certain time
* - start sending queries as fast as possible, expect OK for N first quries and Access Denied for next
*queries
* queries
* - wait, start sending queries again, but only one query per second, expect OK
* - try to load rules with syntax error, expect failure for all sessions and queries
*/

View File

@ -5,11 +5,11 @@
* - execute queries from fw/denyXX, expect Access Denied error (mysql_error 1141)
* - repeat for all XX
* - setup Firewall filter to block queries next 2 minutes using 'at_time' statement (see template
*fw/rules_at_time)
* fw/rules_at_time)
* - start sending queries, expect Access Denied now and OK after two mintes
* - setup Firewall filter to limit a number of queries during certain time
* - start sending queries as fast as possible, expect OK for N first quries and Access Denied for next
*queries
* queries
* - wait, start sending queries again, but only one query per second, expect OK
* - try to load rules with syntax error, expect failure for all sessions and queries
*/

View File

@ -30,4 +30,4 @@ int print_delta(long int* new_selects,
int nodes_num);
#endif // GET_COM_SELECT_INSERT_H
#endif // GET_COM_SELECT_INSERT_H

View File

@ -10,4 +10,4 @@
*/
int get_my_ip(char* remote_ip, char* my_ip);
#endif // GET_MY_IP_H
#endif // GET_MY_IP_H

View File

@ -9,4 +9,4 @@ char virtual_ip[16];
char* print_version_string(TestConnections* Test);
void configure_keepalived(TestConnections* Test, char* keepalived_file);
#endif // KEEPALIVED_FUNC_H
#endif // KEEPALIVED_FUNC_H

View File

@ -157,23 +157,20 @@ int main(int argc, char* argv[])
Test->repl->close_connections();
Test->tprintf("Trying use usr1 to execute query: RW Split\n");
Test->add_result(
Test->repl->ssh_node(1,
"echo select User,Host from mysql.user | mysql -uusr1 -h maxscale.maxscale.test -P 4006",
false),
"Error executing query against RW Split\n");
Test->add_result(Test->repl->ssh_node(1,
"echo select User,Host from mysql.user | mysql -uusr1 -h maxscale.maxscale.test -P 4006",
false),
"Error executing query against RW Split\n");
Test->tprintf("Trying use usr1 to execute query: Read Connection Master\n");
Test->add_result(
Test->repl->ssh_node(1,
"echo select User,Host from mysql.user | mysql -uusr1 -h maxscale.maxscale.test -P 4008",
false),
"Error executing query against Read Connection Master\n");
Test->add_result(Test->repl->ssh_node(1,
"echo select User,Host from mysql.user | mysql -uusr1 -h maxscale.maxscale.test -P 4008",
false),
"Error executing query against Read Connection Master\n");
Test->tprintf("Trying use usr1 to execute query: Read Connection Slave\n");
Test->add_result(
Test->repl->ssh_node(1,
"echo select User,Host from mysql.user | mysql -uusr1 -h maxscale.maxscale.test -P 4009",
false),
"Error executing query against Read Connection Slave\n");
Test->add_result(Test->repl->ssh_node(1,
"echo select User,Host from mysql.user | mysql -uusr1 -h maxscale.maxscale.test -P 4009",
false),
"Error executing query against Read Connection Slave\n");
for (int i = 0; i < Test->repl->N; i++)
{

View File

@ -5,12 +5,12 @@
*'persistpoolmax=10' for all servers)
*
* - start two groups of threads: each group consists of 25 threads, each thread creates connections to
*RWSplit,
* RWSplit,
* threads from first group try to execute as many SELECTs as possible, from second group - one query per
*second
* second
* - after 100 seconds all threads are stopped
* - check number of connections to every slave: test PASSED if COM_SELECT difference between slaves is not
*greater then 3 times and no
* greater then 3 times and no
* more then 10% of quesries went to Master
*/

View File

@ -5,12 +5,12 @@
*'persistpoolmax=1' and 'persistpoolmax=10' for all servers)
*
* - start two groups of threads: each group consists of 25 threads, each thread creates connections to
*RWSplit,
* RWSplit,
* threads from first group try to execute as many SELECTs as possible, from second group - one query per
*second
* second
* - after 100 seconds all threads are stopped
* - check number of connections to every slave: test PASSED if COM_SELECT difference between slaves is not
*greater then 3 times and no
* greater then 3 times and no
* more then 10% of quesries went to Master
*/

View File

@ -134,7 +134,7 @@ static MYSQL* open_conn_no_db(int port,
/**
* @brief Executes SQL query. Function also executes mysql_store_result() and mysql_free_result() to clean up
*returns
* returns
* @param conn MYSQL connection
* @param format SQL string with printf style formatting
* @param ... Parameters for @c format
@ -144,7 +144,7 @@ int execute_query(MYSQL* conn, const char* format, ...) mxb_attribute((format(pr
/**
* @brief execute_query_from_file Read a line from a file, trim leading and trailing whitespace and execute
*it.
* it.
* @param conn MYSQL handler
* @param file file handler
* @return 0 in case of success
@ -153,7 +153,7 @@ int execute_query_from_file(MYSQL* conn, FILE* file);
/**
* @brief Executes SQL query. Function also executes mysql_store_result() and mysql_free_result() to clean up
*returns
* returns
* @param conn MYSQL connection struct
* @param sql SQL string
* @return 0 in case of success
@ -344,4 +344,4 @@ private:
MYSQL* m_conn = nullptr;
};
#endif // MARIADB_FUNC_H
#endif // MARIADB_FUNC_H

View File

@ -228,12 +228,11 @@ int Mariadb_nodes::find_master()
int master_node = 255;
while ((found == 0) && (i < N))
{
if (find_field(
nodes[i],
(char*) "show slave status;",
(char*) "Master_Host",
&str[0]
) == 0)
if (find_field(nodes[i],
(char*) "show slave status;",
(char*) "Master_Host",
&str[0]
) == 0)
{
found = 1;
strcpy(master_IP, str);

View File

@ -344,7 +344,7 @@ public:
/**
* @brief disable_ssl Modifies my.cnf in order to get rid of ssl, redefine access user to allow
*connections without ssl
* connections without ssl
* @return 0 if success
*/
int disable_ssl();
@ -485,4 +485,4 @@ public:
// }
};
#endif // MARIADB_NODES_H
#endif // MARIADB_NODES_H

View File

@ -66,7 +66,7 @@ int sendCommand(int so, char* cmd, char* buf);
/**
* @brief Send a comamnd using the MaxScaled protocol, search for certain numeric parameter in MaxScaled
*output.
* output.
*
* Input terminates with a lien containing just the text OK
*
@ -108,4 +108,4 @@ int execute_maxadmin_command_tcp(char* hostname, char* user, char* password, cha
*/
int execute_maxadmin_command_print_pcp(char* hostname, char* user, char* password, char* cmd);
#endif // MAXADMIN_OPERATIONS_H
#endif // MAXADMIN_OPERATIONS_H

View File

@ -22,4 +22,4 @@ int setnonblocking(int sock);
int get_x_fl_from_json(char* line, long long int* x1, long long int* fl);
#endif // MAXINFO_FUNC_H
#endif // MAXINFO_FUNC_H

View File

@ -108,10 +108,10 @@ public:
/**
* @brief ConnectMaxscale Opens connections to RWSplit, ReadConn master and ReadConn slave Maxscale
*services
* services
* Opens connections to RWSplit, ReadConn master and ReadConn slave Maxscale services
* Connections stored in maxscales->conn_rwsplit[0], maxscales->conn_master[0] and
*maxscales->conn_slave[0] MYSQL structs
* maxscales->conn_slave[0] MYSQL structs
* @return 0 in case of success
*/
int connect_maxscale(int m = 0);
@ -132,21 +132,21 @@ public:
/**
* @brief ConnectRWSplit Opens connections to RWSplit and store MYSQL struct in
*maxscales->conn_rwsplit[0]
* maxscales->conn_rwsplit[0]
* @return 0 in case of success
*/
int connect_rwsplit(int m = 0);
/**
* @brief ConnectReadMaster Opens connections to ReadConn master and store MYSQL struct in
*maxscales->conn_master[0]
* maxscales->conn_master[0]
* @return 0 in case of success
*/
int connect_readconn_master(int m = 0);
/**
* @brief ConnectReadSlave Opens connections to ReadConn slave and store MYSQL struct in
*maxscales->conn_slave[0]
* maxscales->conn_slave[0]
* @return 0 in case of success
*/
int connect_readconn_slave(int m = 0);
@ -280,7 +280,7 @@ public:
/**
* @brief find_master_maxadmin Tries to find node with 'Master' status using Maxadmin connand 'show
*server'
* server'
* @param nodes Mariadb_nodes object
* @return node index if one master found, -1 if no master found or several masters found
*/
@ -309,4 +309,4 @@ public:
void wait_for_monitor(int intervals = 1, int m = 0);
};
#endif // MAXSCALES_H
#endif // MAXSCALES_H

View File

@ -1,6 +1,6 @@
/**
* @file mxs1045.cpp Regression case for the bug "Defunct processes after maxscale have executed script during
*failover"
* failover"
* - configure monitor:
* @verbatim
* script=/bin/sh -c "echo hello world!"

View File

@ -236,7 +236,7 @@ int compare_expected(TestConnections* Test, const char* sql, my_ulonglong exp_i,
/**
* @brief compare_stmt_expected Execute prepared statement and compare number of rows in every result set with
*expected values
* expected values
* This function uses mysql_stmt-* functions (COM_STMT_EXECUTE, COM_STMT_FETCH)
* @param Test TestConnections object
* @param stmt MYSQL_STMT prepared statement handler

View File

@ -8,7 +8,7 @@
* - check that all slave have the same data
* - 'maxbinlogcheck' against Maxscale binlog file
* - check 'maxbinlogcheck' output for lack of errors and presence of 'Decrypting binlog file with algorithm'
*message
* message
* - try remote access to Maxscale binlog with 'mysqlbinlog'
* - copy Maxscale binlogs to Master and check output of 'show binary logs' before and after copying
* (expect same file name and size, but different checksums)
@ -22,7 +22,7 @@
/**
* @brief get_first_binlog_file Get name, size and checksum of first binlog file from 'show binary logs'
*output list
* output list
* @param Test TestConnections object
* @param name string for file name
* @param size variable for file size

View File

@ -1,6 +1,6 @@
/**
* @file mxs118.cpp bug mxs118 regression case ("Two monitors loaded at the same time result into not working
*installation")
* installation")
*
* - Configure two monitors using same backend serves
* - try to connect to maxscale

View File

@ -1,6 +1,6 @@
/**
* @file mxs127.cpp - bug mxs-127 regression case ("disable_sescmd_history causes MaxScale to crash under
*load")
* load")
* - execute set @test=%d 10000 times against RWSplit, ReadConn Master and ReadConn Slave
*/

View File

@ -1,6 +1,6 @@
/**
* MXS-1476: priority value ignored when a Galera node rejoins with a lower wsrep_local_index than current
*master
* master
*
* https://jira.mariadb.org/browse/MXS-1476
*/

View File

@ -1,6 +1,6 @@
/**
* @file mxs244_prepared_stmt_loop.cpp mxs244_prepared_stmt_loop executed following statements in the loop
*against all maxscales->routers[0]:
* against all maxscales->routers[0]:
* @verbatim
* SET NAMES "UTF8";
* PREPARE s1 FROM 'SHOW GLOBAL STATUS WHERE variable_name = ?';

View File

@ -1,6 +1,6 @@
/**
* @file mxs280_select_outfile.cpp bug mxs280 regression case ("SELECT INTO OUTFILE query succeeds even if
*backed fails")
* backed fails")
*
* - Create /tmp/t1.csv on all backends
* - creat t1 table, put some data into it

View File

@ -51,8 +51,8 @@ int main(int argc, char** argv)
TestConnections test(argc, argv);
self = &test;
Queries rw_ok({{"INSERT INTO test.t1 VALUES (1)", true}, {"SELECT * FROM test.t1", true}});
Queries rw_err({{"INSERT INTO test.t1 VALUES (1)", false}, {"SELECT * FROM test.t1", true}});
Queries rw_ok({ {"INSERT INTO test.t1 VALUES (1)", true}, {"SELECT * FROM test.t1", true}});
Queries rw_err({ {"INSERT INTO test.t1 VALUES (1)", false}, {"SELECT * FROM test.t1", true}});
Func block_master = [&test]() {
test.repl->block_node(0);

View File

@ -4,7 +4,7 @@
* - create 'user' with password 'pass2'
* - create load on Master (3 threads are inserting data into 't1' in the loop)
* - in 40 parallel threads open connection, execute change_user to 'user', execute change_user to default
*user, close connection
* user, close connection
* - repeat test first only for RWSplit and second for all maxscales->routers[0]
* - check logs for lack of "Unable to write to backend 'server2' due to authentication failure" errors
* - check for lack of crashes in the log

View File

@ -2,7 +2,7 @@
* @file mxs564_big_dump.cpp MXS-564 regression case ("Loading database dump through readwritesplit fails")
* - configure Maxscale to use Galera cluster
* - start several threads which are executing session command and then sending INSERT queries agaist RWSplit
*router
* router
* - after a while block first slave
* - after a while block second slave
* - check that all INSERTs are ok

View File

@ -1,6 +1,6 @@
/**
* @file max621_unreadable_cnf.cpp mxs621 regression case ("MaxScale fails to start silently if config file is
*not readable")
* not readable")
*
* - make maxscale.cnf unreadable
* - try to restart Maxscale

View File

@ -1,6 +1,6 @@
/**
* @file mxs652_bad_ssl.cpp mxs652 regression case ("ssl is configured in a wrong way, but Maxscale can be
*started and works")
* started and works")
*
* - Maxscale.cnf contains ssl configuration for all services in 'router' section instead of 'listener' with
*'ssl=require'

View File

@ -1,6 +1,6 @@
/**
* @file mxs657_restart.cpp Regression case for MXS-657 ("Debug assertion when service is shut down and
*restarted repeatedly")
* restarted repeatedly")
* - playing with 'restart service' and restart Maxscale under load
*/

View File

@ -1,6 +1,6 @@
/**
* @file mxs657_restart_service.cpp mxs657 regression case ("Debug assertion when service is shut down and
*restarted repeatedly")
* restarted repeatedly")
*
* - shutdown and restart RW Split Router in the loop from a number of threads
* Note: does not work crash reliable way with 'smoke' option

View File

@ -1,6 +1,6 @@
/**
* @file mxs710_bad_socket.cpp mxs710_bad_socket regression case (Maxscale does not startup properly and
*crashes after trying to login to database)
* crashes after trying to login to database)
* - try to start maxscale with "socket=/var/lib/mysqld/mysql.sock" in the listener definition
* - do not expect crash
* - try the same with two listers for one service, one of them uses unreachable port

View File

@ -1,7 +1,7 @@
/**
* @file max720_line_with_no_equal.cpp mxs720 regression case - first part: line without "=", second - weird
*lines ("MaxScale fails to start and doesn't log any useful message when there are spurious characters in
*the config file")
* lines ("MaxScale fails to start and doesn't log any useful message when there are spurious characters in
* the config file")
*
* - use incorrect maxscale.cnf
* - check log for error

View File

@ -1,6 +1,6 @@
/**
* @file max720_wierd_line.cpp mxs720 regression case - second part: weird lines ("MaxScale fails to start
*and doesn't log any useful message when there are spurious characters in the config file")
* and doesn't log any useful message when there are spurious characters in the config file")
*
* - use incorrect maxscale.cnf
* - check log for error

View File

@ -1,6 +1,6 @@
/**
* @file mxs781_binlog_wrong_passwrd.cpp Try to configure binlog router to use wrong password for Master and
*check 'slave status' on binlog
* check 'slave status' on binlog
* - try to put wrong password when connect binlog router to real master
* - check binlog router status using 'show slave status', expect 'Slave stopped'
*/

View File

@ -1,6 +1,6 @@
/**
* @file mxs812_2.cpp - Execute binary protocol prepared statements while master is blocked, checks "Current
*no. of conns" after the test
* no. of conns" after the test
* - start threads which prepares and executes simple statement in the loop
* - every 5 seconds block and after another 5 seconds unblock Master
* - checks "Current no. of conns" after the test, expect 0

View File

@ -1,6 +1,6 @@
/**
* @file mxs822_maxpasswd.cpp Regression test for bug MXS-822 ("encrypted passwords containing special
*characters appear to not work")
* characters appear to not work")
* - create .secret with maxkeys
* - generate encripted password with maxpasswd, use password with special characters
* - replace passwords in maxscale.cnf with generated encripted password

View File

@ -1,6 +1,6 @@
/**
* @file mxs827_write_timeout "ReadWriteSplit only keeps used connection alive, query crashes after unused
*connection times out"
* connection times out"
* - SET wait_timeout=20
* - do only SELECT during 30 seconds
* - try INSERT

View File

@ -25,8 +25,7 @@ int main(int argc, char** argv)
"CREATE USER 'test2'@'%' IDENTIFIED BY 'test2'",
"GRANT dba TO 'test'@'%'",
"GRANT dba TO 'test2'@'%'",
"SET DEFAULT ROLE dba FOR 'test'@'%'"
}))
"SET DEFAULT ROLE dba FOR 'test'@'%'"}))
{
test.try_query(test.repl->nodes[0], "%s", a.c_str());
}
@ -52,8 +51,7 @@ int main(int argc, char** argv)
for (auto a : vector<string>({"DROP DATABASE IF EXISTS my_db",
"DROP ROLE IF EXISTS dba",
"DROP USER 'test'@'%'",
"DROP USER 'test2'@'%'"
}))
"DROP USER 'test2'@'%'"}))
{
execute_query_silent(test.repl->nodes[0], "%s", a.c_str());
}

View File

@ -5,12 +5,12 @@
* - Set nodes 0 and 1 into read-only mode
* - repeat status check
* - Configure nodes 1 and 2 (server2 and server3) into a master-master pair, make node 0 a slave of node 1
*and node 3 a slave of node 2
* and node 3 a slave of node 2
* - repeat status check
* - Set node 1 into read-only mode
* - repeat status check
* - Create two distinct groups (server1 and server2 are masters for eache others and same for server3 and
*server4)
* server4)
* - repeat status check
* - Set nodes 1 and 3 (server2 and server4) into read-only mode
*/

View File

@ -178,4 +178,4 @@ private:
int check_node_ssh(int node);
};
#endif // NODES_H
#endif // NODES_H

View File

@ -260,4 +260,4 @@ public:
const char* sg_intern;
};
#endif // RDS_VPC_H
#endif // RDS_VPC_H

View File

@ -1,6 +1,6 @@
/**
* @file readconnrouter_master.cpp Connect to ReadConn in master mode and check if there is only one backend
*connection to master
* connection to master
*
* - connect to ReadCon master
* - expect only 1 connection to node 0 and no connections to ther nodes

View File

@ -1,6 +1,6 @@
/**
* @file readconnrouter_slave.cpp Creates 100 connections to ReadConn in slave mode and check if connections
*are distributed among all slaves
* are distributed among all slaves
*
* - create 100 connections to ReadConn slave
* - check if all slave have equal number of connections (+-1)

View File

@ -1,6 +1,6 @@
/**
* @file regexfilter1.cpp Simple regexfilter tests; aslo regression case for mxs508 ("regex filter ignores
*username")
* username")
*
* Three services are configured with regexfilter, each with different parameters.
* All services are queried with SELECT 123. The first service should replace it

View File

@ -1,6 +1,6 @@
/**
* @file rw_select_insert.cpp Checks changes of COM_SELECT and COM_INSERT after queris to check if RWSplit
*sends queries to master or to slave depending on if it is write or read only query
* sends queries to master or to slave depending on if it is write or read only query
* - connect to RWSplit, create table
* - execute SELECT using RWSplit
* - check COM_SELECT and COM_INSERT change on all nodes
@ -18,7 +18,7 @@
/**
* @brief check_com_select Checks if COM_SELECT increase takes place only on one slave node and there is no
*COM_INSERT increase
* COM_INSERT increase
* @param new_selects COM_SELECT after query
* @param new_inserts COM_INSERT after query
* @param selects COM_SELECT before query

View File

@ -1,6 +1,6 @@
/**
* @file ses_bigmem Executes a lot of session commands with "disable_sescmd_history=true" and check that
*memory consumption is not increasing
* memory consumption is not increasing
* (relates to MXS-672 "maxscale possible memory leak"
*/

Some files were not shown because too many files have changed in this diff Show More