Expose function for checking MYSQL connection errors

If a query done via the connector fails, the return value can be inspected
with the function. This helps separate fatal problems from transient ones.
This commit is contained in:
Markus Mäkelä
2018-06-11 09:31:18 +03:00
parent e74591cfe5
commit 8721c9117a
2 changed files with 9 additions and 2 deletions

View File

@ -41,6 +41,13 @@ 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);
/**
* Check if the MYSQL error number is a connection error
*
* @return True if the MYSQL error number is a connection error
*/
bool mxs_mysql_is_net_error(int errcode);
/**
* Execute a query
*