MXS-2144: Treat server shutdown as a network error
If the server where a query is being executed is shutting down, readwritesplit should treat it as an error to make retrying of the query possible. By treating server shutdowns as network errors, the same code path that is used for actual network errors can be taken. This removes the need for any extra retrying logic for this particular case.
This commit is contained in:
@ -526,6 +526,15 @@ bool mxs_mysql_is_ok_packet(GWBUF* buffer);
|
||||
*/
|
||||
bool mxs_mysql_is_err_packet(GWBUF* buffer);
|
||||
|
||||
/**
|
||||
* Extract the error code from an ERR packet
|
||||
*
|
||||
* @param buffer Buffer containing the ERR packet
|
||||
*
|
||||
* @return The error code or 0 if the buffer is not an ERR packet
|
||||
*/
|
||||
uint16_t mxs_mysql_get_mysql_errno(GWBUF* buffer);
|
||||
|
||||
/**
|
||||
* @brief Check if a buffer contains a result set
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user