MySQL 8.0.39
Source Code Documentation
|
A simple holder for the Prepared Statement Query_arena instance in THD. More...
#include <thd_raii.h>
Public Member Functions | |
Prepared_stmt_arena_holder (THD *thd, bool activate_now_if_needed=true) | |
Constructs a new object, activates the persistent arena if requested and if a prepared statement or a stored procedure statement is being executed. More... | |
~Prepared_stmt_arena_holder () | |
Deactivate the persistent arena (restore the previous arena) if it has been activated. More... | |
bool | is_activated () const |
Private Attributes | |
THD *const | m_thd |
The thread context to work with. More... | |
Query_arena * | m_arena |
The arena set by this holder (by activate()). More... | |
Query_arena | m_backup |
The arena state to be restored. More... | |
A simple holder for the Prepared Statement Query_arena instance in THD.
The class utilizes RAII technique to not forget to restore the THD arena.
|
inlineexplicit |
Constructs a new object, activates the persistent arena if requested and if a prepared statement or a stored procedure statement is being executed.
thd | Thread context. |
activate_now_if_needed | Attempt to activate the persistent arena in the constructor or not. |
|
inline |
Deactivate the persistent arena (restore the previous arena) if it has been activated.
|
inline |
|
private |
The arena set by this holder (by activate()).
|
private |
The arena state to be restored.
|
private |
The thread context to work with.