24#ifndef UNIQUES_INCLUDED
25#define UNIQUES_INCLUDED
156 void reset(
bool reinit);
API for getting cost estimates for operations on table data.
Definition: opt_costmodel.h:242
A typesafe replacement for DYNAMIC_ARRAY.
Definition: prealloced_array.h:71
Unique_on_insert – similar to above, but rejects duplicates on insert, not just on read of the final ...
Definition: uniques.h:123
uint m_size
Element size.
Definition: uniques.h:125
void cleanup()
Cleanup unique filter.
Definition: uniques.cc:1004
void reset(bool reinit)
Reset filter - drop all rowid records.
Definition: uniques.cc:989
Unique_on_insert(uint size)
Definition: uniques.h:130
bool init()
Initialize duplicate filter - allocate duplicate weedout tmp table.
Definition: uniques.cc:996
bool unique_add(void *ptr)
Add row id to the filter.
Definition: uniques.cc:971
TABLE * m_table
Duplicate weedout tmp table.
Definition: uniques.h:127
Unique – class for unique (removing of duplicates).
Definition: uniques.h:53
ulonglong max_in_memory_size
Memory buffer size.
Definition: uniques.h:59
friend int unique_write_to_file(void *v_key, element_count count, void *unique)
Definition: uniques.cc:334
uint get_size() const
Definition: uniques.h:106
ulong elements_in_tree()
Definition: uniques.h:75
bool unique_add(void *ptr)
Add new value to Unique.
Definition: uniques.h:90
bool flush()
Flush tree to disk.
Definition: uniques.cc:630
uchar * record_pointers
Definition: uniques.h:64
ulong max_elements
Max elements in memory buffer.
Definition: uniques.h:57
bool is_in_memory()
Definition: uniques.h:108
bool get(TABLE *table)
Definition: uniques.cc:892
ulong elements
Definition: uniques.h:71
Prealloced_array< Merge_chunk, 16 > file_ptrs
Array of file pointers.
Definition: uniques.h:55
friend int unique_write_to_ptrs(void *v_key, element_count count, void *unique)
Definition: uniques.cc:346
static double get_use_cost(uint nkeys, uint key_size, ulonglong max_in_memory_size, const Cost_model_table *cost_model)
Definition: uniques.cc:572
bool walk(tree_walk_action action, void *walk_action_arg)
Definition: uniques.cc:855
void reset()
Definition: uniques.cc:648
~Unique()
Definition: uniques.cc:624
IO_CACHE file
Cache file for unique values retrieval of table read AM in executor.
Definition: uniques.h:61
TREE tree
Tree to filter duplicates in memory.
Definition: uniques.h:63
ulonglong get_max_in_memory_size() const
Definition: uniques.h:107
Unique(qsort2_cmp comp_func, void *comp_func_fixed_arg, uint size_arg, ulonglong max_in_memory_size_arg)
Definition: uniques.cc:354
uint size
Element size.
Definition: uniques.h:68
int(* qsort2_cmp)(const void *, const void *, const void *)
Definition: my_sys.h:473
#define DBUG_PRINT(keyword, arglist)
Definition: my_dbug.h:181
#define DBUG_TRACE
Definition: my_dbug.h:146
Some integer typedefs for easier portability.
unsigned long long int ulonglong
Definition: my_inttypes.h:56
unsigned char uchar
Definition: my_inttypes.h:52
Some macros for dealing with pointer arithmetic, e.g., aligning of buffers to a given size.
Common header for many mysys elements.
TREE_ELEMENT * tree_insert(TREE *tree, void *key, uint key_size, const void *custom_arg)
Definition: tree.cc:201
int(* tree_walk_action)(void *, element_count, void *)
Definition: my_tree.h:53
uint32 element_count
Definition: my_tree.h:52
static int count
Definition: myisam_ftdump.cc:45
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
size_t size(const char *const c)
Definition: base64.h:46
repeated Action action
Definition: replication_group_member_actions.proto:43
uint elements_in_tree
Definition: my_tree.h:71
const void * custom_arg
Definition: my_tree.h:74