Commit 409aba3d authored by Vicențiu Ciorbaru's avatar Vicențiu Ciorbaru

Improve documentation of Unique class

* size represents the size of an element in the Unique class
* full_size is used when the Unique class counts the number of
duplicates stored per element. This requires additional space per Unique
element.
parent 5683c113
...@@ -3923,16 +3923,21 @@ class user_var_entry ...@@ -3923,16 +3923,21 @@ class user_var_entry
class Unique :public Sql_alloc class Unique :public Sql_alloc
{ {
DYNAMIC_ARRAY file_ptrs; DYNAMIC_ARRAY file_ptrs;
ulong max_elements; ulong max_elements; /* Total number of elements that will be stored in-memory */
ulonglong max_in_memory_size; ulonglong max_in_memory_size;
IO_CACHE file; IO_CACHE file;
TREE tree; TREE tree;
uchar *record_pointers; uchar *record_pointers;
/* Number of elements filtered out due to min_dupl_count when storing results
to table. See Unique::get */
ulong filtered_out_elems; ulong filtered_out_elems;
bool flush(); bool flush();
uint size; uint size; /* Size of element stored in unique object. */
uint full_size; uint full_size; /* Size of element + space needed to store the number of
uint min_dupl_count; /* always 0 for unions, > 0 for intersections */ duplicates found for the element. */
uint min_dupl_count; /* Minimum number of occurences of element required for
it to be written to record_pointers.
always 0 for unions, > 0 for intersections */
bool merge(TABLE *table, uchar *buff, bool without_last_merge); bool merge(TABLE *table, uchar *buff, bool without_last_merge);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment