MXS-1367: Retry interrupted queries

The new `query_retries` parameter controls how many times an interrupted
query is retried. This retrying of interrupted queries will reduce the
rate of false positives that MaxScale monitors detect.
This commit is contained in:
Markus Mäkelä
2017-10-03 01:37:12 +03:00
parent 0cd62c6f29
commit f1f8a4b5b2
7 changed files with 99 additions and 13 deletions

View File

@ -29,7 +29,29 @@ uint64_t mxs_leint_consume(uint8_t ** c);
char* mxs_lestr_consume_dup(uint8_t** c);
char* mxs_lestr_consume(uint8_t** c, size_t *size);
MYSQL *mxs_mysql_real_connect(MYSQL *mysql, SERVER *server, const char *user, const char *passwd);
/**
* Creates a connection to a MySQL database engine. If necessary, initializes SSL.
*
* @param con A valid MYSQL structure.
* @param server The server on which the MySQL engine is running.
* @param user The MySQL login ID.
* @param passwd The password for the user.
*
* @return New connection or NULL on error
*/
MYSQL* mxs_mysql_real_connect(MYSQL *mysql, SERVER *server, const char *user, const char *passwd);
/**
* Execute a query
*
* This function wraps mysql_query in a way that automatic query retry is possible.
*
* @param conn MySQL connection
* @param query Query to execute
*
* @return return value of mysql_query
*/
int mxs_mysql_query(MYSQL* conn, const char* query);
/**
* Trim MySQL quote characters surrounding a string.