MySQL 9.1.0
Source Code Documentation
|
When MDL detects a lock wait timeout, it pushes an error into the statement diagnostics area. More...
Public Member Functions | |
User_level_lock_wait_error_handler () | |
bool | got_timeout () const |
bool | handle_condition (THD *, uint sql_errno, const char *, Sql_condition::enum_severity_level *, const char *) override |
Handle a sql condition. More... | |
Private Attributes | |
bool | m_lock_wait_timeout |
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 |
When MDL detects a lock wait timeout, it pushes an error into the statement diagnostics area.
For GET_LOCK(), lock wait timeout is not an error, but a special return value (0). NULL is returned in case of error. Capture and suppress lock wait timeout. We also convert ER_LOCK_DEADLOCK error to ER_USER_LOCK_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 user-level lock.
|
inline |
|
inline |
|
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.
|
private |