MXS-2603: Treat WSREP errors as ignorable errors

When a query returns a WSREP error, most of the time it is not something
the client application is expecting. To prevent this from affecting the
client, it can be treated the same way a transaction rollback is treated:
ignore the error and try again.
This commit is contained in:
Markus Mäkelä
2019-07-28 08:55:48 +03:00
parent 45aa40c10a
commit 9d0c6b908a
3 changed files with 52 additions and 8 deletions

View File

@ -88,6 +88,13 @@ public:
return rv;
}
bool is_wsrep_error() const
{
return m_code == 1047
&& m_sql_state == "08S01"
&& m_message == "WSREP has not yet prepared node for application use";
}
bool is_unexpected_error() const
{
switch (m_code)