84 }
else if (nth_blob_page == 0) {
104 ulint total_blob_pages = 0;
109 payload_size_zip - 1) /
113 return (total_blob_pages);
149 ref_t blobref(field_ref);
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
#define Z_OK
Definition: azlib.h:163
rec_t * rec() const
Get the clustered index record pointer.
Definition: lob0lob.h:825
ulint * get_offsets() const
Get the record offsets array.
Definition: lob0lob.h:1028
dict_index_t * index() const
Get the index object.
Definition: lob0lob.h:974
const page_size_t page_size() const
Obtain the page size of the underlying table.
Definition: lob0lob.h:994
Insert or write the compressed BLOB as a single zlib stream.
Definition: lob0zip.h:35
z_stream m_stream
Definition: lob0zip.h:186
dberr_t write_one_blob(size_t blob_j)
Write one blob field data.
Definition: zlob0ins.cc:132
blob_dir_t m_dir
The BLOB directory information.
Definition: lob0zip.h:189
bool validate_blobrefs() const
Verify that all pointers to externally stored columns in the record is be valid.
Definition: lob0zip.h:138
void add_to_blob_dir(const blob_page_info_t &page_info)
Add the BLOB page information to the directory.
Definition: lob0zip.h:181
int write_single_blob_page(big_rec_field_t &field, ulint nth_blob_page)
Write one blob page.
Definition: zlob0ins.cc:233
~zInserter()
Destructor.
Definition: lob0zip.h:192
dberr_t write_one_small_blob(size_t blob_j)
Write one small blob field data.
Definition: zlob0ins.cc:108
int write_into_single_page()
Write contents into a single BLOB page.
Definition: zlob0ins.cc:163
void log_page_type(page_t *blob_page, ulint nth_blob_page)
Write the page type of the BLOB page and also generate the redo log record.
Definition: lob0zip.h:79
ulint calc_total_pages()
Calculate the total number of pages needed to store the given blobs.
Definition: lob0zip.h:96
dberr_t finish(bool validate=true)
Cleanup after completing the write of compressed BLOB.
Definition: lob0zip.h:63
zInserter(InsertContext *ctx)
Constructor.
Definition: lob0zip.h:39
dberr_t prepare()
Prepare to write a compressed BLOB.
Definition: zlob0ins.cc:269
void update_length_in_blobref(big_rec_field_t &field)
For the given blob field, update its length in the blob reference which is available in the clustered...
Definition: zlob0ins.cc:87
int write_first_page(big_rec_field_t &field)
Write first blob page.
Definition: zlob0ins.cc:33
dberr_t write()
Write all the BLOBs of the clustered index record.
Definition: zlob0ins.cc:293
mem_heap_t * m_heap
Definition: lob0zip.h:185
void commit_blob_mtr()
Commit the BLOB mtr.
Definition: lob0zip.h:121
dberr_t set_page_next()
Make the current page as next page of previous page.
Definition: zlob0ins.cc:309
Page size descriptor.
Definition: page0size.h:50
size_t physical() const
Retrieve the physical page size (on-disk).
Definition: page0size.h:121
dberr_t
Definition: db0err.h:39
@ DB_FAIL
Definition: db0err.h:212
@ DB_SUCCESS
Definition: db0err.h:43
constexpr page_type_t FIL_PAGE_TYPE_ZBLOB
First compressed BLOB page.
Definition: fil0fil.h:1268
uint16_t page_type_t
Definition: fil0fil.h:1221
constexpr page_type_t FIL_PAGE_TYPE_ZBLOB2
Subsequent compressed BLOB page.
Definition: fil0fil.h:1271
constexpr page_type_t FIL_PAGE_SDI_ZBLOB
Compressed SDI BLOB page.
Definition: fil0fil.h:1293
constexpr uint32_t FIL_PAGE_TYPE
file page type: FIL_PAGE_INDEX,..., 2 bytes.
Definition: fil0types.h:76
constexpr uint32_t FIL_PAGE_DATA
start of the data on the page
Definition: fil0types.h:111
static void mem_heap_free(mem_heap_t *heap)
Frees the space occupied by a memory heap.
void mlog_write_ulint(byte *ptr, ulint val, mlog_id_t type, mtr_t *mtr)
Writes 1, 2 or 4 bytes to a file page.
Definition: mtr0log.cc:258
#define mtr_commit(m)
Commit a mini-transaction.
Definition: mtr0mtr.h:59
@ MLOG_2BYTES
2 bytes ...
Definition: mtr0types.h:73
Provides the large objects (LOB) module.
Definition: lob0del.h:32
static const byte * btr_rec_get_field_ref(const dict_index_t *index, const byte *rec, const ulint *offsets, ulint n)
Gets a pointer to the externally stored part of a field.
Definition: lob0lob.h:628
byte page_t
Type of the index page.
Definition: page0types.h:152
static ulint rec_offs_n_fields(const ulint *offsets)
The following function returns the number of fields in a record.
Definition: rec.h:510
ulint rec_offs_nth_extern(const dict_index_t *index, const ulint *offsets, ulint n)
Returns nonzero if the extern bit is set in nth field of rec.
Definition: rem0wrec.cc:137
A slot for a field in a big rec vector.
Definition: data0data.h:795
ulint len
stored data length, in bytes
Definition: data0data.h:810
Storage format for overflow data in a big record, that is, a clustered index record which needs exter...
Definition: data0data.h:838
big_rec_field_t * fields
stored fields
Definition: data0data.h:843
ulint n_fields
number of stored fields
Definition: data0data.h:842
This struct can hold BLOB routines/functions, and state variables, that are common for compressed and...
Definition: lob0ins.h:36
mtr_t m_blob_mtr
The mini trx used to write into blob pages.
Definition: lob0ins.h:87
bool is_index_sdi()
Check if the index is SDI index.
Definition: lob0ins.h:73
InsertContext * m_ctx
The BLOB operation context.
Definition: lob0ins.h:81
dberr_t m_err
Success or failure status of the operation so far.
Definition: lob0ins.h:84
The context for a LOB operation.
Definition: lob0lob.h:1100
const big_rec_t * get_big_rec_vec()
Get the vector containing fields to be stored externally.
Definition: lob0lob.h:1109
The in-memory blob directory.
Definition: lob0lob.h:1175
dberr_t add(const blob_page_info_t &page)
Append the given blob page information.
Definition: lob0lob.h:1189
Information about data stored in one BLOB page.
Definition: lob0lob.h:1123
The struct 'lob::ref_t' represents an external field reference.
Definition: lob0lob.h:198
bool is_null() const
Check if the field reference is made of zeroes.
Definition: lob0lob.h:279
bool is_owner() const
Check if the current row is the owner of the blob.
Definition: lob0lob.h:368
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:302
unsigned long int ulint
Definition: univ.i:406
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:105
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:93