MySQL  8.0.17
Source Code Documentation
base_list Class Reference

#include <sql_list.h>

Inheritance diagram for base_list:
List< T > List< Cached_item > List< char > List< Condition_information_item > List< const char > List< const dd::Object_table > List< const Plugin_table > List< const Plugin_tablespace::Plugin_tablespace_file > List< const sp_condition_value > List< const Sql_condition > List< Create_field > List< Derived_key > List< Ed_row > List< Index_hint > List< Item > List< Item_equal > List< Item_field > List< Item_func_match > List< Item_func_set_user_var > List< Item_param > List< Item_sum > List< Json_table_column > List< Key_part_spec > List< LEX > List< LEX_COLUMN > List< LEX_USER > List< List< Item > > List< longlong > List< Mrg_child_def > List< MYSQL_LEX_CSTRING > List< MYSQL_LEX_STRING > List< Name_resolution_context > List< Natural_join_column > List< Observer_info > List< opt_explain_json_namespace::context > List< opt_explain_json_namespace::joinable_ctx > List< opt_explain_json_namespace::subquery_ctx > List< p_elem_val > List< partition_element > List< PT_key_part_specification > List< PT_select_var > List< qep_row::extra > List< QUICK_RANGE > List< QUICK_RANGE_SELECT > List< QUICK_SELECT_I > List< Security_context > List< SEL_IMERGE > List< SELECT_LEX_UNIT > List< Semijoin_mat_exec > List< set_var_base > List< sp_label > List< sp_lex_branch_instr > List< sp_parser_data::Backpatch_info > List< sp_variable > List< st_handler_tablename > List< Statement_information_item > List< String > List< TABLE > List< TABLE_LIST > List< Trigger > List< ulonglong > List< Window > List< XML_TAG >

Public Member Functions

bool operator== (const base_list &rhs) const
 
void empty ()
 
 base_list ()
 
 base_list (const base_list &tmp)
 This is a shallow copy constructor that implicitly passes the ownership from the source list to the new instance. More...
 
base_listoperator= (const base_list &tmp)
 
 base_list (const base_list &rhs, MEM_ROOT *mem_root)
 Construct a deep copy of the argument in memory root mem_root. More...
 
bool push_back (void *info)
 
bool push_back (void *info, MEM_ROOT *mem_root)
 
bool push_front (void *info)
 
bool push_front (void *info, MEM_ROOT *mem_root)
 
void remove (list_node **prev)
 
void concat (base_list *list)
 
void * pop (void)
 
void disjoin (base_list *list)
 
void prepend (base_list *list)
 
void swap (base_list &rhs)
 Swap two lists. More...
 
list_nodelast_node ()
 
list_nodefirst_node ()
 
void * head ()
 
const void * head () const
 
void ** head_ref ()
 
bool is_empty () const
 
list_nodelast_ref ()
 
uint size () const
 

Public Attributes

uint elements
 

Protected Member Functions

void after (void *info, list_node *node)
 
bool after (void *info, list_node *node, MEM_ROOT *mem_root)
 

Protected Attributes

list_nodefirst
 
list_node ** last
 

Friends

class base_list_iterator
 
class error_list
 
class error_list_iterator
 

Constructor & Destructor Documentation

◆ base_list() [1/3]

base_list::base_list ( )
inline

◆ base_list() [2/3]

base_list::base_list ( const base_list tmp)
inline

This is a shallow copy constructor that implicitly passes the ownership from the source list to the new instance.

The old instance is not updated, so both objects end up sharing the same nodes. If one of the instances then adds or removes a node, the other becomes out of sync ('last' pointer), while still operational. Some old code uses and relies on this behaviour. This logic is quite tricky: please do not use it in any new code.

◆ base_list() [3/3]

base_list::base_list ( const base_list rhs,
MEM_ROOT mem_root 
)

Construct a deep copy of the argument in memory root mem_root.

The elements themselves are copied by pointer.

Member Function Documentation

◆ after() [1/2]

void base_list::after ( void *  info,
list_node node 
)
inlineprotected

◆ after() [2/2]

bool base_list::after ( void *  info,
list_node node,
MEM_ROOT mem_root 
)
inlineprotected

◆ concat()

void base_list::concat ( base_list list)
inline

◆ disjoin()

void base_list::disjoin ( base_list list)
inline

◆ empty()

void base_list::empty ( )
inline

◆ first_node()

list_node* base_list::first_node ( )
inline

◆ head() [1/2]

void* base_list::head ( )
inline

◆ head() [2/2]

const void* base_list::head ( ) const
inline

◆ head_ref()

void** base_list::head_ref ( )
inline

◆ is_empty()

bool base_list::is_empty ( void  ) const
inline

◆ last_node()

list_node* base_list::last_node ( )
inline

◆ last_ref()

list_node* base_list::last_ref ( )
inline

◆ operator=()

base_list& base_list::operator= ( const base_list tmp)
inline

◆ operator==()

bool base_list::operator== ( const base_list rhs) const
inline

◆ pop()

void* base_list::pop ( void  )
inline

◆ prepend()

void base_list::prepend ( base_list list)
inline

◆ push_back() [1/2]

bool base_list::push_back ( void *  info)
inline

◆ push_back() [2/2]

bool base_list::push_back ( void *  info,
MEM_ROOT mem_root 
)
inline

◆ push_front() [1/2]

bool base_list::push_front ( void *  info)
inline

◆ push_front() [2/2]

bool base_list::push_front ( void *  info,
MEM_ROOT mem_root 
)
inline

◆ remove()

void base_list::remove ( list_node **  prev)
inline

◆ size()

uint base_list::size ( ) const
inline

◆ swap()

void base_list::swap ( base_list rhs)
inline

Swap two lists.

Friends And Related Function Documentation

◆ base_list_iterator

friend class base_list_iterator
friend

◆ error_list

friend class error_list
friend

◆ error_list_iterator

friend class error_list_iterator
friend

Member Data Documentation

◆ elements

uint base_list::elements

◆ first

list_node* base_list::first
protected

◆ last

list_node ** base_list::last
protected

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