1#ifndef SQL_PACK_ROWS_H_
2#define SQL_PACK_ROWS_H_
199 return !
table->const_table && !(
table->is_nullable() &&
table->null_row);
207 bool null_row_flag =
false;
208 if (
table->is_nullable()) {
209 null_row_flag =
table->has_null_row();
210 *dptr++ =
uchar{null_row_flag};
214 if (tbl.copy_null_flags) {
215 memcpy(dptr,
table->null_flags,
table->s->null_bytes);
216 dptr +=
table->s->null_bytes;
219 for (
const Column &column : tbl.columns) {
231 memcpy(dptr,
table->file->ref,
table->file->ref_length);
232 dptr +=
table->file->ref_length;
TABLE * table
Pointer to TABLE object that owns this field.
Definition: field.h:683
uint16 field_index() const
Returns field index.
Definition: field.h:1840
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:1229
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:2033
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:167
A structure that contains a list of input tables for a hash join operation, BKA join operation or a s...
Definition: pack_rows.h:84
Prealloced_array< Table, 4 > m_tables
Definition: pack_rows.h:126
void RequestRowId() const
For each of the tables that we should get row IDs for, request that the row ID is filled in (the equi...
Definition: pack_rows.h:112
table_map tables_to_get_rowid_for() const
Definition: pack_rows.h:101
bool has_blob_column() const
Definition: pack_rows.h:97
bool store_rowids() const
Definition: pack_rows.h:99
TableCollection()=default
void RequestRowIdInner() const
Definition: pack_rows.cc:289
bool m_store_rowids
Definition: pack_rows.h:142
void AddTable(TABLE *tab)
Definition: pack_rows.cc:73
size_t ref_and_null_bytes_size() const
Definition: pack_rows.h:95
table_map m_tables_bitmap
Definition: pack_rows.h:130
table_map m_tables_to_get_rowid_for
Definition: pack_rows.h:143
size_t m_ref_and_null_bytes_size
Definition: pack_rows.h:133
void PrepareForRequestRowId() const
For each of the tables that we should get row IDs for, inform the handler than row IDs will be needed...
Definition: pack_rows.cc:302
table_map tables_bitmap() const
Definition: pack_rows.h:93
const Prealloced_array< Table, 4 > & tables() const
Definition: pack_rows.h:91
bool m_has_blob_column
Definition: pack_rows.h:140
This file contains the field type.
enum_field_types
Column types for MySQL Note: Keep include/mysql/components/services/bits/stored_program_bits....
Definition: field_types.h:55
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:99
Some integer typedefs for easier portability.
unsigned char uchar
Definition: my_inttypes.h:52
uint64_t table_map
Definition: my_table_map.h:30
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
mutable_buffer buffer(void *p, size_t n) noexcept
Definition: buffer.h:418
Definition: pack_rows.cc:35
bool ShouldCopyRowId(const TABLE *table)
Definition: pack_rows.h:196
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:230
ALWAYS_INLINE uchar * StoreFromTableBuffersRaw(const TableCollection &tables, uchar *dptr)
Definition: pack_rows.h:202
size_t ComputeRowSizeUpperBound(const TableCollection &tables)
Similar to ComputeRowSizeUpperBoundSansBlobs, but will calculate blob size as well.
Definition: pack_rows.cc:195
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:256
size_t ComputeRowSizeUpperBoundSansBlobs(const TableCollection &tables)
Count up how many bytes a single row from the given tables will occupy, in "packed" format.
Definition: pack_rows.cc:212
Performance schema instrumentation interface.
MY_BITMAP read_set_internal
A bitmap of fields that are explicitly referenced by the query.
Definition: table.h:1739
A class that represents a field, which also holds a cached value of the field's data type.
Definition: pack_rows.h:59
const enum_field_types field_type
Definition: pack_rows.h:65
Field *const field
Definition: pack_rows.h:61
Column(Field *field)
Definition: pack_rows.cc:37
This struct is primarily used for holding the extracted columns in a hash join or BKA join,...
Definition: pack_rows.h:72
Table(TABLE *table_arg)
Definition: pack_rows.cc:42
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:44