MySQL  8.0.18
Source Code Documentation
sql_sort.h File Reference
#include "map_helpers.h"
#include "my_base.h"
#include "my_dbug.h"
#include "my_sys.h"
#include "sql/filesort_utils.h"

Go to the source code of this file.

Classes

struct  Merge_chunk
 Descriptor for a merge chunk to be sort-merged. More...
 
class  Sort_result
 
class  Filesort_info
 A class wrapping misc buffers used for sorting. More...
 

Typedefs

typedef Bounds_checked_array< Merge_chunkMerge_chunk_array
 
typedef Bounds_checked_array< ucharSort_buffer
 

Functions

template<typename Heap_type >
void reuse_freed_buff (Merge_chunk *old_top, Heap_type *heap)
 Put all room used by freed buffer to use in adjacent buffer. More...
 

Variables

constexpr size_t MERGEBUFF = 7
 
constexpr size_t MERGEBUFF2 = 15
 
constexpr size_t VARLEN_PREFIX = 4
 

Typedef Documentation

◆ Merge_chunk_array

◆ Sort_buffer

Function Documentation

◆ reuse_freed_buff()

template<typename Heap_type >
void reuse_freed_buff ( Merge_chunk old_top,
Heap_type *  heap 
)

Put all room used by freed buffer to use in adjacent buffer.

Note, that we can't simply distribute memory evenly between all buffers, because new areas must not overlap with old ones.

Variable Documentation

◆ MERGEBUFF

constexpr size_t MERGEBUFF = 7

◆ MERGEBUFF2

constexpr size_t MERGEBUFF2 = 15

◆ VARLEN_PREFIX

constexpr size_t VARLEN_PREFIX = 4