#include <sql_class.h>
◆ Thd_mem_cnt()
Thd_mem_cnt::Thd_mem_cnt |
( |
| ) |
|
|
inline |
◆ ~Thd_mem_cnt()
Thd_mem_cnt::~Thd_mem_cnt |
( |
| ) |
|
|
inline |
◆ alloc_cnt()
void Thd_mem_cnt::alloc_cnt |
( |
size_t |
size | ) |
|
Increase memory counter at 'alloc' operation.
Update global memory counter.
- Parameters
-
size | amount of memory allocated. |
◆ disable()
void Thd_mem_cnt::disable |
( |
| ) |
|
◆ enable()
void Thd_mem_cnt::enable |
( |
| ) |
|
|
inline |
◆ flush()
void Thd_mem_cnt::flush |
( |
| ) |
|
Function flushes memory counters before deleting the memory counter object.
◆ free_cnt()
void Thd_mem_cnt::free_cnt |
( |
size_t |
size | ) |
|
Decrease memory counter at 'free' operation.
- Parameters
-
size | amount of memory freed. |
◆ generate_error()
Generate OOM error and set therad to KILL_CONNECTION state.
Do nothing if thread is already killed or any error is already issued.
- Parameters
-
err_no | Error number. |
mem_limit | Memory limit. |
mem_size | Memory size. |
- Returns
- -1 if OOM error is generated, 0 otherwise.
◆ is_error()
bool Thd_mem_cnt::is_error |
( |
| ) |
const |
|
inline |
Check if memory counter error is issued.
- Return values
-
true | if memory counter error is issued, false otherwise. |
◆ is_error_log_mode()
bool Thd_mem_cnt::is_error_log_mode |
( |
| ) |
const |
|
inlineprivate |
Check if memory counter is in error log mode.
- Return values
-
true | if memory counter is in error log mode, false otherwise. |
◆ is_error_mode()
bool Thd_mem_cnt::is_error_mode |
( |
| ) |
const |
|
inlineprivate |
Check if memory counter is in error mode.
- Return values
-
true | if memory counter is in error mode, false otherwise. |
◆ no_error_mode()
void Thd_mem_cnt::no_error_mode |
( |
| ) |
|
|
inline |
Set NO ERROR memory counter mode.
◆ reset()
int Thd_mem_cnt::reset |
( |
void |
| ) |
|
Function resets current memory counter mode and adjusts global memory counter according to thread memory counter.
- Returns
- -1 if OOM error, 0 otherwise.
◆ restore_mode()
void Thd_mem_cnt::restore_mode |
( |
| ) |
|
|
inline |
Restore original memory counter mode.
◆ set_curr_mode()
void Thd_mem_cnt::set_curr_mode |
( |
uint |
mode_arg | ) |
|
|
inline |
Function sets current memory counter mode.
- Parameters
-
mode_arg | current memory counter mode. |
◆ set_orig_mode()
void Thd_mem_cnt::set_orig_mode |
( |
uint |
mode_arg | ) |
|
|
inline |
Function sets original memory counter mode.
- Parameters
-
mode_arg | original memory counter mode. |
◆ set_thd()
void Thd_mem_cnt::set_thd |
( |
THD * |
thd | ) |
|
|
inline |
◆ set_thd_error_status()
void Thd_mem_cnt::set_thd_error_status |
( |
| ) |
const |
Set THD error status using memory counter diagnostics area.
◆ curr_mode
◆ glob_mem_counter
◆ is_connection_stage
bool Thd_mem_cnt::is_connection_stage {true} |
|
private |
◆ m_da
◆ m_enabled
bool Thd_mem_cnt::m_enabled {false} |
|
private |
◆ m_thd
◆ max_conn_mem
◆ mem_counter
◆ orig_mode
The documentation for this class was generated from the following files: