 |
MySQL
8.0.23
Source Code Documentation
|
Go to the documentation of this file.
37 struct z_first_page_t {
202 ut_ad(mtr !=
nullptr);
210 ut_ad(mtr !=
nullptr);
263 uint32_t offset =
static_cast<uint32_t
>(
begin_data());
430 return (!(
flags & 0x01));
482 for (ulint i = 0; i <
n; ++i) {
487 frag_entry.push_back(free_frag_lst);
527 std::ostream &
print(std::ostream &out)
const;
582 static const uint32_t FREQ = 50;
583 static std::atomic<uint32_t>
n{0};
586 if (++
n % FREQ == 0) {
630 return (obj.print(out));
uint32 page_no_t
Page number.
Definition: api0api.h:57
constexpr ulint FIL_PAGE_DATA
start of the data on the page
Definition: fil0types.h:110
void set_trx_id(trx_id_t tid)
Update the trx id in the header.
Definition: zlob0first.h:439
void init_index_entries()
Definition: zlob0first.cc:417
void set_prev_page_no(page_no_t page_no, mtr_t *mtr)
Set the FIL_PAGE_PREV to the given value.
Definition: zlob0first.h:257
buf_block_t * get_block() const
Get the buffer block of the first page of LOB.
Definition: zlob0first.h:643
ulint get_n_frag_entries() const
Given the page size, what is the number of frag entries the first page can contain.
Definition: zlob0first.cc:88
#define FIL_PAGE_PREV
if there is a 'natural' predecessor of the page, its offset.
Definition: fil0types.h:50
ib_id_t undo_no_t
Undo number.
Definition: trx0types.h:148
byte * frame() const
Definition: zlob0first.h:577
flst_base_node_t * free_frag_list() const
Definition: zlob0first.h:521
ulint frag_id_t
Definition: lob0impl.h:512
flst_node_t * addr2ptr_x(fil_addr_t &addr) const
Load the page, in x-latch mode, containing the given file address.
Definition: zlob0first.h:582
#define mtr_read_ulint(p, t, m)
Read 1 - 4 bytes from a file page buffered in the buffer pool.
Definition: mtr0mtr.h:87
void set_next_page_no(page_no_t page_no, mtr_t *mtr)
Set the FIL_PAGE_NEXT to the given value.
Definition: zlob0first.h:249
ulint begin_data() const
Definition: zlob0first.h:150
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:144
static const ulint SIZE
Total size of one frag entry.
Definition: lob0impl.h:601
size_t free_all_frag_pages_old()
Free all the fragment pages when the next page of the first LOB page IS NOT USED to link the fragment...
Definition: zlob0first.cc:597
void init_frag_entries()
Definition: zlob0first.h:527
static const ulint OFFSET_LAST_TRX_ID
The last transaction that modified this LOB.
Definition: zlob0first.h:97
UNIV_INLINE void flst_init(flst_base_node_t *base, mtr_t *mtr)
Initializes a list base node.
void set_next_page_null()
Set the FIL_PAGE_NEXT to FIL_NULL.
Definition: zlob0first.h:241
bool is_empty() const
Definition: zlob0first.h:154
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:66
static const uint32_t OFFSET_LOB_VERSION
LOB version.
Definition: zlob0first.h:94
Dialog Client Authentication nullptr
Definition: dialog.cc:353
UNIV_INLINE space_id_t dict_index_get_space(const dict_index_t *index)
Gets the space id of the root of the index tree.
Data structure for an index.
Definition: dict0mem.h:879
void restart_mtr(mtr_t *mtr)
Restart the given mtr.
Definition: zlob0first.h:651
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:169
buf_block_t * load_x(page_no_t page_no)
Load the given page number as the first page in x-latch mode.
Definition: zlob0first.h:200
size_t free_all_frag_pages_new()
Free all the fragment pages when the next page of the first LOB page IS USED to link the fragment pag...
Definition: zlob0first.cc:658
flst_base_node_t * frag_list() const
Definition: zlob0first.h:525
size_t destroy()
Free all the pages of the zlob.
Definition: zlob0first.cc:682
byte flst_base_node_t
Definition: fut0lst.h:45
mtr_t * m_mtr
The mini-transaction context.
Definition: zlob0first.h:665
byte flst_node_t
Definition: fut0lst.h:46
UNIV_INLINE uint8_t mach_read_from_1(const byte *b)
The following function is used to fetch data from one byte.
void set_last_trx_undo_no(undo_no_t undo_no)
Definition: zlob0first.h:500
ulint get_data_len() const
Get the amount of zlob data stored in this page.
Definition: zlob0first.h:294
uint8_t get_flags()
Get one byte of flags.
Definition: zlob0first.h:471
static const ulint OFFSET_LAST_UNDO_NO
The last transaction that modified this LOB.
Definition: zlob0first.h:100
constexpr ulint FLST_BASE_NODE_SIZE
Definition: fut0lst.h:49
void set_frag_node_page_no(page_no_t page_no)
All the frag node pages are singled linked with each other, and the first page contains the link to o...
Definition: zlob0first.h:374
@ MLOG_1BYTE
one byte is written
Definition: mtr0types.h:69
static const ulint OFFSET_INDEX_LIST
List of index entries.
Definition: zlob0first.h:118
void set_prev_page_null()
Set the FIL_PAGE_PREV to FIL_NULL.
Definition: zlob0first.h:244
page_no_t get_index_page_no() const
All the index pages are singled linked with each other, and the first page contains the link to one i...
Definition: zlob0first.h:328
size_t physical() const
Retrieve the physical page size (on-disk).
Definition: page0size.h:120
@ MLOG_4BYTES
4 bytes ...
Definition: mtr0types.h:75
An entry representing one fragment page.
Definition: lob0impl.h:577
The buffer control block structure.
Definition: buf0buf.h:1544
UNIV_INLINE uint16_t mach_read_from_2(const byte *b)
The following function is used to fetch data from 2 consecutive bytes.
fil_addr_t get_self_addr() const
Definition: zlob0first.h:309
void set_index_page_no(page_no_t page_no)
All the index pages are singled linked with each other, and the first page contains the link to one i...
Definition: zlob0first.h:318
#define buf_page_get(ID, SIZE, LA, MTR)
NOTE! The following macros should be used instead of buf_page_get_gen, to improve debugging.
Definition: buf0buf.h:363
constexpr ulint FIL_PAGE_DATA_END
size of the page trailer
Definition: fil0types.h:118
constexpr page_type_t FIL_PAGE_TYPE_ZLOB_FIRST
The first page of a compressed LOB.
Definition: fil0fil.h:1286
void set_data_len(ulint len)
Definition: zlob0first.h:432
z_first_page_t()
Definition: zlob0first.h:179
z_frag_entry_t alloc_frag_entry(bool bulk)
Allocate one frag page entry.
Definition: zlob0first.cc:216
size_t free_all_frag_node_pages()
Free all the z_frag_page_t pages.
Definition: zlob0first.cc:360
int n
Definition: xcom_base.cc:445
ulint get_n_index_entries() const
Given the page size, what is the number of index entries the first page can contain.
Definition: zlob0first.cc:60
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:333
static const ulint OFFSET_FRAG_NODES_PAGE_NO
The next frag nodes page.
Definition: zlob0first.h:112
#define FIL_PAGE_SPACE_ID
alias for space id
Definition: fil0types.h:107
std::ostream & operator<<(std::ostream &out, const plist_node_t &obj)
Definition: lob0impl.h:262
size_t free_all_index_pages()
Free all the index pages.
Definition: zlob0first.cc:389
dict_index_t * m_index
The index dictionary object.
Definition: zlob0first.h:668
page_no_t get_prev_page_no() const
Get the prev page number of the current buffer block.
Definition: buf0buf.h:1720
@ MLOG_2BYTES
2 bytes ...
Definition: mtr0types.h:72
static const ulint OFFSET_FLAGS
One byte of flag bits.
Definition: zlob0first.h:91
void set_trx_id_no_redo(trx_id_t tid)
Update the trx id in the header, without generating redo log records.
Definition: zlob0first.h:448
static const ulint OFFSET_FREE_LIST
List of free index entries.
Definition: zlob0first.h:115
void set_page_type_unknown()
Set the page type to FIL_PAGE_TYPE_UNKNOWN.
Definition: zlob0first.h:420
#define mtr_start(m)
Start a mini-transaction.
Definition: mtr0mtr.h:50
@ RW_S_LATCH
Definition: sync0rw.h:136
UNIV_INLINE void mach_write_to_6(byte *b, ib_uint64_t id)
The following function is used to store data in 6 consecutive bytes.
page_type_t get_page_type() const
Definition: zlob0first.h:193
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:247
The fragment page.
Definition: lob0impl.h:1372
Page size descriptor.
Definition: page0size.h:49
buf_page_t page
page information; this must be the first field, so that buf_pool->page_hash can point to buf_page_t o...
Definition: buf0buf.h:1550
void dealloc()
Deallocate the first page of a compressed LOB.
Definition: zlob0first.cc:438
frag_id_t alloc_fragment(bool bulk, ulint len, z_frag_page_t &frag_page, z_frag_entry_t &entry)
Allocate a fragment of the given size.
Definition: zlob0first.cc:239
mtr_log_t set_log_mode(mtr_log_t mode)
Change the logging mode.
Definition: mtr0mtr.cc:422
UNIV_INLINE uint32_t mach_read_from_4(const byte *b)
The following function is used to fetch data from 4 consecutive bytes.
void init_lob_version()
Initialize the LOB version to 1.
Definition: zlob0first.h:454
page_size_t get_page_size() const
Get the page size of the tablespace to which this index belongs.
Definition: dict0mem.cc:833
ulint size_of_frag_entries() const
Definition: zlob0first.h:142
static const ulint OFFSET_INDEX_PAGE_NO
The next index page.
Definition: zlob0first.h:109
@ RW_X_LATCH
Definition: sync0rw.h:137
bool verify_frag_page_no()
Verify that the page number pointed to by FIL_PAGE_PREV of the first page of LOB is indeed a fragment...
Definition: zlob0first.cc:694
undo_no_t get_last_trx_undo_no() const
Definition: zlob0first.h:512
std::ostream & print_frag_entries(std::ostream &out) const
Print the index entries.
Definition: zlob0first.cc:168
static const ulint OFFSET_VERSION
Version information.
Definition: zlob0first.h:87
UNIV_INLINE ib_uint64_t mach_read_from_6(const byte *b)
The following function is used to fetch data from 6 consecutive bytes.
ulint begin_frag_entries() const
Definition: zlob0first.h:146
bool validate()
Validate the LOB.
Definition: zlob0first.h:629
static const ulint OFFSET_DATA_LEN
The length of compressed data stored in this page.
Definition: zlob0first.h:103
#define mtr_commit(m)
Commit a mini-transaction.
Definition: mtr0mtr.h:59
page_no_t get_frag_node_page_no()
All the frag node pages are singled linked with each other, and the first page contains the link to o...
Definition: zlob0first.h:414
ulint get_index_list_length() const
Get the length of the index list.
Definition: zlob0first.h:161
page_id_t get_page_id() const
Get the page id of the first page of compressed LOB.
Definition: zlob0first.h:303
UNIV_INLINE const page_size_t dict_table_page_size(const dict_table_t *table)
Get the table page size.
constexpr page_type_t FIL_PAGE_TYPE_UNKNOWN
In old tablespaces, garbage in FIL_PAGE_TYPE is replaced with this value when flushing pages.
Definition: fil0fil.h:1250
#define FIL_PAGE_TYPE
file page type: FIL_PAGE_INDEX,..., 2 bytes.
Definition: fil0types.h:75
uint32_t incr_lob_version()
Increment LOB version by 1.
Definition: zlob0first.cc:468
flst_base_node_t * index_list() const
Definition: zlob0first.h:519
#define mtr_memo_contains(m, o, t)
Check if memo contains the given item.
Definition: mtr0mtr.h:107
void set_version_0()
Definition: zlob0first.h:166
page_no_t get_page_no() const
Get the page number.
Definition: zlob0first.h:299
UNIV_INLINE 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.
page_no_t get_frag_page_no() const
All the fragment pages are doubly linked with each other, and the first page contains the link to one...
Definition: zlob0first.h:336
buf_block_t * alloc(bool bulk)
Definition: zlob0first.cc:113
byte * begin_data_ptr() const
Definition: zlob0first.h:170
buf_block_t * m_block
The buffer block of the first page.
Definition: zlob0first.h:662
#define FIL_PAGE_NEXT
if there is a 'natural' successor of the page, its offset.
Definition: fil0types.h:60
Page identifier.
Definition: buf0types.h:168
Definition: completion_hash.h:34
uint16_t page_type_t
Definition: fil0fil.h:1199
void set_mtr(mtr_t *mtr)
Definition: zlob0first.h:646
dict_table_t * table
back pointer to table
Definition: dict0mem.h:884
static const ulint OFFSET_INDEX_BEGIN
Begin of index entries.
Definition: zlob0first.h:129
void init()
Definition: zlob0first.h:270
void set_frag_page_no(mtr_t *mtr, page_no_t page_no)
All the fragment pages are doubly linked with each other, and the first page contains the link to one...
Definition: zlob0first.h:358
buf_block_t * load_s(page_no_t page_no)
Load the given page number as the first page in s-latch mode.
Definition: zlob0first.h:228
UNIV_INLINE ulint flst_get_len(const flst_base_node_t *base)
Get the length of a list.
ulint size_of_index_entries() const
Definition: zlob0first.cc:413
size_t free_all_data_pages()
Free all the data pages.
Definition: zlob0first.cc:499
uint32_t get_lob_version()
Get the LOB version.
Definition: zlob0first.h:462
bool validate_low()
Validate the LOB.
Definition: zlob0first.cc:540
UNIV_INLINE buf_frame_t * buf_block_get_frame(const buf_block_t *block)
Gets a pointer to the memory frame of a block.
void set_last_trx_id(trx_id_t tid)
Definition: zlob0first.h:486
constexpr page_no_t FIL_NULL
'null' (undefined) page offset in the context of file spaces
Definition: fil0fil.h:1137
static const ulint OFFSET_FRAG_LIST
List of frag entries.
Definition: zlob0first.h:125
flst_base_node_t * free_list() const
Definition: zlob0first.h:517
size_t free_all_frag_pages()
Free all the fragment pages.
Definition: zlob0first.cc:648
void load_entry_s(fil_addr_t &addr, z_index_entry_t &entry)
Load the entry available in the given file address.
Definition: zlob0first.cc:429
uint32 space_id_t
Tablespace identifier.
Definition: api0api.h:59
std::ostream & print_index_entries(std::ostream &out) const
Print the index entries.
Definition: zlob0first.cc:130
void set_last_trx_id_no_redo(trx_id_t tid)
Update the last transaction identifier in the header, without generating redo logs.
Definition: zlob0first.h:495
void set_page_type()
Definition: zlob0first.h:426
z_index_entry_t alloc_index_entry(bool bulk)
Allocate one index entry.
Definition: zlob0first.cc:191
ulint payload()
Amount of zlob data that can be stored in first page (in bytes).
Definition: zlob0first.h:173
void mark_cannot_be_partially_updated(trx_t *trx)
When the bit is set, the LOB is not partially updatable anymore.
Definition: zlob0first.cc:481
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: zlob0first.h:265
static const ulint OFFSET_TRX_ID
The transaction that created data in the data portion.
Definition: zlob0first.h:106
std::ostream & print(std::ostream &out) const
Print the page.
Definition: zlob0first.cc:351
trx_id_t get_last_trx_id() const
Definition: zlob0first.h:507
bool can_be_partially_updated()
When the bit is set, the LOB is not partially updatable anymore.
Definition: zlob0first.h:476
File space address.
Definition: fil0fil.h:1154
mtr_log_t get_log_mode() const
Get the logging mode.
void load_entry_x(fil_addr_t &addr, z_index_entry_t &entry)
Load the entry available in the given file address.
Definition: zlob0first.cc:433
page_no_t page_no() const
Retrieve the page number.
Definition: buf0types.h:204
Provides the large objects (LOB) module.
Definition: lob0del.h:31
@ MTR_MEMO_PAGE_X_FIX
Definition: mtr0types.h:261
An index entry pointing to one zlib stream.
Definition: zlob0index.h:110
flst_node_t * addr2ptr_s(fil_addr_t &addr)
Load the page, in s-latch mode, containing the given file address.
Definition: zlob0first.h:599
The first page of an zlob.
Definition: zlob0first.h:61
static const ulint OFFSET_FREE_FRAG_LIST
List of free frag entries.
Definition: zlob0first.h:121
Definition: trx0trx.h:836
page_id_t id
Page id.
Definition: buf0buf.h:1401
static int flags[50]
Definition: hp_test1.cc:39