MySQL 8.0.40
Source Code Documentation
Query_arena Class Reference

#include <sql_class.h>

Inheritance diagram for Query_arena:
[legend]

Public Types

enum  enum_state {
  STMT_INITIALIZED = 0 , STMT_INITIALIZED_FOR_SP = 1 , STMT_PREPARED = 2 , STMT_REGULAR_EXECUTION = 3 ,
  STMT_EXECUTED = 4 , STMT_ERROR = -1
}
 

Public Member Functions

 Query_arena (MEM_ROOT *mem_root_arg, enum enum_state state_arg)
 
 Query_arena ()
 
virtual ~Query_arena ()=default
 
Itemitem_list () const
 
void reset_item_list ()
 
void set_item_list (Item *item)
 
void add_item (Item *item)
 
void free_items ()
 
void set_state (enum_state state_arg)
 
enum_state get_state () const
 
bool is_stmt_prepare () const
 
bool is_stmt_prepare_or_first_sp_execute () const
 
bool is_stmt_prepare_or_first_stmt_execute () const
 
bool is_regular () const
 
void * alloc (size_t size)
 
void * mem_calloc (size_t size)
 
template<typename T >
T * alloc_typed ()
 
template<typename T >
T * memdup_typed (const T *mem)
 
char * mem_strdup (const char *str)
 
char * strmake (const char *str, size_t size) const
 
LEX_CSTRING strmake (LEX_CSTRING str)
 
void * memdup (const void *str, size_t size)
 
void set_query_arena (const Query_arena &set)
 Copies memory-managing members from set. More...
 
void swap_query_arena (const Query_arena &source, Query_arena *backup)
 Copy the current arena to backup and set the current arena to match source More...
 

Public Attributes

MEM_ROOTmem_root
 
bool is_repreparing {false}
 To check whether a reprepare operation is active. More...
 

Private Attributes

Itemm_item_list
 
enum_state state
 

Member Enumeration Documentation

◆ enum_state

Enumerator
STMT_INITIALIZED 
STMT_INITIALIZED_FOR_SP 
STMT_PREPARED 
STMT_REGULAR_EXECUTION 
STMT_EXECUTED 
STMT_ERROR 

Constructor & Destructor Documentation

◆ Query_arena() [1/2]

Query_arena::Query_arena ( MEM_ROOT mem_root_arg,
enum enum_state  state_arg 
)
inline

◆ Query_arena() [2/2]

Query_arena::Query_arena ( )
inline

◆ ~Query_arena()

virtual Query_arena::~Query_arena ( )
virtualdefault

Member Function Documentation

◆ add_item()

void Query_arena::add_item ( Item item)

◆ alloc()

void * Query_arena::alloc ( size_t  size)
inline

◆ alloc_typed()

template<typename T >
T * Query_arena::alloc_typed ( )
inline

◆ free_items()

void Query_arena::free_items ( )

◆ get_state()

enum_state Query_arena::get_state ( ) const
inline

◆ is_regular()

bool Query_arena::is_regular ( ) const
inline
Returns
true if a regular statement, ie not prepared and not stored proc

◆ is_stmt_prepare()

bool Query_arena::is_stmt_prepare ( ) const
inline

◆ is_stmt_prepare_or_first_sp_execute()

bool Query_arena::is_stmt_prepare_or_first_sp_execute ( ) const
inline

◆ is_stmt_prepare_or_first_stmt_execute()

bool Query_arena::is_stmt_prepare_or_first_stmt_execute ( ) const
inline

◆ item_list()

Item * Query_arena::item_list ( ) const
inline

◆ mem_calloc()

void * Query_arena::mem_calloc ( size_t  size)
inline

◆ mem_strdup()

char * Query_arena::mem_strdup ( const char *  str)
inline

◆ memdup()

void * Query_arena::memdup ( const void *  str,
size_t  size 
)
inline

◆ memdup_typed()

template<typename T >
T * Query_arena::memdup_typed ( const T *  mem)
inline

◆ reset_item_list()

void Query_arena::reset_item_list ( )
inline

◆ set_item_list()

void Query_arena::set_item_list ( Item item)
inline

◆ set_query_arena()

void Query_arena::set_query_arena ( const Query_arena set)

Copies memory-managing members from set.

No references are kept to it.

Parameters
setA Query_arena from which members are copied.

◆ set_state()

void Query_arena::set_state ( enum_state  state_arg)
inline

◆ strmake() [1/2]

char * Query_arena::strmake ( const char *  str,
size_t  size 
) const
inline

◆ strmake() [2/2]

LEX_CSTRING Query_arena::strmake ( LEX_CSTRING  str)
inline

◆ swap_query_arena()

void Query_arena::swap_query_arena ( const Query_arena source,
Query_arena backup 
)

Copy the current arena to backup and set the current arena to match source

Parameters
sourceA Query_arena from which members are copied.
backupA Query_arena to which members are first saved.

Member Data Documentation

◆ is_repreparing

bool Query_arena::is_repreparing {false}

To check whether a reprepare operation is active.

◆ m_item_list

Item* Query_arena::m_item_list
private

◆ mem_root

MEM_ROOT* Query_arena::mem_root

◆ state

enum_state Query_arena::state
private

The documentation for this class was generated from the following files: