MySQL 8.4.2
Source Code Documentation
|
A context of open_tables() function, used to recover from a failed open_table() or open_routine() attempt. More...
#include <sql_base.h>
Public Types | |
enum | enum_open_table_action { OT_NO_ACTION = 0 , OT_BACKOFF_AND_RETRY , OT_REOPEN_TABLES , OT_DISCOVER , OT_REPAIR , OT_FIX_ROW_TYPE } |
Public Member Functions | |
Open_table_context (THD *thd, uint flags) | |
Open_table_context. More... | |
bool | recover_from_failed_open () |
Recover from failed attempt of open table by performing requested action. More... | |
bool | request_backoff_action (enum_open_table_action action_arg, Table_ref *table) |
Check if we can back-off and set back off action if we can. More... | |
bool | can_recover_from_failed_open () const |
const MDL_savepoint & | start_of_statement_svp () const |
When doing a back-off, we close all tables acquired by this statement. More... | |
ulong | get_timeout () const |
uint | get_flags () const |
void | set_has_protection_against_grl () |
Set flag indicating that we have already acquired metadata lock protecting this statement against GRL while opening tables. More... | |
bool | has_protection_against_grl () const |
bool | can_back_off () const |
Private Attributes | |
THD * | m_thd |
Table_ref * | m_failed_table |
For OT_DISCOVER, OT_REPAIR and OT_FIX_ROW_TYPE actions, the table list element for the table which definition should be re-discovered/updated or which should be repaired. More... | |
MDL_savepoint | m_start_of_statement_svp |
ulong | m_timeout |
Lock timeout in seconds. More... | |
uint | m_flags |
enum enum_open_table_action | m_action |
Back off action. More... | |
bool | m_has_locks |
Whether we had any locks when this context was created. More... | |
bool | m_has_protection_against_grl |
Indicates that in the process of opening tables we have acquired protection against global read lock. More... | |
A context of open_tables() function, used to recover from a failed open_table() or open_routine() attempt.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Set flag indicating that we have already acquired metadata lock protecting this statement against GRL while opening tables.
|
inline |
When doing a back-off, we close all tables acquired by this statement.
Return an MDL savepoint taken at the beginning of the statement, so that we can rollback to it before waiting on locks.
|
private |
Back off action.
|
private |
For OT_DISCOVER, OT_REPAIR and OT_FIX_ROW_TYPE actions, the table list element for the table which definition should be re-discovered/updated or which should be repaired.
|
private |
|
private |
Whether we had any locks when this context was created.
If we did, they are from the previous statement of a transaction, and we can't safely do back-off (and release them).
|
private |
Indicates that in the process of opening tables we have acquired protection against global read lock.
|
private |
|
private |
|
private |
Lock timeout in seconds.
Initialized to LONG_TIMEOUT when opening system tables or to the "lock_wait_timeout" system variable for regular tables.