MySQL  8.0.27
Source Code Documentation
merge_many_buff.h File Reference
#include <algorithm>
#include "my_dbug.h"
#include "my_sys.h"
#include "sql/mysqld.h"
#include "sql/sql_base.h"
#include "sql/sql_sort.h"

Go to the source code of this file.

Functions

template<typename Merge_param >
bool merge_many_buff (THD *thd, Merge_param *param, Sort_buffer sort_buffer, Merge_chunk_array chunk_array, size_t *p_num_chunks, IO_CACHE *t_file)
 Merges buffers to make < MERGEBUFF2 buffers. More...
 

Function Documentation

◆ merge_many_buff()

template<typename Merge_param >
bool merge_many_buff ( THD thd,
Merge_param *  param,
Sort_buffer  sort_buffer,
Merge_chunk_array  chunk_array,
size_t *  p_num_chunks,
IO_CACHE t_file 
)

Merges buffers to make < MERGEBUFF2 buffers.

Parameters
thdthread context
paramSort parameters.
sort_bufferThe main memory buffer.
chunk_arrayArray of chunk descriptors to merge.
[out]p_num_chunksThe number of chunks left in the output file.
[out]t_fileWhere to store the result.
Returns
false if success, true if error