Inherits Sql_alloc.
Inherited by List< T >, List< Alter_column >, List< Alter_drop >, List< Backpatch_info >, List< Buffered_log >, List< Cached_item >, List< char >, List< Condition_information_item >, List< const char >, List< context >, List< Create_field >, List< Derived_key >, List< Ed_row >, List< extra >, List< Index_hint >, List< int >, List< Item >, List< Item_equal >, List< Item_field >, List< Item_sum >, List< joinable_ctx >, List< Key >, List< Key_part_spec >, List< LEX >, List< LEX_STRING >, List< MockDiagInfoItem >, List< Mrg_child_def >, List< Natural_join_column >, List< NDB_SHARE >, List< Observer_info >, List< opt_explain_json_namespace::context >, List< part_elem_value >, List< partition_element >, List< Parts_share_refs >, List< QUICK_RANGE >, List< QUICK_RANGE_SELECT >, List< QUICK_SELECT_I >, List< SEL_IMERGE >, List< SELECT_LEX_UNIT >, List< Semijoin_mat_exec >, List< sp_condition_value >, List< sp_label >, List< sp_lex_branch_instr >, List< sp_variable >, List< Sql_condition >, List< Statement_information_item >, List< String >, List< subquery_ctx >, List< TABLE >, List< TABLE_LIST >, List< ulonglong >, and List< XML_TAG >.
Public Attributes |
uint | elements |
Protected Member Functions |
void | after (void *info, list_node *node) |
Friends |
class | base_list_iterator |
class | error_list |
class | error_list_iterator |
Additional Inherited Members |
static void * | operator new (size_t size) throw () |
static void * | operator new[] (size_t size) throw () |
static void * | operator new[] (size_t size, MEM_ROOT *mem_root) throw () |
static void * | operator new (size_t size, MEM_ROOT *mem_root) throw () |
static void | operator delete (void *ptr, size_t size) |
static void | operator delete (void *ptr, MEM_ROOT *mem_root) |
static void | operator delete[] (void *ptr, MEM_ROOT *mem_root) |
static void | operator delete[] (void *ptr, size_t size) |
Detailed Description
Definition at line 144 of file sql_list.h.
Constructor & Destructor Documentation
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.
Definition at line 171 of file sql_list.h.
Construct a deep copy of the argument in memory root mem_root. The elements themselves are copied by pointer. If you also need to copy elements by value, you should employ list_copy_and_replace_each_value after creating a copy.
Definition at line 38 of file sql_list.cc.
Member Function Documentation
void base_list::sort |
( |
Node_cmp_func |
cmp, |
|
|
void * |
arg |
|
) |
| |
|
inline |
Sort the list.
- Parameters
-
cmp | node comparison function |
arg | additional info to be passed to comparison function |
The function sorts list nodes by an exchange sort algorithm. The order of list nodes isn't changed, values of info fields are swapped instead. Due to this, list iterators that are initialized before sort could be safely used after sort, i.e they wouldn't cause a crash. As this isn't an effective algorithm the list to be sorted is supposed to be short.
Definition at line 285 of file sql_list.h.
The documentation for this class was generated from the following files: