1#ifndef SQL_PACK_ROWS_H_
2#define SQL_PACK_ROWS_H_
99 table_map tables_to_store_contents_of_null_rows_for);
225 const TABLE *table = tbl.table;
230 null_row_flag = tbl.store_contents_of_null_rows && table->
has_row()
234 *dptr++ =
static_cast<uchar>(null_row_flag);
241 tbl.table->restore_null_flags();
242 tbl.table->reset_null_row();
247 if (tbl.copy_null_flags) {
252 for (
const Column &column : tbl.columns) {
265 tbl.table->set_null_row();
TABLE * table
Pointer to TABLE object that owns this field.
Definition: field.h:681
uint16 field_index() const
Returns field index.
Definition: field.h:1835
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:1224
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:1871
Definition: sql_optimizer.h:133
A typesafe replacement for DYNAMIC_ARRAY.
Definition: prealloced_array.h:71
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:168
uchar * ref
Pointer to current row.
Definition: handler.h:4430
uint ref_length
Length of ref (1-8 or the clustered key length)
Definition: handler.h:4498
A structure that contains a list of input tables for a hash join operation, BKA join operation or a s...
Definition: pack_rows.h:93
Prealloced_array< Table, 4 > m_tables
Definition: pack_rows.h:118
void AddTable(TABLE *tab, bool store_contents_of_null_rows)
Definition: pack_rows.cc:78
table_map tables_to_get_rowid_for() const
Definition: pack_rows.h:111
bool has_blob_column() const
Definition: pack_rows.h:107
bool store_rowids() const
Definition: pack_rows.h:109
TableCollection()=default
bool m_store_rowids
Definition: pack_rows.h:134
size_t ref_and_null_bytes_size() const
Definition: pack_rows.h:105
table_map m_tables_bitmap
Definition: pack_rows.h:122
table_map m_tables_to_get_rowid_for
Definition: pack_rows.h:135
size_t m_ref_and_null_bytes_size
Definition: pack_rows.h:125
table_map tables_bitmap() const
Definition: pack_rows.h:103
const Prealloced_array< Table, 4 > & tables() const
Definition: pack_rows.h:101
bool m_has_blob_column
Definition: pack_rows.h:132
This file contains the field type.
enum_field_types
Column types for MySQL.
Definition: field_types.h:53
static bool bitmap_is_set(const MY_BITMAP *map, uint bit)
Definition: my_bitmap.h:95
Header for compiler-dependent features.
#define ALWAYS_INLINE
Definition: my_compiler.h:110
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
uint64_t table_map
Definition: my_table_map.h:30
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:420
Definition: pack_rows.cc:36
void PrepareForRequestRowId(const Prealloced_array< Table, 4 > &tables, table_map tables_to_get_rowid_for)
Definition: pack_rows.cc:293
bool ShouldCopyRowId(const TABLE *table)
Definition: pack_rows.h:216
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:212
ALWAYS_INLINE uchar * StoreFromTableBuffersRaw(const TableCollection &tables, uchar *dptr)
Definition: pack_rows.h:222
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:196
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:238
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:282
NullRowFlag
Possible values of the NULL-row flag stored by StoreFromTableBuffers().
Definition: pack_rows.h:147
@ kNullWithoutData
The row is NULL-complemented. No column values are stored in the buffer.
@ kNotNull
The row is not a NULL-complemented one.
@ kNullWithData
The row is NULL-complemented.
Performance schema instrumentation interface.
uint null_bytes
Definition: table.h:840
uchar * null_flags
Pointer to the null flags of record[0].
Definition: table.h:1583
bool has_null_row() const
Definition: table.h:2093
bool null_row
Definition: table.h:1728
bool const_table
Definition: table.h:1750
MY_BITMAP read_set_internal
A bitmap of fields that are explicitly referenced by the query.
Definition: table.h:1648
bool is_nullable() const
Return whether table is nullable.
Definition: table.h:1995
bool is_started() const
Definition: table.h:2026
handler * file
Definition: table.h:1401
bool has_row() const
Definition: table.h:2090
TABLE_SHARE * s
Definition: table.h:1400
A class that represents a field, which also holds a cached value of the field's data type.
Definition: pack_rows.h:61
const enum_field_types field_type
Definition: pack_rows.h:67
Field *const field
Definition: pack_rows.h:63
Column(Field *field)
Definition: pack_rows.cc:38
This struct is primarily used for holding the extracted columns in a hash join or BKA join,...
Definition: pack_rows.h:74
Table(TABLE *table_arg)
Definition: pack_rows.cc:43
bool copy_null_flags
Definition: pack_rows.h:80
bool store_contents_of_null_rows
Definition: pack_rows.h:87
Prealloced_array< Column, 8 > columns
Definition: pack_rows.h:77
TABLE * table
Definition: pack_rows.h:76
#define PSI_NOT_INSTRUMENTED
Definition: validate_password_imp.cc:42