27#ifndef TEMPTABLE_TABLE_H
28#define TEMPTABLE_TABLE_H
50 bool all_columns_are_fixed_size,
size_t tmp_table_size_limit);
89 const unsigned char *mysql_row);
100 const unsigned char *mysql_row_old,
102 const unsigned char *mysql_row_new,
144 const unsigned char *mysql_row_new)
const;
203 unsigned char *mysql_row)
const {
215 const Row *
row =
static_cast<const Row *
>(storage_element);
222 for (
auto element :
m_rows) {
233 entry.m_index->truncate();
260 entry.m_alloc_size =
sizeof(T);
Custom memory allocator.
Definition: allocator.h:477
Memory-block abstraction whose purpose is to serve as a building block for custom memory-allocator im...
Definition: block.h:163
A column class that describes the metadata of a column.
Definition: column.h:41
Index interface.
Definition: index.h:45
A row representation.
Definition: row.h:402
Iterator over a Storage object.
Definition: storage.h:51
Storage container.
Definition: storage.h:43
size_t size() const
Get the number of elements in the storage.
Definition: storage.h:509
void clear()
Delete all elements in the storage.
Definition: storage.h:618
void element_size(size_t element_size)
Set the element size.
Definition: storage.h:489
void Element
Type used for elements.
Definition: storage.h:46
Definition: allocator.h:128
void row(const Storage::Iterator &pos, unsigned char *mysql_row) const
Definition: table.h:202
size_t number_of_indexes() const
Definition: table.h:181
Result disable_indexes()
Definition: table.h:237
bool indexed() const
Check if the table is indexed.
Definition: table.h:251
void append_new_index(const KEY &mysql_index)
Create index for given key and append it to indexes table.
Definition: table.h:257
Table(const Table &)=delete
Table(TABLE *mysql_table, Block *shared_block, bool all_columns_are_fixed_size, size_t tmp_table_size_limit)
Definition: table.cc:51
Storage m_rows
Rows of the table.
Definition: table.h:156
Table & operator=(const Table &)=delete
TableResourceMonitor m_resource_monitor
Definition: table.h:150
bool m_indexes_are_enabled
Definition: table.h:160
Result indexes_insert(Storage::Element *row)
Definition: table.cc:317
const Columns & columns() const
Definition: table.h:187
const Index & index(size_t i) const
Definition: table.h:191
std::vector< Index_entry, Allocator< Index_entry > > m_index_entries
Definition: table.h:164
Result indexes_remove(Storage::Element *row)
Definition: table.cc:359
Result update(const unsigned char *mysql_row_old, const unsigned char *mysql_row_new, Storage::Element *target_row)
Update a row in the table.
Definition: table.cc:171
void truncate()
Definition: table.h:220
uint32_t m_mysql_row_length
Definition: table.h:162
Table & operator=(Table &&rhs)=delete
bool m_all_columns_are_fixed_size
Definition: table.h:158
Table(Table &&other)=delete
Result insert(const unsigned char *mysql_row)
Insert a new row in the table.
Definition: table.cc:124
Result remove(const unsigned char *mysql_row_must_be, const Storage::Iterator &victim_position)
Definition: table.cc:226
Result enable_indexes()
Definition: table.h:242
~Table()
Definition: table.cc:113
void indexes_destroy()
Destroy the indexes in m_index_entries.
Definition: table.cc:289
const Column & column(size_t i) const
Definition: table.h:195
size_t mysql_row_length() const
Definition: table.h:179
Allocator< uint8_t > m_allocator
Allocator for all members that need dynamic memory allocation.
Definition: table.h:153
size_t number_of_columns() const
Definition: table.h:185
std::vector< Cursor, Allocator< Cursor > > m_insert_undo
Definition: table.h:166
const TABLE_SHARE * mysql_table_share() const
Definition: table.h:175
TABLE_SHARE * m_mysql_table_share
Definition: table.h:170
const Storage & rows() const
Definition: table.h:200
void indexes_create()
Create the indexes in m_index_entries from m_mysql_table->key_info[].
Definition: table.cc:260
size_t number_of_rows() const
Definition: table.h:189
bool is_index_update_needed(const unsigned char *mysql_row_old, const unsigned char *mysql_row_new) const
Definition: table.cc:302
Columns m_columns
Definition: table.h:168
Definition: allocator.h:45
Result
Definition: result.h:34
std::vector< Column, Allocator< Column > > Columns
A type that designates all the columns of a table.
Definition: column.h:227
TempTable custom allocator.
TempTable Column declaration.
TempTable Index declarations.
TempTable auxiliary Result enum.
TempTable Row declarations.
This structure is shared between different table objects.
Definition: table.h:690
uint rec_buff_length
Definition: table.h:842
Definition: completion_hash.h:35
Index entry for storing index pointer as well as allocated memory size.
Definition: table.h:119
size_t m_alloc_size
Definition: table.h:122
Index * m_index
Definition: table.h:120