My Project
|
Public Member Functions | |
Row_data_memory (TABLE *table, size_t const len1) | |
Row_data_memory (TABLE *table, size_t const len1, size_t const len2) | |
bool | has_memory () const |
uchar * | slot (uint s) |
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 "simple" rows, i.e., rows that do not contain any blobs, a pointer to the allocated memory is of memory is stored in the table structure for simple 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.
Row_data_memory::Row_data_memory | ( | TABLE * | table, |
size_t const | len1 | ||
) | [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. |
length | Length of data that is needed, if the record contain blobs. |
bool Row_data_memory::has_memory | ( | ) | const [inline] |
Is there memory allocated?
true | There is memory allocated |
false | Memory allocation failed |