27#ifndef TEMPTABLE_INDEXED_CELLS_H
28#define TEMPTABLE_INDEXED_CELLS_H
52 const unsigned char *mysql_search_cells,
54 uint16_t mysql_search_cells_length,
62 const unsigned char *mysql_row,
88 unsigned char *mysql_row,
90 size_t mysql_row_length)
const;
109 const Index &index)
const;
123 const Index &index)
const;
158 const Index &index)
const;
169 "m_number_of_cells is not large enough to store the maximum "
170 "number of indexed cells");
178 "m_length is not large enough to store the maximum length of an index");
257 unsigned char *mysql_row,
258 size_t mysql_row_length)
const {
TempTable Cell declaration.
A cell is the intersection of a row and a column.
Definition: cell.h:42
Index interface.
Definition: index.h:45
Indexed cells comparator (a == b).
Definition: indexed_cells.h:218
Indexed_cells_equal_to(const Index &index)
Definition: indexed_cells.h:309
bool operator()(const Indexed_cells &lhs, const Indexed_cells &rhs) const
Definition: indexed_cells.h:312
const Index & m_index
Definition: indexed_cells.h:225
Indexed cells hasher.
Definition: indexed_cells.h:207
const Index & m_index
Definition: indexed_cells.h:214
size_t operator()(const Indexed_cells &indexed_cells) const
Definition: indexed_cells.cc:249
Indexed_cells_hash(const Index &index)
Definition: indexed_cells.h:306
Indexed cells comparator (a < b).
Definition: indexed_cells.h:196
Indexed_cells_less(const Index &index)
Definition: indexed_cells.h:298
bool operator()(const Indexed_cells &lhs, const Indexed_cells &rhs) const
Definition: indexed_cells.h:301
const Index & m_index
Definition: indexed_cells.h:203
Indexed cells represent one or more cells that are covered by an index.
Definition: indexed_cells.h:46
uint16_t m_length
MySQL search cells' length, used only when m_data_location == MYSQL_BUF_INDEX_READ.
Definition: indexed_cells.h:170
const unsigned char * m_mysql_buf
Pointer to one of:
Definition: indexed_cells.h:188
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:162
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:169
uint8_t m_number_of_cells
Number of cells that are indexed.
Definition: indexed_cells.h:165
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:44
Data_location
Enum that designates where the actual user data is stored.
Definition: indexed_cells.h:127
@ 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:123
Cell cell(size_t i, const Index &index) const
Get a given indexed cell.
Definition: indexed_cells.cc:93
const Row * m_row
Pointer to the row, used when m_data_location == ROW.
Definition: indexed_cells.h:191
size_t number_of_cells() const
Get the number of indexed cells.
Definition: indexed_cells.h:288
Storage::Element * row() const
Get the row of these indexed cells.
Definition: indexed_cells.h:230
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:150
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:256
A row representation.
Definition: row.h:402
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:114
void Element
Type used for elements.
Definition: storage.h:46
void my_abort()
Calls our own implementation of abort, if specified, or std's abort().
Definition: my_init.cc:261
Definition: allocator.h:48
std::vector< Column, Allocator< Column > > Columns
A type that designates all the columns of a table.
Definition: column.h:227
TempTable Row declarations.
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.
int n
Definition: xcom_base.cc:509