MySQL 8.0.39
Source Code Documentation
pack_rows.h File Reference

Generic routines for packing rows (possibly from multiple tables at the same time) into strings, and then back again. More...

#include <assert.h>
#include <stddef.h>
#include <string.h>
#include "field_types.h"
#include "my_bitmap.h"
#include "my_compiler.h"
#include "my_inttypes.h"
#include "my_table_map.h"
#include "mysql/components/services/bits/psi_bits.h"
#include "prealloced_array.h"
#include "sql/field.h"
#include "sql/handler.h"
#include "sql/table.h"
#include "template_utils.h"

Go to the source code of this file.

Classes

struct  pack_rows::Column
 A class that represents a field, which also holds a cached value of the field's data type. More...
 
struct  pack_rows::Table
 This struct is primarily used for holding the extracted columns in a hash join or BKA join, or the input columns in a streaming aggregation operation. More...
 
class  pack_rows::TableCollection
 A structure that contains a list of input tables for a hash join operation, BKA join operation or a streaming aggregation operation, and some pre-computed properties for the tables. More...
 

Namespaces

namespace  pack_rows
 

Enumerations

enum class  pack_rows::NullRowFlag { pack_rows::kNotNull , pack_rows::kNullWithoutData , pack_rows::kNullWithData }
 Possible values of the NULL-row flag stored by StoreFromTableBuffers(). More...
 

Functions

size_t pack_rows::ComputeRowSizeUpperBound (const TableCollection &tables)
 Count up how many bytes a single row from the given tables will occupy, in "packed" format. More...
 
bool pack_rows::StoreFromTableBuffers (const TableCollection &tables, String *buffer)
 Take the data marked for reading in "tables" and store it in the provided buffer. More...
 
const ucharpack_rows::LoadIntoTableBuffers (const TableCollection &tables, const uchar *ptr)
 Take the data in "ptr" and put it back to the tables' record buffers. More...
 
void pack_rows::RequestRowId (const Prealloced_array< pack_rows::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->position()) if needed. More...
 
void pack_rows::PrepareForRequestRowId (const Prealloced_array< Table, 4 > &tables, table_map tables_to_get_rowid_for)
 
bool pack_rows::ShouldCopyRowId (const TABLE *table)
 
ALWAYS_INLINE ucharpack_rows::StoreFromTableBuffersRaw (const TableCollection &tables, uchar *dptr)
 

Detailed Description

Generic routines for packing rows (possibly from multiple tables at the same time) into strings, and then back again.

Used for (at least) hash join, BKA, and streaming aggregation.