MySQL 8.0.39
Source Code Documentation
|
We want to convert ER_LOCK_DEADLOCK error to ER_LOCK_SERVICE_DEADLOCK error. More...
Public Member Functions | |
bool | handle_condition (THD *, uint sql_errno, const char *, Sql_condition::enum_severity_level *, const char *) override |
Handle a sql condition. More... | |
Additional Inherited Members | |
Protected Member Functions inherited from Internal_error_handler | |
Internal_error_handler () | |
Internal_error_handler * | prev_internal_handler () const |
virtual | ~Internal_error_handler ()=default |
We want to convert ER_LOCK_DEADLOCK error to ER_LOCK_SERVICE_DEADLOCK error.
The former means that implicit rollback of transaction has occurred which doesn't (and should not) happen when we get deadlock while waiting for locking service locks.
We also want to convert ER_LOCK_WAIT_TIMEOUT as this error indicates that it helps to restart the transaction. This does not apply to locking service locks.
|
inlineoverridevirtual |
Handle a sql condition.
This method can be implemented by a subclass to achieve any of the following:
This mechanism is similar to C++ try/throw/catch:
THD::push_internal_handler()
,my_error()
, which invokes my_message_sql()
,THD::pop_internal_handler()
.thd | the calling thread |
sql_errno | the error number for the condition raised. |
sqlstate | the SQLSTATE for the condition raised. |
level | the severity level for the condition raised. |
msg | the error message for the condition raised. |
Implements Internal_error_handler.