41struct z_index_entry_t;
60 static const uint8_t
SIZE = 4;
156 byte *node =
nullptr;
170 byte *node =
nullptr;
198 std::ostream &
print(std::ostream &out)
const {
200 <<
", this=" <<
addr() <<
", frame=" << (
void *)
m_frame
201 <<
", m_node=" << (
void *)
m_node <<
"]";
240 return (obj.
print(out));
456 std::ostream &
print(std::ostream &out)
const {
458 <<
", last=" <<
get_last() <<
", this=" <<
addr() <<
"]";
467 cur = cur.get_next_node()) {
468 out << cur << std::endl;
486 return (obj.
print(out));
616 uint16_t offset =
static_cast<uint16_t
>(
m_node - frame);
761 std::ostream &
print(std::ostream &out)
const;
773 return (obj.
print(out));
1098 for (
ulint i = 0; i <
n; ++i) {
1103 entry.push_back(free_lst);
1187 ut_ad(mtr !=
nullptr);
1274 std::ostream &
print(std::ostream &out)
const {
1277 out <<
"[frag_node_t: " <<
m_node <<
", len=" << len <<
"/" <<
payload()
1280 out <<
"[frag_node_t: null, len=0]";
1317 byte *p2 = next.
ptr();
1320 if (p2 == (p1 + len1)) {
1347 return (obj.
print(out));
1416 entry.update(*
this);
1523 for (
ulint frag_id = 0; frag_id <
n; frag_id++) {
1549 out <<
"FRAG IDS: " << std::endl;
1551 for (
ulint frag_id = 0; frag_id <
n; frag_id++) {
1645 while (!free_node.
is_null()) {
1648 while (!frag_node.
is_null()) {
1784 return (
"FIL_PAGE_TYPE_ZLOB_FRAG");
1811 std::ostream &
print(std::ostream &out)
const {
1842 out <<
"[Free List: " << free_lst <<
"]" << std::endl;
1845 cur = cur.get_next_node()) {
1847 out << frag << std::endl;
1858 out <<
"[Frag List: " << frag_lst <<
"]" << std::endl;
1861 cur = cur.get_next_node()) {
1863 out << frag << std::endl;
1875 for (
ulint frag_id = 0; frag_id <
n; ++frag_id) {
1877 out <<
"[frag_id=" << frag_id <<
", addr=" << off <<
"]" << std::endl;
uint32_t space_id_t
Tablespace identifier.
Definition: api0api.h:48
uint32_t page_no_t
Page number.
Definition: api0api.h:46
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
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:554
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:441
The node of page list.
Definition: lob0impl.h:51
paddr_t addr() const
Obtain the offset of the page list node within the given page frame.
Definition: lob0impl.h:183
static const uint16_t OFFSET_PREV
Offset of the previous node.
Definition: lob0impl.h:54
void set_node(byte *node)
Set the page list node to the given value.
Definition: lob0impl.h:211
byte * m_frame
The page frame where this page list exists.
Definition: lob0impl.h:230
paddr_t get_prev() const
Get the offset of the previous page list node.
Definition: lob0impl.h:146
plist_node_t get_next_node() const
Get the next page list node.
Definition: lob0impl.h:154
void set_frame(byte *frame)
Set the page frame to the given value.
Definition: lob0impl.h:207
byte * get_frame() const
Get the page frame where this page list exists.
Definition: lob0impl.h:219
std::ostream & print(std::ostream &out) const
Print the page list node into the given output stream.
Definition: lob0impl.h:198
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:189
static const uint16_t OFFSET_NEXT
Offset of the next node.
Definition: lob0impl.h:57
void set_prev_node(plist_node_t &prev)
Set the previous page list node.
Definition: lob0impl.h:128
plist_node_t(byte *frame, byte *node)
Constructor.
Definition: lob0impl.h:79
bool is_equal(const plist_node_t &that) const
Definition: lob0impl.h:221
paddr_t get_next() const
Get the offset of the next page list node.
Definition: lob0impl.h:150
plist_node_t()
Default constructor.
Definition: lob0impl.h:68
void set_prev(paddr_t addr)
Set the offset of the previous node.
Definition: lob0impl.h:119
void set_mtr(mtr_t *mtr)
Set the mini-transaction context to the given value.
Definition: lob0impl.h:215
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:101
bool is_null() const
Check if the given page list node is null.
Definition: lob0impl.h:193
void init()
Initialize the current page list node.
Definition: lob0impl.h:109
void set_next_node(const plist_node_t &next)
Set the next page list node.
Definition: lob0impl.h:142
plist_node_t(mtr_t *mtr)
Constructor.
Definition: lob0impl.h:64
mtr_t * m_mtr
The mini-transaction context.
Definition: lob0impl.h:236
void set_next(paddr_t addr)
Set the offset of the next node.
Definition: lob0impl.h:132
plist_node_t get_prev_node() const
Get the previous page list node.
Definition: lob0impl.h:168
static const uint8_t SIZE
The size of a page list node.
Definition: lob0impl.h:60
byte * m_node
The plist node is located at this address.
Definition: lob0impl.h:233
plist_node_t(byte *frame, byte *node, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:88
plist_node_t(mtr_t *mtr, byte *frame)
Constructor.
Definition: lob0impl.h:73
plist_node_t & operator=(const plist_node_t &)=default
Page identifier.
Definition: buf0types.h:207
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
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:326
constexpr page_type_t FIL_PAGE_TYPE_LOB_INDEX
Index pages of uncompressed LOB.
Definition: fil0fil.h:1299
uint16_t page_type_t
Definition: fil0fil.h:1218
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_FRAG_ENTRY
Index pages of fragment pages (compressed LOB).
Definition: fil0fil.h:1321
constexpr page_no_t FIL_NULL
'null' (undefined) page offset in the context of file spaces
Definition: fil0fil.h:1156
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_FRAG
Fragment pages of compressed LOB.
Definition: fil0fil.h:1318
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_DATA
Data pages of compressed LOB.
Definition: fil0fil.h:1311
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_INDEX
Index pages of compressed LOB.
Definition: fil0fil.h:1315
constexpr uint32_t FIL_PAGE_TYPE
file page type: FIL_PAGE_INDEX,..., 2 bytes.
Definition: fil0types.h:76
constexpr uint32_t FIL_PAGE_OFFSET
page offset inside space
Definition: fil0types.h:46
constexpr uint32_t FIL_PAGE_DATA
start of the data on the page
Definition: fil0types.h:111
constexpr size_t FIL_ADDR_SIZE
Address size is 6 bytes.
Definition: fil0types.h:128
constexpr uint32_t FIL_PAGE_SPACE_ID
alias for space id
Definition: fil0types.h:108
constexpr uint32_t FIL_PAGE_NEXT
if there is a 'natural' successor of the page, its offset.
Definition: fil0types.h:61
constexpr uint32_t FIL_PAGE_PREV
if there is a 'natural' predecessor of the page, its offset.
Definition: fil0types.h:51
constexpr uint32_t FIL_PAGE_DATA_END
size of the page trailer
Definition: fil0types.h:119
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:90
void flst_remove(flst_base_node_t *base, flst_node_t *node2, mtr_t *mtr)
Removes a node.
Definition: fut0lst.cc:287
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:133
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:46
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:47
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:347
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_read_ulint(p, t, m)
Read 1 - 4 bytes from a file page buffered in the buffer pool.
Definition: mtr0mtr.h:87
Mini-transaction buffer global types.
@ MLOG_4BYTES
4 bytes ...
Definition: mtr0types.h:76
@ MLOG_1BYTE
one byte is written
Definition: mtr0types.h:70
@ MLOG_2BYTES
2 bytes ...
Definition: mtr0types.h:73
Used for bulk load of data.
Definition: fut0lst.cc:411
byte * fut_get_ptr(fil_addr_t addr, std::vector< buf_block_t * > &blocks)
Gets a pointer to a file address.
Definition: fut0lst.cc:499
constexpr value_type blob
Definition: classic_protocol_constants.h:272
PT & ref(PT *tp)
Definition: tablespace_impl.cc:359
Provides the large objects (LOB) module.
Definition: lob0bulk.h:44
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:327
ulint paddr_t
Definition: lob0impl.h:47
ulint frag_id_t
Definition: lob0impl.h:489
const ulint KB16
Definition: lob0impl.h:491
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:534
const ulint FRAG_ID_NULL
Definition: lob0impl.h:490
std::ostream & operator<<(std::ostream &out, const plist_node_t &obj)
Definition: lob0impl.h:239
size_t size(const char *const c)
Definition: base64.h:46
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:152
struct result result
Definition: result.h:34
required string type
Definition: replication_group_member_actions.proto:34
Definition: completion_hash.h:35
The buffer control block structure.
Definition: buf0buf.h:1747
page_type_t get_page_type() const
Get the page type of the current buffer block.
Definition: buf0buf.h:1951
page_no_t get_next_page_no() const
Get the next page number of the current buffer block.
Definition: buf0buf.h:1939
page_no_t get_page_no() const
Get the page number of the current buffer block.
Definition: buf0buf.h:1935
Data structure for an index.
Definition: dict0mem.h:1041
dict_table_t * table
back pointer to table
Definition: dict0mem.h:1055
File space address.
Definition: fil0fil.h:1173
uint32_t boffset
Byte offset within the page.
Definition: fil0fil.h:1205
Definition: lob0util.h:42
mtr_t * m_mtr
Definition: lob0util.h:129
dict_index_t * m_index
Definition: lob0util.h:130
buf_block_t * m_block
Definition: lob0util.h:128
byte * frame() const
Definition: lob0util.h:99
The first page of an uncompressed LOB.
Definition: lob0first.h:43
The fragment node represents one fragment.
Definition: lob0impl.h:1137
frag_node_t get_next_frag()
Definition: lob0impl.h:1285
bool is_equal(const plist_node_t &node) const
Definition: lob0impl.h:1334
bool is_equal(const frag_node_t &that) const
Definition: lob0impl.h:1330
void set_total_len(ulint len)
Definition: lob0impl.h:1196
bool is_null() const
Definition: lob0impl.h:1328
ulint get_frag_id() const
Definition: lob0impl.h:1237
static ulint overhead()
Amount of space that will be used up by meta data.
Definition: lob0impl.h:1173
frag_node_t get_prev_node()
Definition: lob0impl.h:1293
static ulint header_size()
Only the header size.
Definition: lob0impl.h:1176
plist_node_t m_node
The page list node.
Definition: lob0impl.h:1339
byte * frag_begin() const
Definition: lob0impl.h:1192
byte * data_begin() const
Definition: lob0impl.h:1194
static const ulint OFFSET_LEN
The offset where the length of fragment is stored.
Definition: lob0impl.h:1140
frag_node_t get_next_node()
Definition: lob0impl.h:1291
frag_node_t(byte *frame, byte *ptr, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:1166
byte * end_ptr() const
Gets the pointer just after the current fragment.
Definition: lob0impl.h:1265
bool merge(frag_node_t &next)
Merge the current fragment node with the given next fragment node.
Definition: lob0impl.h:1312
void decr_length_by_2()
Decrement the total length of this fragment by 2 bytes.
Definition: lob0impl.h:1212
void set_frag_id(ulint id)
Definition: lob0impl.h:1231
frag_node_t(const plist_node_t &node, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:1155
frag_node_t get_prev_frag()
Definition: lob0impl.h:1295
frag_node_t(byte *frame, byte *ptr)
Definition: lob0impl.h:1158
static const ulint OFFSET_DATA
The offset where fragment data is stored.
Definition: lob0impl.h:1146
byte * ptr() const
Gets the pointer to the beginning of the current fragment.
Definition: lob0impl.h:1256
ulint payload() const
Get the space available in this fragment for storing data.
Definition: lob0impl.h:1242
bool is_before(const frag_node_t &frag) const
Definition: lob0impl.h:1220
static const ulint OFFSET_FRAG_ID
The offset where fragment id is stored.
Definition: lob0impl.h:1143
byte * frame() const
Get the page frame.
Definition: lob0impl.h:1272
paddr_t addr() const
Get the offset of the current fragment within page.
Definition: lob0impl.h:1251
mtr_t * m_mtr
The mini-transaction context.
Definition: lob0impl.h:1343
void set_frag_id_null()
Definition: lob0impl.h:1224
void incr_length_by_2()
Increment the total length of this fragment by 2 bytes.
Definition: lob0impl.h:1203
static const ulint SIZE_OF_PAGE_DIR_ENTRY
The size of a page directory entry in a fragment page in bytes.
Definition: lob0impl.h:1150
frag_node_t(byte *frame, byte *ptr, ulint len, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:1185
std::ostream & print(std::ostream &out) const
Definition: lob0impl.h:1274
ulint get_total_len() const
Get the total length of this fragment, including its metadata.
Definition: lob0impl.h:1245
The node page (also can be called as the index page) contains a list of index_entry_t objects.
Definition: lob0impl.h:495
node_page_t(buf_block_t *block, mtr_t *mtr)
Definition: lob0impl.h:507
byte * nodes_begin() const
Definition: lob0impl.h:551
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:497
static ulint payload()
Definition: lob0impl.h:536
static ulint max_space_available()
Definition: lob0impl.h:540
node_page_t()=default
Default ctor.
buf_block_t * alloc(first_page_t &first_page, bool bulk)
Allocate one node page.
Definition: lob0impl.cc:70
void set_version_0()
Definition: lob0impl.h:500
static const ulint LOB_PAGE_DATA
Definition: lob0impl.h:498
void set_page_type()
Definition: lob0impl.h:546
void dealloc()
Definition: lob0impl.h:531
buf_block_t * load_x(page_id_t page_id, page_size_t page_size)
Definition: lob0impl.h:525
node_page_t(buf_block_t *block, mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:509
node_page_t(buf_block_t *block)
Constructor.
Definition: lob0impl.h:517
static ulint node_count()
Get the number of index entries this page can hold.
Definition: lob0impl.cc:1309
node_page_t(mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:512
The base node of page list.
Definition: lob0impl.h:244
ulint get_len() const
Definition: lob0impl.h:386
void set_last(paddr_t addr)
Definition: lob0impl.h:443
void set_len(ulint len)
Definition: lob0impl.h:414
void add_to_empty(plist_node_t &node)
Definition: lob0impl.h:358
void decr_len()
Definition: lob0impl.h:427
bool empty() const
Definition: lob0impl.h:384
plist_node_t get_last_node() const
Definition: lob0impl.h:404
static const ulint SIZE
The total size (in bytes) of a page list base node.
Definition: lob0impl.h:258
void push_back(plist_node_t &node)
Definition: lob0impl.h:367
void incr_len()
Definition: lob0impl.h:420
paddr_t addr() const
Definition: lob0impl.h:454
void set_first(paddr_t addr)
Definition: lob0impl.h:437
paddr_t get_last() const
Definition: lob0impl.h:402
void insert_before(plist_node_t &node3, plist_node_t &node2)
Insert node2 before node3.
Definition: lob0impl.h:336
std::ostream & print_list(std::ostream &out) const
Definition: lob0impl.h:462
static const ulint OFFSET_LEN
The offset where the length of the page list is stored.
Definition: lob0impl.h:247
plist_base_node_t(byte *frame, byte *base, mtr_t *mtr)
Definition: lob0impl.h:260
std::ostream & print(std::ostream &out) const
Definition: lob0impl.h:456
bool validate() const
Validate the page list.
Definition: lob0impl.cc:54
void init()
Definition: lob0impl.h:263
plist_node_t get_first_node() const
Definition: lob0impl.h:392
void remove(plist_node_t &node)
Definition: lob0impl.h:271
mtr_t * m_mtr
Definition: lob0impl.h:481
byte * m_base
Definition: lob0impl.h:480
void insert_after(plist_node_t &node1, plist_node_t &node2)
Insert node2 after node1.
Definition: lob0impl.h:313
static const ulint OFFSET_FIRST
The offset where the first node is located.
Definition: lob0impl.h:251
byte * m_frame
Definition: lob0impl.h:479
void push_front(plist_node_t &node)
Definition: lob0impl.h:295
paddr_t get_first() const
Definition: lob0impl.h:388
static const ulint OFFSET_LAST
The offset where the last node is located.
Definition: lob0impl.h:255
plist_node_t get_node(paddr_t addr)
Definition: lob0impl.h:449
The struct 'lob::ref_t' represents an external field reference.
Definition: lob0lob.h:198
The data page holding the zlob.
Definition: lob0impl.h:892
static const ulint OFFSET_DATA_LEN
Definition: lob0impl.h:897
dict_index_t * m_index
Definition: lob0impl.h:1015
void set_data_len(ulint len)
Definition: lob0impl.h:975
fil_addr_t get_self_addr() const
Definition: lob0impl.h:1006
buf_block_t * alloc(page_no_t hint, bool bulk)
Allocate one data page.
Definition: lob0impl.cc:1278
void dealloc()
Free this data page holding the zlob data.
Definition: lob0impl.h:937
void set_version_0()
Definition: lob0impl.h:950
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:996
byte * frame() const
Definition: lob0impl.h:1011
void set_trx_id(trx_id_t tid)
Definition: lob0impl.h:985
void set_next_page(page_no_t page_no)
Set the next page.
Definition: lob0impl.h:957
void set_page_type()
Set the correct page type.
Definition: lob0impl.h:943
static const ulint OFFSET_DATA_BEGIN
Definition: lob0impl.h:903
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:894
ulint get_data_len() const
Definition: lob0impl.h:981
mtr_t * m_mtr
Definition: lob0impl.h:1014
z_data_page_t(buf_block_t *block)
Definition: lob0impl.h:918
static const ulint OFFSET_TRX_ID
Definition: lob0impl.h:900
page_no_t get_page_no() const
Get the page number.
Definition: lob0impl.h:1002
buf_block_t * m_block
Definition: lob0impl.h:1013
byte * begin_data_ptr() const
Definition: lob0impl.h:973
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:924
z_data_page_t(mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:910
ulint payload()
Definition: lob0impl.h:905
void init()
Definition: lob0impl.h:963
z_data_page_t(buf_block_t *block, mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:913
The first page of an zlob.
Definition: zlob0first.h:38
An entry representing one fragment page.
Definition: lob0impl.h:555
static const ulint OFFSET_PREV
Offset within frag entry pointing to prev frag entry.
Definition: lob0impl.h:558
void set_big_free_len(ulint n)
Set the big free frag bytes.
Definition: lob0impl.h:753
ulint get_big_free_len() const
Get the biggest free frag bytes.
Definition: lob0impl.h:741
void reset(flst_node_t *node)
Point to another frag entry.
Definition: lob0impl.h:654
void remove(flst_base_node_t *bnode)
Remove this node from the given list.
Definition: lob0impl.h:630
void set_prev(const fil_addr_t &addr)
Set the previous frag entry as null.
Definition: lob0impl.h:664
void push_front(flst_base_node_t *bnode)
Add this node as the first node in the given list.
Definition: lob0impl.h:646
void init()
Initialize the fragment entry contents.
Definition: lob0impl.h:593
void free_frag_page(mtr_t *mtr, dict_index_t *index)
Free the fragment page pointed to by this entry.
Definition: lob0impl.cc:136
static const ulint OFFSET_N_FRAGS
Number of used fragments.
Definition: lob0impl.h:567
void set_null()
Set the current fragment entry to null.
Definition: lob0impl.h:607
z_frag_entry_t()
Constructor.
Definition: lob0impl.h:585
page_no_t get_page_no() const
Get the frag page number.
Definition: lob0impl.h:695
mtr_t * m_mtr
The mini-transaction context for operating on this fragment entry.
Definition: lob0impl.h:769
void purge(flst_base_node_t *used_lst, flst_base_node_t *free_lst)
Definition: lob0impl.cc:115
z_frag_entry_t(mtr_t *mtr)
Constructor.
Definition: lob0impl.h:588
void set_n_frags(ulint frags) const
Set the frag page number.
Definition: lob0impl.h:717
flst_node_t * m_node
The location where the fragment entry node is located.
Definition: lob0impl.h:765
static const ulint SIZE
Total size of one frag entry.
Definition: lob0impl.h:579
std::ostream & print(std::ostream &out) const
Definition: lob0impl.cc:106
ulint get_used_len() const
Get the used bytes.
Definition: lob0impl.h:724
static const ulint OFFSET_PAGE_NO
Offset within frag entry holding the page number of frag page.
Definition: lob0impl.h:564
void push_back(flst_base_node_t *bnode)
Add this node as the last node in the given list.
Definition: lob0impl.h:638
static const ulint OFFSET_NEXT
Offset within frag entry pointing to next frag entry.
Definition: lob0impl.h:561
static const ulint OFFSET_TOTAL_FREE_LEN
Total free space in bytes.
Definition: lob0impl.h:573
fil_addr_t get_self_addr() const
Definition: lob0impl.h:613
ulint get_n_frags() const
Get the frag page number.
Definition: lob0impl.h:712
void set_total_free_len(ulint n)
Set the total free bytes.
Definition: lob0impl.h:746
void set_prev_null()
Set the previous frag entry as null.
Definition: lob0impl.h:657
fil_addr_t get_next() const
Get the location of next frag entry.
Definition: lob0impl.h:690
void update(const z_frag_page_t &frag_page)
Update the current fragment entry with information about the given fragment page.
Definition: lob0impl.cc:126
z_frag_entry_t(flst_node_t *node, mtr_t *mtr)
Constructor.
Definition: lob0impl.h:582
ulint get_total_free_len() const
Get the total cumulative free bytes.
Definition: lob0impl.h:736
bool is_null() const
Check if the current fragment entry is null.
Definition: lob0impl.h:611
void set_next_null()
Set the next frag entry as null.
Definition: lob0impl.h:676
fil_addr_t get_prev() const
Get the location of previous frag entry.
Definition: lob0impl.h:671
static const ulint OFFSET_BIG_FREE_LEN
The biggest free frag space in bytes.
Definition: lob0impl.h:576
static const ulint OFFSET_USED_LEN
Used space in bytes.
Definition: lob0impl.h:570
void set_page_no(page_no_t page_no) const
Set the frag page number.
Definition: lob0impl.h:700
void set_used_len(ulint used) const
Set the used bytes.
Definition: lob0impl.h:729
void set_next(const fil_addr_t &addr)
Set the next frag entry.
Definition: lob0impl.h:683
A frag nodes page containing an array of z_frag_entry_t objects.
Definition: lob0impl.h:1019
z_frag_node_page_t(mtr_t *mtr, dict_index_t *index)
Definition: lob0impl.h:1024
mtr_t * m_mtr
The mini-transaction context.
Definition: lob0impl.h:1122
void set_version_0()
Definition: lob0impl.h:1055
buf_block_t * load_x(page_no_t page_no)
Load the given compressed LOB fragment page.
Definition: lob0impl.h:1083
static const ulint LOB_PAGE_DATA
Definition: lob0impl.h:1022
void init(flst_base_node_t *free_lst)
Definition: lob0impl.h:1094
buf_block_t * alloc(z_first_page_t &first, bool bulk)
Allocate a fragment nodes page.
Definition: lob0impl.cc:618
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:1021
void dealloc()
Definition: lob0impl.h:1075
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:1035
buf_block_t * m_block
The buffer block of the fragment page.
Definition: lob0impl.h:1119
void set_next_page_no(page_no_t page_no)
Set the next page number.
Definition: lob0impl.h:1049
z_frag_node_page_t(buf_block_t *block)
Constructor.
Definition: lob0impl.h:1029
page_no_t get_next_page_no() const
Get the next page number.
Definition: lob0impl.h:1067
byte * frame() const
Definition: lob0impl.h:1116
ulint get_n_frag_entries() const
Definition: lob0impl.h:1112
void set_page_type()
Set the correct page type.
Definition: lob0impl.h:1041
page_no_t get_page_no() const
Get the page number.
Definition: lob0impl.h:1062
ulint payload() const
Definition: lob0impl.h:1107
dict_index_t * m_index
The index to which the LOB belongs.
Definition: lob0impl.h:1125
The fragment page.
Definition: lob0impl.h:1352
const char * get_page_type_str() const
Definition: lob0impl.h:1781
fil_addr_t get_frag_entry_addr() const
Definition: lob0impl.h:1897
z_frag_page_t(mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: lob0impl.h:1392
static const ulint OFFSET_FRAG_ENTRY
The location of z_frag_entry_t for this page.
Definition: lob0impl.h:1357
void dealloc_with_entry(z_first_page_t &first, mtr_t *alloc_mtr)
Free the fragment page along with its entry.
Definition: lob0impl.cc:760
ulint space_used_by_dir() const
Definition: lob0impl.h:1515
byte * frame() const
Definition: lob0impl.h:1809
std::ostream & print(std::ostream &out) const
Definition: lob0impl.h:1811
page_no_t get_next_page_no() const
Get the next page number.
Definition: lob0impl.h:1578
void set_page_next(page_no_t page_no)
Set the next page.
Definition: lob0impl.h:1564
std::ostream & print_frags_in_order(std::ostream &out) const
Definition: lob0impl.cc:803
flst_node_t * addr2ptr_x(fil_addr_t &addr)
Definition: lob0impl.h:1423
bool validate_lists() const
Definition: lob0impl.h:1640
buf_block_t * m_block
Definition: lob0impl.h:1919
ulint payload()
The maximum free space available in a fragment page.
Definition: lob0impl.h:1789
static const ulint OFFSET_FRAGS_BEGIN
The offset within page where the fragments can occupy .
Definition: lob0impl.h:1367
paddr_t frag_id_to_addr(ulint frag_id) const
Definition: lob0impl.h:1472
ulint get_total_free_len() const
Get the total cumulative free space in this page.
Definition: lob0impl.cc:862
static const ulint SIZE_OF_PAGE_DIR_ENTRY
Definition: lob0impl.h:1377
std::ostream & print_frag_id(std::ostream &out)
Definition: lob0impl.h:1547
z_frag_page_t(buf_block_t *block, mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: lob0impl.h:1383
std::ostream & print_frag_list(std::ostream &out) const
Definition: lob0impl.h:1852
static const ulint OFFSET_FREE_LIST
The offset within page where the free space list begins.
Definition: lob0impl.h:1360
static const ulint OFFSET_PAGE_DIR_ENTRY_FIRST
Offset of first page directory entry (from end)
Definition: lob0impl.h:1374
dict_index_t * m_index
Definition: lob0impl.h:1921
void set_mtr(mtr_t *mtr)
Definition: lob0impl.h:1883
void dealloc_frag_id(ulint frag_id)
Deallocate the given fragment id.
Definition: lob0impl.h:1914
static ulint max_payload(dict_index_t *index)
The maximum free space available in a fragment page.
Definition: lob0impl.h:1793
void incr_n_dir_entries() const
Definition: lob0impl.h:1496
plist_base_node_t free_list() const
Definition: lob0impl.h:1762
ulint get_nth_dir_entry(ulint frag_id)
Definition: lob0impl.h:1478
void dealloc_fragment(ulint frag_id)
Definition: lob0impl.h:1742
z_frag_page_t(buf_block_t *block)
Constructor.
Definition: lob0impl.h:1397
plist_base_node_t frag_list() const
Definition: lob0impl.h:1767
static const ulint OFFSET_FRAGS_LIST
The offset within page where the fragment list begins.
Definition: lob0impl.h:1363
void set_page_type()
Definition: lob0impl.h:1772
void insert_into_free_list(frag_node_t &frag)
Definition: lob0impl.h:1658
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:1892
buf_block_t * alloc(z_first_page_t &first, page_no_t hint, bool bulk)
Allocate the fragment page.
Definition: lob0impl.cc:545
static const ulint OFFSET_PAGE_DIR_ENTRY_COUNT
Offset of number of page directory entries (from end)
Definition: lob0impl.h:1371
page_no_t get_prev_page_no() const
Get the prev page number.
Definition: lob0impl.h:1589
void dealloc_fragment(frag_node_t &frag)
Definition: lob0impl.h:1901
ulint get_page_size() const
Definition: lob0impl.h:1510
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:610
void decr_n_dir_entries() const
Definition: lob0impl.h:1503
byte * slots_end_ptr() const
Definition: lob0impl.h:1465
void set_version_0()
Definition: lob0impl.h:1419
ulint alloc_dir_entry()
Grow the frag directory by one entry.
Definition: lob0impl.cc:721
void set_block_null()
Definition: lob0impl.h:1887
void merge_free_frags()
Definition: lob0impl.h:1618
ulint alloc_frag_id()
Allocate a fragment id.
Definition: lob0impl.h:1537
void set_page_prev(page_no_t page_no, mtr_t *mtr)
Set the prev page.
Definition: lob0impl.h:1572
ulint get_n_frags() const
Get the number of fragments in this frag page.
Definition: lob0impl.h:1829
void set_n_dir_entries(ulint n) const
Definition: lob0impl.h:1456
std::ostream & print_free_list(std::ostream &out) const
Definition: lob0impl.h:1836
void set_index(dict_index_t *index)
Definition: lob0impl.h:1885
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:1354
std::ostream & print_page_dir(std::ostream &out) const
Definition: lob0impl.h:1868
frag_node_t get_frag_node(frag_id_t id) const
Definition: lob0impl.h:1734
mtr_t * m_mtr
Definition: lob0impl.h:1920
ulint locate_free_slot()
Definition: lob0impl.h:1520
void insert_into_frag_list(frag_node_t &frag)
Insert the given fragment node into the fragment list.
Definition: lob0impl.h:1687
z_frag_entry_t get_frag_entry_x()
Definition: lob0impl.cc:744
page_no_t get_page_no() const
Get the frag page number.
Definition: lob0impl.h:1807
page_type_t get_page_type() const
Definition: lob0impl.h:1777
frag_id_t alloc_fragment(ulint size, z_frag_entry_t &entry)
Allocate a fragment with the given payload.
Definition: lob0impl.cc:643
void set_frag_entry_null() const
Definition: lob0impl.h:1447
ulint get_n_dir_entries() const
Definition: lob0impl.h:1451
void update_frag_entry()
Definition: lob0impl.h:1414
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:1406
flst_node_t * addr2ptr_s(fil_addr_t &addr)
Definition: lob0impl.h:1429
ulint init_last_dir_entry()
Definition: lob0impl.h:1490
bool is_border_frag(const frag_node_t &node) const
Definition: lob0impl.h:1461
void split_free_frag(frag_node_t &free_frag, ulint size)
Split one free fragment into two.
Definition: lob0impl.h:1709
fil_addr_t get_frag_entry() const
Obtain the file address of the fragment entry that denotes the current fragment page.
Definition: lob0impl.h:1443
ulint get_big_free_len() const
Get the big free space in this page.
Definition: lob0impl.cc:877
ulint get_total_stored_data() const
Get the total amount of stored data in this page.
Definition: lob0impl.cc:845
void dealloc()
Free the fragment page.
Definition: lob0impl.h:1605
void set_page_prev(page_no_t page_no)
Set the prev page.
Definition: lob0impl.h:1569
void set_nth_dir_entry(ulint frag_id, paddr_t val)
Definition: lob0impl.h:1484
buf_block_t * load_x(page_no_t page_no)
Definition: lob0impl.h:1610
z_frag_entry_t get_frag_entry_s()
Definition: lob0impl.cc:752
void set_frag_entry(const fil_addr_t &addr) const
Definition: lob0impl.h:1435
page_no_t get_prev_page_no(mtr_t *mtr) const
Get the prev page number (FIL_PAGE_PREV).
Definition: lob0impl.h:1583
void dealloc_frag_id()
Deallocate all the free slots from the end of the page directory.
Definition: lob0impl.cc:899
void merge_free_frags(frag_node_t &frag)
Definition: lob0impl.h:1629
An index entry pointing to one zlib stream.
Definition: zlob0index.h:87
An index page containing an array of z_index_entry_t objects.
Definition: lob0impl.h:777
buf_block_t * m_block
The buffer block of the compressed LOB index page.
Definition: lob0impl.h:882
void init(flst_base_node_t *free_lst, mtr_t *mtr)
Definition: lob0impl.cc:1294
z_index_page_t(buf_block_t *block)
Constructor.
Definition: lob0impl.h:801
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:813
static const ulint OFFSET_VERSION
Version information.
Definition: lob0impl.h:779
void dealloc()
Definition: lob0impl.h:864
page_no_t get_page_no() const
Get the page number.
Definition: lob0impl.h:836
z_index_page_t(mtr_t *mtr)
Constructor.
Definition: lob0impl.h:784
void set_next_page_no(page_no_t page_no)
Set the next page number.
Definition: lob0impl.h:829
void set_version_0()
Definition: lob0impl.h:824
static const ulint LOB_PAGE_DATA
Definition: lob0impl.h:780
page_no_t get_next_page_no() const
Get the next page number.
Definition: lob0impl.h:841
dict_index_t * m_index
The index to which the LOB belongs.
Definition: lob0impl.h:888
buf_block_t * alloc(z_first_page_t &first, bool bulk)
Allocate an ZLOB index page.
Definition: lob0impl.cc:1248
mtr_t * m_mtr
The mini-transaction context.
Definition: lob0impl.h:885
z_index_page_t(buf_block_t *block, dict_index_t *index)
Constructor.
Definition: lob0impl.h:807
ulint payload() const
Definition: lob0impl.h:871
ulint get_n_index_entries() const
Definition: lob0impl.cc:1305
z_index_page_t(mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: lob0impl.h:796
z_index_page_t(buf_block_t *block, mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: lob0impl.h:790
void set_page_type(mtr_t *mtr)
Set the correct page type.
Definition: lob0impl.h:819
buf_block_t * load_x(page_no_t page_no)
Load the given compressed LOB index page.
Definition: lob0impl.h:854
byte * frame() const
Definition: lob0impl.h:879
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:177
Definition: trx0trx.h:675
@ RW_X_LATCH
Definition: sync0rw.h:99
@ RW_S_LATCH
Definition: sync0rw.h:98
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
#define UNIV_PAGE_SIZE
The universal page size of the database.
Definition: univ.i:294
unsigned long int ulint
Definition: univ.i:406
constexpr ulint ULINT_UNDEFINED
The 'undefined' value for a ulint.
Definition: univ.i:420
#define UT_LOCATION_HERE
Definition: ut0core.h:73
#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
int n
Definition: xcom_base.cc:509