MySQL 9.1.0
Source Code Documentation
|
Class to handle temporary allocation of memory for row data. More...
Public Member Functions | |
Row_data_memory (TABLE *table, const uchar *data) | |
Build an object to keep track of a block-local piece of memory for storing a row of data. More... | |
Row_data_memory (TABLE *table, const uchar *data1, const uchar *data2, ulonglong value_options=0) | |
~Row_data_memory () | |
bool | has_memory () const |
Is there memory allocated? More... | |
uchar * | slot (uint s) |
Private Member Functions | |
size_t | max_row_length (TABLE *table, const uchar *data, ulonglong value_options=0) |
Compute an upper bound on the amount of memory needed. More... | |
void | allocate_memory (TABLE *const table, const size_t total_length) |
Private Attributes | |
bool | m_alloc_checked |
bool | m_release_memory_on_destruction |
uchar * | m_memory |
uchar * | m_ptr [2] |
Class to handle temporary allocation of memory for row data.
The responsibilities of the class is to provide memory for packing one or two rows of packed data (depending on what constructor is called).
In order to make the allocation more efficient for rows without blobs, a pointer to the allocated memory is stored in the table structure for such rows. If memory for a table containing a blob field is requested, only memory for that is allocated, and subsequently released when the object is destroyed.
|
inline |
Build an object to keep track of a block-local piece of memory for storing a row of data.
table | Table where the pre-allocated memory is stored. |
data | Pointer to the table record. |
|
inline |
|
inline |
|
inlineprivate |
|
inline |
Is there memory allocated?
true | There is memory allocated |
false | Memory allocation failed |
|
inlineprivate |
Compute an upper bound on the amount of memory needed.
This may return an over-approximation.
table | The table |
data | The server's row record. |
value_options | The value of @global.binlog_row_value_options |
|
inline |
|
mutableprivate |
|
private |
|
private |
|
private |