1#ifndef SQL_PACK_ROWS_H_
2#define SQL_PACK_ROWS_H_
192 const TABLE *table = tbl.table;
195 if (tbl.copy_null_flags) {
200 if (tbl.table->is_nullable()) {
201 const size_t null_row_size =
sizeof(tbl.table->null_row);
202 memcpy(dptr, pointer_cast<const uchar *>(&tbl.table->null_row),
204 dptr += null_row_size;
213 for (
const Column &column : tbl.columns) {
TABLE * table
Pointer to TABLE object that owns this field.
Definition: field.h:680
uint16 field_index() const
Returns field index.
Definition: field.h:1800
bool is_null(ptrdiff_t row_offset=0) const
Check whether the full table's row is NULL or the Field has value NULL.
Definition: field.h:1214
virtual uchar * pack(uchar *to, const uchar *from, size_t max_length) const
Pack the field into a format suitable for storage and transfer.
Definition: field.cc:1870
Definition: sql_optimizer.h:125
A typesafe replacement for DYNAMIC_ARRAY.
Definition: prealloced_array.h:70
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:166
uchar * ref
Pointer to current row.
Definition: handler.h:4370
uint ref_length
Length of ref (1-8 or the clustered key length)
Definition: handler.h:4438
A structure that contains a list of tables for the hash join operation, and some pre-computed propert...
Definition: pack_rows.h:83
Prealloced_array< Table, 4 > m_tables
Definition: pack_rows.h:110
table_map tables_to_get_rowid_for() const
Definition: pack_rows.h:103
bool has_blob_column() const
Definition: pack_rows.h:99
bool store_rowids() const
Definition: pack_rows.h:101
TableCollection()=default
bool m_store_rowids
Definition: pack_rows.h:126
TableCollection(TABLE *table)
Definition: pack_rows.h:91
void AddTable(TABLE *tab)
Definition: pack_rows.cc:71
size_t ref_and_null_bytes_size() const
Definition: pack_rows.h:97
table_map m_tables_bitmap
Definition: pack_rows.h:114
table_map m_tables_to_get_rowid_for
Definition: pack_rows.h:127
size_t m_ref_and_null_bytes_size
Definition: pack_rows.h:117
table_map tables_bitmap() const
Definition: pack_rows.h:95
const Prealloced_array< Table, 4 > & tables() const
Definition: pack_rows.h:93
bool m_has_blob_column
Definition: pack_rows.h:124
This file contains the field type.
enum_field_types
Column types for MySQL.
Definition: field_types.h:52
static bool bitmap_is_set(const MY_BITMAP *map, uint bit)
Definition: my_bitmap.h:94
Header for compiler-dependent features.
#define ALWAYS_INLINE
Definition: my_compiler.h:109
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:51
uint64_t table_map
Definition: my_table_map.h:29
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
Definition: pack_rows.cc:35
void PrepareForRequestRowId(const Prealloced_array< Table, 4 > &tables, table_map tables_to_get_rowid_for)
Definition: pack_rows.cc:275
bool StoreFromTableBuffers(const TableCollection &tables, String *buffer)
Take the data marked for reading in "tables" and store it in the provided buffer.
Definition: pack_rows.cc:202
size_t ComputeRowSizeUpperBound(const TableCollection &tables)
Count up how many bytes a single row from the given tables will occupy, in "packed" format.
Definition: pack_rows.cc:186
static bool ShouldCopyRowId(const TABLE *table)
Definition: pack_rows.h:183
static ALWAYS_INLINE uchar * StoreFromTableBuffersRaw(const TableCollection &tables, uchar *dptr)
Definition: pack_rows.h:189
const uchar * LoadIntoTableBuffers(const TableCollection &tables, const uchar *ptr)
Take the data in "ptr" and put it back to the tables' record buffers.
Definition: pack_rows.cc:228
void RequestRowId(const Prealloced_array< Table, 4 > &tables, table_map tables_to_get_rowid_for)
For each of the given tables, request that the row ID is filled in (the equivalent of calling file->p...
Definition: pack_rows.cc:264
Performance schema instrumentation interface.
uint null_bytes
Definition: table.h:836
uchar * null_flags
Pointer to the null flags of record[0].
Definition: table.h:1579
bool null_row
Definition: table.h:1703
bool const_table
Definition: table.h:1725
MY_BITMAP * read_set
Set over all columns that the optimizer intends to read.
Definition: table.h:1621
bool is_nullable() const
Return whether table is nullable.
Definition: table.h:1971
handler * file
Definition: table.h:1397
TABLE_SHARE * s
Definition: table.h:1396
A class that represents a field, which also holds a cached value of the field's data type.
Definition: pack_rows.h:60
const enum_field_types field_type
Definition: pack_rows.h:66
Field *const field
Definition: pack_rows.h:62
Column(Field *field)
Definition: pack_rows.cc:37
This struct is primarily used for holding the extracted columns in a hash join.
Definition: pack_rows.h:72
Table(TABLE *tab)
Definition: pack_rows.cc:41
bool copy_null_flags
Definition: pack_rows.h:78
Prealloced_array< Column, 8 > columns
Definition: pack_rows.h:75
TABLE * table
Definition: pack_rows.h:74
#define PSI_NOT_INSTRUMENTED
Definition: validate_password_imp.cc:39