MySQL 5.6.14 Source Code Document
|
#include <filesort_utils.h>
Public Member Functions | |
void | sort_buffer (const Sort_param *param, uint count) |
uchar * | get_record_buffer (uint idx) |
Initializes a record pointer. | |
void | init_record_pointers () |
Initializes all the record pointers. | |
size_t | sort_buffer_size () const |
Returns total size: pointer array + record buffers. | |
uchar ** | alloc_sort_buffer (uint num_records, uint record_length) |
Allocates the buffer, but does not initialize pointers. | |
std::pair< uint, uint > | sort_buffer_properties () const |
What is the <num_records, record_length> for the buffer? | |
void | free_sort_buffer () |
Frees the buffer. | |
uchar ** | get_sort_keys () |
Getter, for calling routines which still use the uchar** interface. | |
Filesort_buffer & | operator= (const Filesort_buffer &rhs) |
A wrapper class around the buffer used by filesort(). The buffer is a contiguous chunk of memory, where the first part is <num_records> pointers to the actual data.
We wrap the buffer in order to be able to do lazy initialization of the pointers: the buffer is often much larger than what we actually need.
The buffer must be kept available for multiple executions of the same sort operation, so we have explicit allocate and free functions, rather than doing alloc/free in CTOR/DTOR.
Definition at line 62 of file filesort_utils.h.
|
inline |
We need an assignment operator, see filesort(). This happens to have the same semantics as the one that would be generated by the compiler. We still implement it here, to show shallow assignment explicitly: we have two objects sharing the same array.
Definition at line 114 of file filesort_utils.h.
void Filesort_buffer::sort_buffer | ( | const Sort_param * | param, |
uint | count | ||
) |
Sort me...
Definition at line 176 of file filesort_utils.cc.