40struct z_index_entry_t;
59 static const uint8_t
SIZE = 4;
155 byte *node =
nullptr;
169 byte *node =
nullptr;
197 std::ostream &
print(std::ostream &out)
const {
199 <<
", this=" <<
addr() <<
", frame=" << (
void *)
m_frame
200 <<
", m_node=" << (
void *)
m_node <<
"]";
239 return (obj.
print(out));
455 std::ostream &
print(std::ostream &out)
const {
457 <<
", last=" <<
get_last() <<
", this=" <<
addr() <<
"]";
466 cur = cur.get_next_node()) {
467 out << cur << std::endl;
485 return (obj.
print(out));
615 uint16_t offset =
static_cast<uint16_t
>(
m_node - frame);
760 std::ostream &
print(std::ostream &out)
const;
772 return (obj.
print(out));
1097 for (
ulint i = 0; i <
n; ++i) {
1102 entry.push_back(free_lst);
1186 ut_ad(mtr !=
nullptr);
1273 std::ostream &
print(std::ostream &out)
const {
1276 out <<
"[frag_node_t: " <<
m_node <<
", len=" << len <<
"/" <<
payload()
1279 out <<
"[frag_node_t: null, len=0]";
1316 byte *p2 = next.
ptr();
1319 if (p2 == (p1 + len1)) {
1346 return (obj.
print(out));
1415 entry.update(*
this);
1522 for (
ulint frag_id = 0; frag_id <
n; frag_id++) {
1548 out <<
"FRAG IDS: " << std::endl;
1550 for (
ulint frag_id = 0; frag_id <
n; frag_id++) {
1644 while (!free_node.
is_null()) {
1647 while (!frag_node.
is_null()) {
1783 return (
"FIL_PAGE_TYPE_ZLOB_FRAG");
1810 std::ostream &
print(std::ostream &out)
const {
1841 out <<
"[Free List: " << free_lst <<
"]" << std::endl;
1844 cur = cur.get_next_node()) {
1846 out << frag << std::endl;
1857 out <<
"[Frag List: " << frag_lst <<
"]" << std::endl;
1860 cur = cur.get_next_node()) {
1862 out << frag << std::endl;
1874 for (
ulint frag_id = 0; frag_id <
n; ++frag_id) {
1876 out <<
"[frag_id=" << frag_id <<
", addr=" << off <<
"]" << std::endl;
1935 mtr_t *mtr,
bool bulk);
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:46
uint32_t page_no_t
Page number.
Definition: api0api.h:44
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:250
void btr_page_free_low(dict_index_t *index, buf_block_t *block, ulint level, mtr_t *mtr)
Frees a file page used in an index tree.
Definition: btr0btr.cc:553
static buf_frame_t * buf_block_get_frame(const buf_block_t *block)
Gets a pointer to the memory frame of a block.
buf_block_t * buf_page_get(const page_id_t &id, const page_size_t &size, ulint latch, ut::Location location, mtr_t *mtr)
NOTE! The following macros should be used instead of buf_page_get_gen, to improve debugging.
Definition: buf0buf.h:440
The node of page list.
Definition: lob0impl.h:50
paddr_t addr() const
Obtain the offset of the page list node within the given page frame.
Definition: lob0impl.h:182
static const uint16_t OFFSET_PREV
Offset of the previous node.
Definition: lob0impl.h:53
void set_node(byte *node)
Set the page list node to the given value.
Definition: lob0impl.h:210
byte * m_frame
The page frame where this page list exists.
Definition: lob0impl.h:229
paddr_t get_prev() const
Get the offset of the previous page list node.
Definition: lob0impl.h:145
plist_node_t get_next_node() const
Get the next page list node.
Definition: lob0impl.h:153
void set_frame(byte *frame)
Set the page frame to the given value.
Definition: lob0impl.h:206
byte * get_frame() const
Get the page frame where this page list exists.
Definition: lob0impl.h:218
std::ostream & print(std::ostream &out) const
Print the page list node into the given output stream.
Definition: lob0impl.h:197
plist_node_t(const plist_node_t &other)=default
Copy constructor.
byte * ptr() const
Obtain the memory location of the page list node.
Definition: lob0impl.h:188
static const uint16_t OFFSET_NEXT
Offset of the next node.
Definition: lob0impl.h:56
void set_prev_node(plist_node_t &prev)
Set the previous page list node.
Definition: lob0impl.h:127
plist_node_t(byte *frame, byte *node)
Constructor.
Definition: lob0impl.h:78
bool is_equal(const plist_node_t &that) const
Definition: lob0impl.h:220
paddr_t get_next() const
Get the offset of the next page list node.
Definition: lob0impl.h:149
plist_node_t()
Default constructor.
Definition: lob0impl.h:67
void set_prev(paddr_t addr)
Set the offset of the previous node.
Definition: lob0impl.h:118
void set_mtr(mtr_t *mtr)
Set the mini-transaction context to the given value.
Definition: lob0impl.h:214
bool is_before(const plist_node_t &node) const
Check if the current node is before the given node in the page (w.r.t the offset).
Definition: lob0impl.h:100
bool is_null() const
Check if the given page list node is null.
Definition: lob0impl.h:192
void init()
Initialize the current page list node.
Definition: lob0impl.h:108
void set_next_node(const plist_node_t &next)
Set the next page list node.
Definition: lob0impl.h:141
plist_node_t(mtr_t *mtr)
Constructor.
Definition: lob0impl.h:63
mtr_t * m_mtr
The mini-transaction context.
Definition: lob0impl.h:235
void set_next(paddr_t addr)
Set the offset of the next node.
Definition: lob0impl.h:131
plist_node_t get_prev_node() const
Get the previous page list node.
Definition: lob0impl.h:167
static const uint8_t SIZE
The size of a page list node.
Definition: lob0impl.h:59
byte * m_node
The plist node is located at this address.
Definition: lob0impl.h:232
plist_node_t(byte *frame, byte *node, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:87
plist_node_t(mtr_t *mtr, byte *frame)
Constructor.
Definition: lob0impl.h:72
plist_node_t & operator=(const plist_node_t &)=default
Page identifier.
Definition: buf0types.h:206
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
static const page_size_t dict_table_page_size(const dict_table_t *table)
Get the table page size.
static space_id_t dict_index_get_space(const dict_index_t *index)
Gets the space id of the root of the index tree.
fil_addr_t fil_addr_null
The null file address.
Definition: fil0fil.cc:325
constexpr page_type_t FIL_PAGE_TYPE_LOB_INDEX
Index pages of uncompressed LOB.
Definition: fil0fil.h:1289
uint16_t page_type_t
Definition: fil0fil.h:1208
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_FRAG_ENTRY
Index pages of fragment pages (compressed LOB).
Definition: fil0fil.h:1311
constexpr page_no_t FIL_NULL
'null' (undefined) page offset in the context of file spaces
Definition: fil0fil.h:1146
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_FRAG
Fragment pages of compressed LOB.
Definition: fil0fil.h:1308
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_DATA
Data pages of compressed LOB.
Definition: fil0fil.h:1301
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_INDEX
Index pages of compressed LOB.
Definition: fil0fil.h:1305
constexpr uint32_t FIL_PAGE_TYPE
file page type: FIL_PAGE_INDEX,..., 2 bytes.
Definition: fil0types.h:75
constexpr uint32_t FIL_PAGE_OFFSET
page offset inside space
Definition: fil0types.h:45
constexpr uint32_t FIL_PAGE_DATA
start of the data on the page
Definition: fil0types.h:110
constexpr size_t FIL_ADDR_SIZE
Address size is 6 bytes.
Definition: fil0types.h:127
constexpr uint32_t FIL_PAGE_SPACE_ID
alias for space id
Definition: fil0types.h:107
constexpr uint32_t FIL_PAGE_NEXT
if there is a 'natural' successor of the page, its offset.
Definition: fil0types.h:60
constexpr uint32_t FIL_PAGE_PREV
if there is a 'natural' predecessor of the page, its offset.
Definition: fil0types.h:50
constexpr uint32_t FIL_PAGE_DATA_END
size of the page trailer
Definition: fil0types.h:118
static byte * fut_get_ptr(space_id_t space, const page_size_t &page_size, fil_addr_t addr, rw_lock_type_t rw_latch, mtr_t *mtr, buf_block_t **ptr_block=nullptr)
Gets a pointer to a file address and latches the page.
void flst_add_last(flst_base_node_t *base, flst_node_t *node, mtr_t *mtr)
Adds a node as the last node in a list.
Definition: fut0lst.cc:89
void flst_remove(flst_base_node_t *base, flst_node_t *node2, mtr_t *mtr)
Removes a node.
Definition: fut0lst.cc:286
void flst_add_first(flst_base_node_t *base, flst_node_t *node, mtr_t *mtr)
Adds a node as the first node in a list.
Definition: fut0lst.cc:132
File-based list utilities.
static void flst_write_addr(fil_faddr_t *faddr, fil_addr_t addr, mtr_t *mtr)
Writes a file address.
byte flst_base_node_t
Definition: fut0lst.h:45
static fil_addr_t flst_read_addr(const fil_faddr_t *faddr, mtr_t *mtr)
Reads a file address.
byte flst_node_t
Definition: fut0lst.h:46
Implements the large objects (LOB) module.
Utilities for converting data from the database file to the machine format.
static uint16_t mach_read_from_2(const byte *b)
The following function is used to fetch data from 2 consecutive bytes.
static uint32_t mach_read_from_4(const byte *b)
The following function is used to fetch data from 4 consecutive bytes.
static void mach_write_to_6(byte *b, uint64_t id)
The following function is used to store data in 6 consecutive bytes.
Mini-transaction logging routines.
void mlog_log_string(byte *ptr, ulint len, mtr_t *mtr)
Logs a write of a string to a file page buffered in the buffer pool.
Definition: mtr0log.cc:344
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_read_ulint(p, t, m)
Read 1 - 4 bytes from a file page buffered in the buffer pool.
Definition: mtr0mtr.h:86
Mini-transaction buffer global types.
@ MLOG_4BYTES
4 bytes ...
Definition: mtr0types.h:75
@ MLOG_1BYTE
one byte is written
Definition: mtr0types.h:69
@ MLOG_2BYTES
2 bytes ...
Definition: mtr0types.h:72
constexpr value_type blob
Definition: classic_protocol_constants.h:271
PT & ref(PT *tp)
Definition: tablespace_impl.cc:358
Provides the large objects (LOB) module.
Definition: lob0del.h:31
dberr_t z_insert_chunk(dict_index_t *index, z_first_page_t &first, trx_t *trx, byte *blob, ulint len, z_index_entry_t *out_entry, mtr_t *mtr, bool bulk)
Insert one chunk of input.
Definition: lob0impl.cc:326
ulint paddr_t
Definition: lob0impl.h:46
ulint frag_id_t
Definition: lob0impl.h:488
const ulint KB16
Definition: lob0impl.h:490
dberr_t z_print_info(const dict_index_t *index, const lob::ref_t &ref, std::ostream &out)
Print information about the given compressed lob.
Definition: lob0impl.cc:533
const ulint FRAG_ID_NULL
Definition: lob0impl.h:489
std::ostream & operator<<(std::ostream &out, const plist_node_t &obj)
Definition: lob0impl.h:238
static page_t * page_align(const void *ptr)
Gets the start of a page.
byte page_t
Type of the index page.
Definition: page0types.h:151
struct result result
Definition: result.h:33
required string type
Definition: replication_group_member_actions.proto:33
Definition: completion_hash.h:34
The buffer control block structure.
Definition: buf0buf.h:1750
page_type_t get_page_type() const
Get the page type of the current buffer block.
Definition: buf0buf.h:1954
page_no_t get_next_page_no() const
Get the next page number of the current buffer block.
Definition: buf0buf.h:1942
page_no_t get_page_no() const
Get the page number of the current buffer block.
Definition: buf0buf.h:1938
Data structure for an index.
Definition: dict0mem.h:1045
dict_table_t * table
back pointer to table
Definition: dict0mem.h:1059
File space address.
Definition: fil0fil.h:1163
uint32_t boffset
Byte offset within the page.
Definition: fil0fil.h:1195
Definition: lob0util.h:41
mtr_t * m_mtr
Definition: lob0util.h:128
dict_index_t * m_index
Definition: lob0util.h:129
buf_block_t * m_block
Definition: lob0util.h:127
byte * frame() const
Definition: lob0util.h:98
The first page of an uncompressed LOB.
Definition: lob0first.h:42
The fragment node represents one fragment.
Definition: lob0impl.h:1136
frag_node_t get_next_frag()
Definition: lob0impl.h:1284
bool is_equal(const plist_node_t &node) const
Definition: lob0impl.h:1333
bool is_equal(const frag_node_t &that) const
Definition: lob0impl.h:1329
void set_total_len(ulint len)
Definition: lob0impl.h:1195
bool is_null() const
Definition: lob0impl.h:1327
ulint get_frag_id() const
Definition: lob0impl.h:1236
static ulint overhead()
Amount of space that will be used up by meta data.
Definition: lob0impl.h:1172
frag_node_t get_prev_node()
Definition: lob0impl.h:1292
static ulint header_size()
Only the header size.
Definition: lob0impl.h:1175
plist_node_t m_node
The page list node.
Definition: lob0impl.h:1338
byte * frag_begin() const
Definition: lob0impl.h:1191
byte * data_begin() const
Definition: lob0impl.h:1193
static const ulint OFFSET_LEN
The offset where the length of fragment is stored.
Definition: lob0impl.h:1139
frag_node_t get_next_node()
Definition: lob0impl.h:1290
frag_node_t(byte *frame, byte *ptr, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:1165
byte * end_ptr() const
Gets the pointer just after the current fragment.
Definition: lob0impl.h:1264
bool merge(frag_node_t &next)
Merge the current fragment node with the given next fragment node.
Definition: lob0impl.h:1311
void decr_length_by_2()
Decrement the total length of this fragment by 2 bytes.
Definition: lob0impl.h:1211
void set_frag_id(ulint id)
Definition: lob0impl.h:1230
frag_node_t(const plist_node_t &node, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:1154
frag_node_t get_prev_frag()
Definition: lob0impl.h:1294
frag_node_t(byte *frame, byte *ptr)
Definition: lob0impl.h:1157
static const ulint OFFSET_DATA
The offset where fragment data is stored.
Definition: lob0impl.h:1145
byte * ptr() const
Gets the pointer to the beginning of the current fragment.
Definition: lob0impl.h:1255
ulint payload() const
Get the space available in this fragment for storing data.
Definition: lob0impl.h:1241
bool is_before(const frag_node_t &frag) const
Definition: lob0impl.h:1219
static const ulint OFFSET_FRAG_ID
The offset where fragment id is stored.
Definition: lob0impl.h:1142
byte * frame() const
Get the page frame.
Definition: lob0impl.h:1271
paddr_t addr() const
Get the offset of the current fragment within page.
Definition: lob0impl.h:1250
mtr_t * m_mtr
The mini-transaction context.
Definition: lob0impl.h:1342
void set_frag_id_null()
Definition: lob0impl.h:1223
void incr_length_by_2()
Increment the total length of this fragment by 2 bytes.
Definition: lob0impl.h:1202
static const ulint SIZE_OF_PAGE_DIR_ENTRY
The size of a page directory entry in a fragment page in bytes.
Definition: lob0impl.h:1149
frag_node_t(byte *frame, byte *ptr, ulint len, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:1184
std::ostream & print(std::ostream &out) const
Definition: lob0impl.h:1273
ulint get_total_len() const
Get the total length of this fragment, including its metadata.
Definition: lob0impl.h:1244
The node page (also can be called as the index page) contains a list of index_entry_t objects.
Definition: lob0impl.h:494
node_page_t(buf_block_t *block, mtr_t *mtr)
Definition: lob0impl.h:506
byte * nodes_begin() const
Definition: lob0impl.h:550
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:496
static ulint payload()
Definition: lob0impl.h:535
static ulint max_space_available()
Definition: lob0impl.h:539
node_page_t()=default
Default ctor.
buf_block_t * alloc(first_page_t &first_page, bool bulk)
Allocate one node page.
Definition: lob0impl.cc:69
void set_version_0()
Definition: lob0impl.h:499
static const ulint LOB_PAGE_DATA
Definition: lob0impl.h:497
void set_page_type()
Definition: lob0impl.h:545
void dealloc()
Definition: lob0impl.h:530
buf_block_t * load_x(page_id_t page_id, page_size_t page_size)
Definition: lob0impl.h:524
node_page_t(buf_block_t *block, mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:508
node_page_t(buf_block_t *block)
Constructor.
Definition: lob0impl.h:516
static ulint node_count()
Get the number of index entries this page can hold.
Definition: lob0impl.cc:1306
node_page_t(mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:511
The base node of page list.
Definition: lob0impl.h:243
ulint get_len() const
Definition: lob0impl.h:385
void set_last(paddr_t addr)
Definition: lob0impl.h:442
void set_len(ulint len)
Definition: lob0impl.h:413
void add_to_empty(plist_node_t &node)
Definition: lob0impl.h:357
void decr_len()
Definition: lob0impl.h:426
bool empty() const
Definition: lob0impl.h:383
plist_node_t get_last_node() const
Definition: lob0impl.h:403
static const ulint SIZE
The total size (in bytes) of a page list base node.
Definition: lob0impl.h:257
void push_back(plist_node_t &node)
Definition: lob0impl.h:366
void incr_len()
Definition: lob0impl.h:419
paddr_t addr() const
Definition: lob0impl.h:453
void set_first(paddr_t addr)
Definition: lob0impl.h:436
paddr_t get_last() const
Definition: lob0impl.h:401
void insert_before(plist_node_t &node3, plist_node_t &node2)
Insert node2 before node3.
Definition: lob0impl.h:335
std::ostream & print_list(std::ostream &out) const
Definition: lob0impl.h:461
static const ulint OFFSET_LEN
The offset where the length of the page list is stored.
Definition: lob0impl.h:246
plist_base_node_t(byte *frame, byte *base, mtr_t *mtr)
Definition: lob0impl.h:259
std::ostream & print(std::ostream &out) const
Definition: lob0impl.h:455
bool validate() const
Validate the page list.
Definition: lob0impl.cc:53
void init()
Definition: lob0impl.h:262
plist_node_t get_first_node() const
Definition: lob0impl.h:391
void remove(plist_node_t &node)
Definition: lob0impl.h:270
mtr_t * m_mtr
Definition: lob0impl.h:480
byte * m_base
Definition: lob0impl.h:479
void insert_after(plist_node_t &node1, plist_node_t &node2)
Insert node2 after node1.
Definition: lob0impl.h:312
static const ulint OFFSET_FIRST
The offset where the first node is located.
Definition: lob0impl.h:250
byte * m_frame
Definition: lob0impl.h:478
void push_front(plist_node_t &node)
Definition: lob0impl.h:294
paddr_t get_first() const
Definition: lob0impl.h:387
static const ulint OFFSET_LAST
The offset where the last node is located.
Definition: lob0impl.h:254
plist_node_t get_node(paddr_t addr)
Definition: lob0impl.h:448
The struct 'lob::ref_t' represents an external field reference.
Definition: lob0lob.h:197
The data page holding the zlob.
Definition: lob0impl.h:891
static const ulint OFFSET_DATA_LEN
Definition: lob0impl.h:896
dict_index_t * m_index
Definition: lob0impl.h:1014
void set_data_len(ulint len)
Definition: lob0impl.h:974
fil_addr_t get_self_addr() const
Definition: lob0impl.h:1005
buf_block_t * alloc(page_no_t hint, bool bulk)
Allocate one data page.
Definition: lob0impl.cc:1275
void dealloc()
Free this data page holding the zlob data.
Definition: lob0impl.h:936
void set_version_0()
Definition: lob0impl.h:949
void set_trx_id_no_redo(trx_id_t tid)
Update the header with given transaction identifier, without writing redo log records.
Definition: lob0impl.h:995
byte * frame() const
Definition: lob0impl.h:1010
void set_trx_id(trx_id_t tid)
Definition: lob0impl.h:984
void set_next_page(page_no_t page_no)
Set the next page.
Definition: lob0impl.h:956
void set_page_type()
Set the correct page type.
Definition: lob0impl.h:942
static const ulint OFFSET_DATA_BEGIN
Definition: lob0impl.h:902
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:893
ulint get_data_len() const
Definition: lob0impl.h:980
mtr_t * m_mtr
Definition: lob0impl.h:1013
z_data_page_t(buf_block_t *block)
Definition: lob0impl.h:917
static const ulint OFFSET_TRX_ID
Definition: lob0impl.h:899
page_no_t get_page_no() const
Get the page number.
Definition: lob0impl.h:1001
buf_block_t * m_block
Definition: lob0impl.h:1012
byte * begin_data_ptr() const
Definition: lob0impl.h:972
void set_space_id_no_redo(space_id_t space_id)
Write the space identifier to the page header, without generating redo log records.
Definition: lob0impl.h:923
z_data_page_t(mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:909
ulint payload()
Definition: lob0impl.h:904
void init()
Definition: lob0impl.h:962
z_data_page_t(buf_block_t *block, mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:912
The first page of an zlob.
Definition: zlob0first.h:37
An entry representing one fragment page.
Definition: lob0impl.h:554
static const ulint OFFSET_PREV
Offset within frag entry pointing to prev frag entry.
Definition: lob0impl.h:557
void set_big_free_len(ulint n)
Set the big free frag bytes.
Definition: lob0impl.h:752
ulint get_big_free_len() const
Get the biggest free frag bytes.
Definition: lob0impl.h:740
void reset(flst_node_t *node)
Point to another frag entry.
Definition: lob0impl.h:653
void remove(flst_base_node_t *bnode)
Remove this node from the given list.
Definition: lob0impl.h:629
void set_prev(const fil_addr_t &addr)
Set the previous frag entry as null.
Definition: lob0impl.h:663
void push_front(flst_base_node_t *bnode)
Add this node as the first node in the given list.
Definition: lob0impl.h:645
void init()
Initialize the fragment entry contents.
Definition: lob0impl.h:592
void free_frag_page(mtr_t *mtr, dict_index_t *index)
Free the fragment page pointed to by this entry.
Definition: lob0impl.cc:135
static const ulint OFFSET_N_FRAGS
Number of used fragments.
Definition: lob0impl.h:566
void set_null()
Set the current fragment entry to null.
Definition: lob0impl.h:606
z_frag_entry_t()
Constructor.
Definition: lob0impl.h:584
page_no_t get_page_no() const
Get the frag page number.
Definition: lob0impl.h:694
mtr_t * m_mtr
The mini-transaction context for operating on this fragment entry.
Definition: lob0impl.h:768
void purge(flst_base_node_t *used_lst, flst_base_node_t *free_lst)
Definition: lob0impl.cc:114
z_frag_entry_t(mtr_t *mtr)
Constructor.
Definition: lob0impl.h:587
void set_n_frags(ulint frags) const
Set the frag page number.
Definition: lob0impl.h:716
flst_node_t * m_node
The location where the fragment entry node is located.
Definition: lob0impl.h:764
static const ulint SIZE
Total size of one frag entry.
Definition: lob0impl.h:578
std::ostream & print(std::ostream &out) const
Definition: lob0impl.cc:105
ulint get_used_len() const
Get the used bytes.
Definition: lob0impl.h:723
static const ulint OFFSET_PAGE_NO
Offset within frag entry holding the page number of frag page.
Definition: lob0impl.h:563
void push_back(flst_base_node_t *bnode)
Add this node as the last node in the given list.
Definition: lob0impl.h:637
static const ulint OFFSET_NEXT
Offset within frag entry pointing to next frag entry.
Definition: lob0impl.h:560
static const ulint OFFSET_TOTAL_FREE_LEN
Total free space in bytes.
Definition: lob0impl.h:572
fil_addr_t get_self_addr() const
Definition: lob0impl.h:612
ulint get_n_frags() const
Get the frag page number.
Definition: lob0impl.h:711
void set_total_free_len(ulint n)
Set the total free bytes.
Definition: lob0impl.h:745
void set_prev_null()
Set the previous frag entry as null.
Definition: lob0impl.h:656
fil_addr_t get_next() const
Get the location of next frag entry.
Definition: lob0impl.h:689
void update(const z_frag_page_t &frag_page)
Update the current fragment entry with information about the given fragment page.
Definition: lob0impl.cc:125
z_frag_entry_t(flst_node_t *node, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:581
ulint get_total_free_len() const
Get the total cumulative free bytes.
Definition: lob0impl.h:735
bool is_null() const
Check if the current fragment entry is null.
Definition: lob0impl.h:610
void set_next_null()
Set the next frag entry as null.
Definition: lob0impl.h:675
fil_addr_t get_prev() const
Get the location of previous frag entry.
Definition: lob0impl.h:670
static const ulint OFFSET_BIG_FREE_LEN
The biggest free frag space in bytes.
Definition: lob0impl.h:575
static const ulint OFFSET_USED_LEN
Used space in bytes.
Definition: lob0impl.h:569
void set_page_no(page_no_t page_no) const
Set the frag page number.
Definition: lob0impl.h:699
void set_used_len(ulint used) const
Set the used bytes.
Definition: lob0impl.h:728
void set_next(const fil_addr_t &addr)
Set the next frag entry.
Definition: lob0impl.h:682
A frag nodes page containing an array of z_frag_entry_t objects.
Definition: lob0impl.h:1018
z_frag_node_page_t(mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:1023
mtr_t * m_mtr
The mini-transaction context.
Definition: lob0impl.h:1121
void set_version_0()
Definition: lob0impl.h:1054
buf_block_t * load_x(page_no_t page_no)
Load the given compressed LOB fragment page.
Definition: lob0impl.h:1082
static const ulint LOB_PAGE_DATA
Definition: lob0impl.h:1021
void init(flst_base_node_t *free_lst)
Definition: lob0impl.h:1093
buf_block_t * alloc(z_first_page_t &first, bool bulk)
Allocate a fragment nodes page.
Definition: lob0impl.cc:617
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:1020
void dealloc()
Definition: lob0impl.h:1074
void set_space_id_no_redo(space_id_t space_id)
Write the space identifier to the page header, without generating redo log records.
Definition: lob0impl.h:1034
buf_block_t * m_block
The buffer block of the fragment page.
Definition: lob0impl.h:1118
void set_next_page_no(page_no_t page_no)
Set the next page number.
Definition: lob0impl.h:1048
z_frag_node_page_t(buf_block_t *block)
Constructor.
Definition: lob0impl.h:1028
page_no_t get_next_page_no() const
Get the next page number.
Definition: lob0impl.h:1066
byte * frame() const
Definition: lob0impl.h:1115
ulint get_n_frag_entries() const
Definition: lob0impl.h:1111
void set_page_type()
Set the correct page type.
Definition: lob0impl.h:1040
page_no_t get_page_no() const
Get the page number.
Definition: lob0impl.h:1061
ulint payload() const
Definition: lob0impl.h:1106
dict_index_t * m_index
The index to which the LOB belongs.
Definition: lob0impl.h:1124
The fragment page.
Definition: lob0impl.h:1351
const char * get_page_type_str() const
Definition: lob0impl.h:1780
fil_addr_t get_frag_entry_addr() const
Definition: lob0impl.h:1896
z_frag_page_t(mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: lob0impl.h:1391
static const ulint OFFSET_FRAG_ENTRY
The location of z_frag_entry_t for this page.
Definition: lob0impl.h:1356
void dealloc_with_entry(z_first_page_t &first, mtr_t *alloc_mtr)
Free the fragment page along with its entry.
Definition: lob0impl.cc:759
ulint space_used_by_dir() const
Definition: lob0impl.h:1514
byte * frame() const
Definition: lob0impl.h:1808
std::ostream & print(std::ostream &out) const
Definition: lob0impl.h:1810
page_no_t get_next_page_no() const
Get the next page number.
Definition: lob0impl.h:1577
void set_page_next(page_no_t page_no)
Set the next page.
Definition: lob0impl.h:1563
std::ostream & print_frags_in_order(std::ostream &out) const
Definition: lob0impl.cc:802
flst_node_t * addr2ptr_x(fil_addr_t &addr)
Definition: lob0impl.h:1422
bool validate_lists() const
Definition: lob0impl.h:1639
buf_block_t * m_block
Definition: lob0impl.h:1918
ulint payload()
The maximum free space available in a fragment page.
Definition: lob0impl.h:1788
static const ulint OFFSET_FRAGS_BEGIN
The offset within page where the fragments can occupy .
Definition: lob0impl.h:1366
paddr_t frag_id_to_addr(ulint frag_id) const
Definition: lob0impl.h:1471
ulint get_total_free_len() const
Get the total cumulative free space in this page.
Definition: lob0impl.cc:861
static const ulint SIZE_OF_PAGE_DIR_ENTRY
Definition: lob0impl.h:1376
std::ostream & print_frag_id(std::ostream &out)
Definition: lob0impl.h:1546
z_frag_page_t(buf_block_t *block, mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: lob0impl.h:1382
std::ostream & print_frag_list(std::ostream &out) const
Definition: lob0impl.h:1851
static const ulint OFFSET_FREE_LIST
The offset within page where the free space list begins.
Definition: lob0impl.h:1359
static const ulint OFFSET_PAGE_DIR_ENTRY_FIRST
Offset of first page directory entry (from end)
Definition: lob0impl.h:1373
dict_index_t * m_index
Definition: lob0impl.h:1920
void set_mtr(mtr_t *mtr)
Definition: lob0impl.h:1882
void dealloc_frag_id(ulint frag_id)
Deallocate the given fragment id.
Definition: lob0impl.h:1913
static ulint max_payload(dict_index_t *index)
The maximum free space available in a fragment page.
Definition: lob0impl.h:1792
void incr_n_dir_entries() const
Definition: lob0impl.h:1495
plist_base_node_t free_list() const
Definition: lob0impl.h:1761
ulint get_nth_dir_entry(ulint frag_id)
Definition: lob0impl.h:1477
void dealloc_fragment(ulint frag_id)
Definition: lob0impl.h:1741
z_frag_page_t(buf_block_t *block)
Constructor.
Definition: lob0impl.h:1396
plist_base_node_t frag_list() const
Definition: lob0impl.h:1766
static const ulint OFFSET_FRAGS_LIST
The offset within page where the fragment list begins.
Definition: lob0impl.h:1362
void set_page_type()
Definition: lob0impl.h:1771
void insert_into_free_list(frag_node_t &frag)
Definition: lob0impl.h:1657
bool is_last_frag(const frag_node_t &node) const
Determine if the given fragment node is the last fragment node adjacent to the directory.
Definition: lob0impl.h:1891
buf_block_t * alloc(z_first_page_t &first, page_no_t hint, bool bulk)
Allocate the fragment page.
Definition: lob0impl.cc:544
static const ulint OFFSET_PAGE_DIR_ENTRY_COUNT
Offset of number of page directory entries (from end)
Definition: lob0impl.h:1370
page_no_t get_prev_page_no() const
Get the prev page number.
Definition: lob0impl.h:1588
void dealloc_fragment(frag_node_t &frag)
Definition: lob0impl.h:1900
ulint get_page_size() const
Definition: lob0impl.h:1509
static bool can_data_fit(dict_index_t *index, ulint data_size)
Determine if the given length of data can fit into a fragment page.
Definition: lob0impl.cc:609
void decr_n_dir_entries() const
Definition: lob0impl.h:1502
byte * slots_end_ptr() const
Definition: lob0impl.h:1464
void set_version_0()
Definition: lob0impl.h:1418
ulint alloc_dir_entry()
Grow the frag directory by one entry.
Definition: lob0impl.cc:720
void set_block_null()
Definition: lob0impl.h:1886
void merge_free_frags()
Definition: lob0impl.h:1617
ulint alloc_frag_id()
Allocate a fragment id.
Definition: lob0impl.h:1536
void set_page_prev(page_no_t page_no, mtr_t *mtr)
Set the prev page.
Definition: lob0impl.h:1571
ulint get_n_frags() const
Get the number of fragments in this frag page.
Definition: lob0impl.h:1828
void set_n_dir_entries(ulint n) const
Definition: lob0impl.h:1455
std::ostream & print_free_list(std::ostream &out) const
Definition: lob0impl.h:1835
void set_index(dict_index_t *index)
Definition: lob0impl.h:1884
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:1353
std::ostream & print_page_dir(std::ostream &out) const
Definition: lob0impl.h:1867
frag_node_t get_frag_node(frag_id_t id) const
Definition: lob0impl.h:1733
mtr_t * m_mtr
Definition: lob0impl.h:1919
ulint locate_free_slot()
Definition: lob0impl.h:1519
void insert_into_frag_list(frag_node_t &frag)
Insert the given fragment node into the fragment list.
Definition: lob0impl.h:1686
z_frag_entry_t get_frag_entry_x()
Definition: lob0impl.cc:743
page_no_t get_page_no() const
Get the frag page number.
Definition: lob0impl.h:1806
page_type_t get_page_type() const
Definition: lob0impl.h:1776
frag_id_t alloc_fragment(ulint size, z_frag_entry_t &entry)
Allocate a fragment with the given payload.
Definition: lob0impl.cc:642
void set_frag_entry_null() const
Definition: lob0impl.h:1446
ulint get_n_dir_entries() const
Definition: lob0impl.h:1450
void update_frag_entry()
Definition: lob0impl.h:1413
void set_space_id_no_redo(space_id_t space_id)
Write the space identifier to the page header, without generating redo log records.
Definition: lob0impl.h:1405
flst_node_t * addr2ptr_s(fil_addr_t &addr)
Definition: lob0impl.h:1428
ulint init_last_dir_entry()
Definition: lob0impl.h:1489
bool is_border_frag(const frag_node_t &node) const
Definition: lob0impl.h:1460
void split_free_frag(frag_node_t &free_frag, ulint size)
Split one free fragment into two.
Definition: lob0impl.h:1708
fil_addr_t get_frag_entry() const
Obtain the file address of the fragment entry that denotes the current fragment page.
Definition: lob0impl.h:1442
ulint get_big_free_len() const
Get the big free space in this page.
Definition: lob0impl.cc:876
ulint get_total_stored_data() const
Get the total amount of stored data in this page.
Definition: lob0impl.cc:844
void dealloc()
Free the fragment page.
Definition: lob0impl.h:1604
void set_page_prev(page_no_t page_no)
Set the prev page.
Definition: lob0impl.h:1568
void set_nth_dir_entry(ulint frag_id, paddr_t val)
Definition: lob0impl.h:1483
buf_block_t * load_x(page_no_t page_no)
Definition: lob0impl.h:1609
z_frag_entry_t get_frag_entry_s()
Definition: lob0impl.cc:751
void set_frag_entry(const fil_addr_t &addr) const
Definition: lob0impl.h:1434
page_no_t get_prev_page_no(mtr_t *mtr) const
Get the prev page number (FIL_PAGE_PREV).
Definition: lob0impl.h:1582
void dealloc_frag_id()
Deallocate all the free slots from the end of the page directory.
Definition: lob0impl.cc:898
void merge_free_frags(frag_node_t &frag)
Definition: lob0impl.h:1628
An index entry pointing to one zlib stream.
Definition: zlob0index.h:86
An index page containing an array of z_index_entry_t objects.
Definition: lob0impl.h:776
buf_block_t * m_block
The buffer block of the compressed LOB index page.
Definition: lob0impl.h:881
void init(flst_base_node_t *free_lst, mtr_t *mtr)
Definition: lob0impl.cc:1291
z_index_page_t(buf_block_t *block)
Constructor.
Definition: lob0impl.h:800
void set_space_id_no_redo(space_id_t space_id)
Write the space identifier to the page header, without generating redo log records.
Definition: lob0impl.h:812
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:778
void dealloc()
Definition: lob0impl.h:863
page_no_t get_page_no() const
Get the page number.
Definition: lob0impl.h:835
z_index_page_t(mtr_t *mtr)
Constructor.
Definition: lob0impl.h:783
void set_next_page_no(page_no_t page_no)
Set the next page number.
Definition: lob0impl.h:828
void set_version_0()
Definition: lob0impl.h:823
static const ulint LOB_PAGE_DATA
Definition: lob0impl.h:779
page_no_t get_next_page_no() const
Get the next page number.
Definition: lob0impl.h:840
dict_index_t * m_index
The index to which the LOB belongs.
Definition: lob0impl.h:887
buf_block_t * alloc(z_first_page_t &first, bool bulk)
Allocate an ZLOB index page.
Definition: lob0impl.cc:1245
mtr_t * m_mtr
The mini-transaction context.
Definition: lob0impl.h:884
z_index_page_t(buf_block_t *block, dict_index_t *index)
Constructor.
Definition: lob0impl.h:806
ulint payload() const
Definition: lob0impl.h:870
ulint get_n_index_entries() const
Definition: lob0impl.cc:1302
z_index_page_t(mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: lob0impl.h:795
z_index_page_t(buf_block_t *block, mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: lob0impl.h:789
void set_page_type(mtr_t *mtr)
Set the correct page type.
Definition: lob0impl.h:818
buf_block_t * load_x(page_no_t page_no)
Load the given compressed LOB index page.
Definition: lob0impl.h:853
byte * frame() const
Definition: lob0impl.h:878
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:176
Definition: trx0trx.h:683
@ RW_X_LATCH
Definition: sync0rw.h:98
@ RW_S_LATCH
Definition: sync0rw.h:97
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:137
#define UNIV_PAGE_SIZE
The universal page size of the database.
Definition: univ.i:293
unsigned long int ulint
Definition: univ.i:405
constexpr ulint ULINT_UNDEFINED
The 'undefined' value for a ulint.
Definition: univ.i:419
#define UT_LOCATION_HERE
Definition: ut0core.h:72
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:104
#define ut_a(EXPR)
Abort execution if EXPR does not evaluate to nonzero.
Definition: ut0dbg.h:92
int n
Definition: xcom_base.cc:508