83 }
else if (nth_blob_page == 0) {
103 ulint total_blob_pages = 0;
108 payload_size_zip - 1) /
112 return (total_blob_pages);
148 ref_t blobref(field_ref);
#define Z_OK
Definition: azlib.h:163
rec_t * rec() const
Get the clustered index record pointer.
Definition: lob0lob.h:824
ulint * get_offsets() const
Get the record offsets array.
Definition: lob0lob.h:1027
dict_index_t * index() const
Get the index object.
Definition: lob0lob.h:973
const page_size_t page_size() const
Obtain the page size of the underlying table.
Definition: lob0lob.h:993
Insert or write the compressed BLOB as a single zlib stream.
Definition: lob0zip.h:34
z_stream m_stream
Definition: lob0zip.h:185
dberr_t write_one_blob(size_t blob_j)
Write one blob field data.
Definition: zlob0ins.cc:131
blob_dir_t m_dir
The BLOB directory information.
Definition: lob0zip.h:188
bool validate_blobrefs() const
Verify that all pointers to externally stored columns in the record is be valid.
Definition: lob0zip.h:137
void add_to_blob_dir(const blob_page_info_t &page_info)
Add the BLOB page information to the directory.
Definition: lob0zip.h:180
int write_single_blob_page(big_rec_field_t &field, ulint nth_blob_page)
Write one blob page.
Definition: zlob0ins.cc:232
~zInserter()
Destructor.
Definition: lob0zip.h:191
dberr_t write_one_small_blob(size_t blob_j)
Write one small blob field data.
Definition: zlob0ins.cc:107
int write_into_single_page()
Write contents into a single BLOB page.
Definition: zlob0ins.cc:162
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:78
ulint calc_total_pages()
Calculate the total number of pages needed to store the given blobs.
Definition: lob0zip.h:95
dberr_t finish(bool validate=true)
Cleanup after completing the write of compressed BLOB.
Definition: lob0zip.h:62
zInserter(InsertContext *ctx)
Constructor.
Definition: lob0zip.h:38
dberr_t prepare()
Prepare to write a compressed BLOB.
Definition: zlob0ins.cc:268
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:86
int write_first_page(big_rec_field_t &field)
Write first blob page.
Definition: zlob0ins.cc:32
dberr_t write()
Write all the BLOBs of the clustered index record.
Definition: zlob0ins.cc:292
mem_heap_t * m_heap
Definition: lob0zip.h:184
void commit_blob_mtr()
Commit the BLOB mtr.
Definition: lob0zip.h:120
dberr_t set_page_next()
Make the current page as next page of previous page.
Definition: zlob0ins.cc:308
Page size descriptor.
Definition: page0size.h:49
size_t physical() const
Retrieve the physical page size (on-disk).
Definition: page0size.h:120
dberr_t
Definition: db0err.h:38
@ DB_FAIL
Definition: db0err.h:207
@ DB_SUCCESS
Definition: db0err.h:42
Fido Client Authentication nullptr
Definition: fido_client_plugin.cc:221
constexpr page_type_t FIL_PAGE_TYPE_ZBLOB
First compressed BLOB page.
Definition: fil0fil.h:1227
uint16_t page_type_t
Definition: fil0fil.h:1180
constexpr page_type_t FIL_PAGE_TYPE_ZBLOB2
Subsequent compressed BLOB page.
Definition: fil0fil.h:1230
constexpr page_type_t FIL_PAGE_SDI_ZBLOB
Compressed SDI BLOB page.
Definition: fil0fil.h:1252
constexpr uint32_t FIL_PAGE_TYPE
file page type: FIL_PAGE_INDEX,..., 2 bytes.
Definition: fil0types.h:75
constexpr uint32_t FIL_PAGE_DATA
start of the data on the page
Definition: fil0types.h:110
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:255
#define mtr_commit(m)
Commit a mini-transaction.
Definition: mtr0mtr.h:58
@ MLOG_2BYTES
2 bytes ...
Definition: mtr0types.h:72
Provides the large objects (LOB) module.
Definition: lob0del.h:31
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:627
byte page_t
Type of the index page.
Definition: page0types.h:151
static ulint rec_offs_n_fields(const ulint *offsets)
The following function returns the number of fields in a record.
Definition: rec.h:483
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:136
A slot for a field in a big rec vector.
Definition: data0data.h:786
ulint len
stored data length, in bytes
Definition: data0data.h:801
Storage format for overflow data in a big record, that is, a clustered index record which needs exter...
Definition: data0data.h:829
big_rec_field_t * fields
stored fields
Definition: data0data.h:834
ulint n_fields
number of stored fields
Definition: data0data.h:833
This struct can hold BLOB routines/functions, and state variables, that are common for compressed and...
Definition: lob0ins.h:35
mtr_t m_blob_mtr
The mini trx used to write into blob pages.
Definition: lob0ins.h:86
bool is_index_sdi()
Check if the index is SDI index.
Definition: lob0ins.h:72
InsertContext * m_ctx
The BLOB operation context.
Definition: lob0ins.h:80
dberr_t m_err
Success or failure status of the operation so far.
Definition: lob0ins.h:83
The context for a LOB operation.
Definition: lob0lob.h:1099
const big_rec_t * get_big_rec_vec()
Get the vector containing fields to be stored externally.
Definition: lob0lob.h:1108
The in-memory blob directory.
Definition: lob0lob.h:1174
dberr_t add(const blob_page_info_t &page)
Append the given blob page information.
Definition: lob0lob.h:1188
Information about data stored in one BLOB page.
Definition: lob0lob.h:1122
The struct 'lob::ref_t' represents an external field reference.
Definition: lob0lob.h:197
bool is_null() const
Check if the field reference is made of zeroes.
Definition: lob0lob.h:278
bool is_owner() const
Check if the current row is the owner of the blob.
Definition: lob0lob.h:367
The info structure stored at the beginning of a heap block.
Definition: mem0mem.h:301
unsigned long int ulint
Definition: univ.i:405
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:68
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:56