32#ifndef ddl0impl_buffer_h 
   33#define ddl0impl_buffer_h 
   66  void clear() noexcept;
 
   74  [[nodiscard]] 
bool is_fts() const noexcept {
 
   90  [[nodiscard]] 
bool empty() const noexcept { 
return size() == 0; }
 
  119  void deep_copy(
size_t n_fields, 
size_t data_size) 
noexcept;
 
  133  using DTuples = std::vector<DTuple, ut::allocator<DTuple>>;
 
A utility class which, if inherited from, prevents the descendant class from being copied,...
Definition: ut0class_life_cycle.h:41
 
dberr_t
Definition: db0err.h:39
 
DDL implementation include file.
 
static ulint dict_index_is_unique(const dict_index_t *index)
Check whether the index is unique.
 
constexpr uint32_t DICT_FTS
FTS index; can't be combined with the other flags.
Definition: dict0mem.h:104
 
static void * mem_heap_alloc(mem_heap_t *heap, ulint n)
Allocates n bytes of memory from a memory heap.
 
static void mem_heap_free(mem_heap_t *heap)
Frees the space occupied by a memory heap.
 
The general architecture is that the work is done in two phases, roughly the read and write phase.
Definition: btr0load.cc:42
 
std::pair< byte *, os_offset_t > IO_buffer
Block size for DDL I/O operations.
Definition: ddl0impl.h:47
 
bool index(const std::string &value, const String &search_for, uint32_t *idx)
Definition: contains.h:76
 
Structure for reporting duplicate records.
Definition: ddl0ddl.h:132
 
Buffer for sorting in main memory.
Definition: ddl0impl-buffer.h:41
 
std::function< dberr_t(IO_buffer io_buffer)> Function
Callback for writing serialized data to to disk.
Definition: ddl0impl-buffer.h:45
 
bool is_fts() const noexcept
Definition: ddl0impl-buffer.h:74
 
bool will_fit(size_t n) const noexcept
Check if n bytes will fit in the buffer.
Definition: ddl0impl-buffer.h:110
 
Key_sort_buffer(dict_index_t *index, size_t size) noexcept
Constructor.
Definition: ddl0buffer.cc:81
 
size_t m_buffer_size
Buffer size.
Definition: ddl0impl-buffer.h:158
 
size_t size() const noexcept
Definition: ddl0impl-buffer.h:87
 
dfield_t * alloc(size_t n) noexcept
Allocate fields from the heap.
Definition: ddl0impl-buffer.h:101
 
std::vector< DTuple, ut::allocator< DTuple > > DTuples
Definition: ddl0impl-buffer.h:133
 
static int compare(const dfield_t *lhs, const dfield_t *rhs, Dup *dup) noexcept
Compare two merge data tuples.
Definition: ddl0buffer.cc:245
 
bool is_clustered() const noexcept
Definition: ddl0impl-buffer.h:69
 
dberr_t serialize(IO_buffer io_buffer, Function persist) noexcept
Serialize the contents for storing to disk.
Definition: ddl0buffer.cc:116
 
size_t m_n_tuples
Number of data tuples.
Definition: ddl0impl-buffer.h:152
 
bool is_unique() const noexcept
Definition: ddl0impl-buffer.h:79
 
size_t m_total_size
Total amount of data allocated from m_heap, which includes: i.
Definition: ddl0impl-buffer.h:149
 
mem_heap_t * heap() noexcept
Definition: ddl0impl-buffer.h:84
 
dict_index_t * m_index
The index the tuples belong to.
Definition: ddl0impl-buffer.h:139
 
void deep_copy(size_t n_fields, size_t data_size) noexcept
Deep copy the field data starting from the back.
Definition: ddl0buffer.cc:86
 
DTuples m_dtuples
Array of data tuples.
Definition: ddl0impl-buffer.h:155
 
dfield_t *& back() noexcept
Definition: ddl0impl-buffer.h:93
 
~Key_sort_buffer() noexcept
Destructor.
Definition: ddl0impl-buffer.h:53
 
mem_heap_t * m_heap
Memory heap where allocated.
Definition: ddl0impl-buffer.h:136
 
void sort(ddl::Dup *dup) noexcept
Sort the elements in m_dtuples.
Definition: ddl0buffer.cc:103
 
void clear() noexcept
Reset the sort buffer.
Definition: ddl0buffer.cc:96
 
bool empty() const noexcept
Definition: ddl0impl-buffer.h:90
 
Structure for an SQL data field.
Definition: data0data.h:617
 
Data structure for an index.
Definition: dict0mem.h:1041
 
unsigned type
index type (DICT_CLUSTERED, DICT_UNIQUE, DICT_IBUF, DICT_CORRUPT)
Definition: dict0mem.h:1068
 
bool is_clustered() const
Definition: dict0mem.h:1306
 
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:302
 
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:93
 
int n
Definition: xcom_base.cc:509