26#ifndef TEMPTABLE_INDEXED_CELLS_H
27#define TEMPTABLE_INDEXED_CELLS_H
51 const unsigned char *mysql_search_cells,
53 uint16_t mysql_search_cells_length,
61 const unsigned char *mysql_row,
87 unsigned char *mysql_row,
89 size_t mysql_row_length)
const;
108 const Index &index)
const;
122 const Index &index)
const;
157 const Index &index)
const;
168 "m_number_of_cells is not large enough to store the maximum "
169 "number of indexed cells");
177 "m_length is not large enough to store the maximum length of an index");
256 unsigned char *mysql_row,
257 size_t mysql_row_length)
const {
TempTable Cell declaration.
A cell is the intersection of a row and a column.
Definition: cell.h:41
Index interface.
Definition: index.h:44
Indexed cells comparator (a == b).
Definition: indexed_cells.h:217
Indexed_cells_equal_to(const Index &index)
Definition: indexed_cells.h:308
bool operator()(const Indexed_cells &lhs, const Indexed_cells &rhs) const
Definition: indexed_cells.h:311
const Index & m_index
Definition: indexed_cells.h:224
Indexed cells hasher.
Definition: indexed_cells.h:206
const Index & m_index
Definition: indexed_cells.h:213
size_t operator()(const Indexed_cells &indexed_cells) const
Definition: indexed_cells.cc:248
Indexed_cells_hash(const Index &index)
Definition: indexed_cells.h:305
Indexed cells comparator (a < b).
Definition: indexed_cells.h:195
Indexed_cells_less(const Index &index)
Definition: indexed_cells.h:297
bool operator()(const Indexed_cells &lhs, const Indexed_cells &rhs) const
Definition: indexed_cells.h:300
const Index & m_index
Definition: indexed_cells.h:202
Indexed cells represent one or more cells that are covered by an index.
Definition: indexed_cells.h:45
uint16_t m_length
MySQL search cells' length, used only when m_data_location == MYSQL_BUF_INDEX_READ.
Definition: indexed_cells.h:169
const unsigned char * m_mysql_buf
Pointer to one of:
Definition: indexed_cells.h:187
Data_location m_data_location
Flag indicating whether we are interpreting MySQL buffer or we have references to a temptable::Row ob...
Definition: indexed_cells.h:161
Cell cell_from_mysql_buf_index_read(size_t i, const Index &index) const
Derive the Nth cell if m_data_location == Data_location::MYSQL_BUF_INDEX_READ.
Definition: indexed_cells.cc:168
uint8_t m_number_of_cells
Number of cells that are indexed.
Definition: indexed_cells.h:164
Indexed_cells(const unsigned char *mysql_search_cells, uint16_t mysql_search_cells_length, const Index &index)
Construct from a MySQL indexed cells (eg index_read() input buffer).
Definition: indexed_cells.cc:43
Data_location
Enum that designates where the actual user data is stored.
Definition: indexed_cells.h:126
@ MYSQL_BUF_INDEX_READ
The data is in a MySQL buffer in index_read() input format (MySQL search cells).
@ ROW
The data is in temptable::Row.
@ MYSQL_BUF_WRITE_ROW
The data is in a MySQL buffer in write_row() format (MySQL row).
int compare(const Indexed_cells &rhs, const Index &index) const
Compare to another indexed cells object.
Definition: indexed_cells.cc:122
Cell cell(size_t i, const Index &index) const
Get a given indexed cell.
Definition: indexed_cells.cc:92
const Row * m_row
Pointer to the row, used when m_data_location == ROW.
Definition: indexed_cells.h:190
size_t number_of_cells() const
Get the number of indexed cells.
Definition: indexed_cells.h:287
Storage::Element * row() const
Get the row of these indexed cells.
Definition: indexed_cells.h:229
static Cell cell_from_row(size_t i, const Index &index, const Row &row)
Generate a cell from a temptable::Row object with a possibly reduced length, if a prefix index is use...
Definition: indexed_cells.cc:149
void export_row_to_mysql(const Columns &columns, unsigned char *mysql_row, size_t mysql_row_length) const
Export the row of these indexed cells in the mysql row format (write_row()).
Definition: indexed_cells.h:255
A row representation.
Definition: row.h:401
void copy_to_mysql_row(const Columns &columns, unsigned char *mysql_row, size_t mysql_row_length) const
Copy the row in a MySQL buffer (convert to write_row() format).
Definition: row.cc:113
void Element
Type used for elements.
Definition: storage.h:45
void my_abort()
Calls our own implementation of abort, if specified, or std's abort().
Definition: my_init.cc:260
Definition: allocator.h:44
std::vector< Column, Allocator< Column > > Columns
A type that designates all the columns of a table.
Definition: column.h:226
File containing constants that can be used throughout the server.
constexpr const unsigned int MAX_REF_PARTS
Definition: sql_const.h:46
constexpr const unsigned int MAX_KEY_LENGTH
Definition: sql_const.h:47
TempTable Column declaration.
TempTable Row declarations.
int n
Definition: xcom_base.cc:508