Skip to content

Commit

Permalink
Improve documentation of Unique class
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
cvicentiu committed Jan 16, 2020
1 parent 5683c11 commit 409aba3
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions sql/sql_class.h
Original file line number Diff line number Diff line change
Expand Up @@ -3923,16 +3923,21 @@ class user_var_entry
class Unique :public Sql_alloc
{
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;
IO_CACHE file;
TREE tree;
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;
bool flush();
uint size;
uint full_size;
uint min_dupl_count; /* always 0 for unions, > 0 for intersections */
uint size; /* Size of element stored in unique object. */
uint full_size; /* Size of element + space needed to store the number of
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);

Expand Down

0 comments on commit 409aba3

Please sign in to comment.