MySQL 9.1.0
Source Code Documentation
zlob0index.h
Go to the documentation of this file.
1/*****************************************************************************
2
3Copyright (c) 2016, 2024, Oracle and/or its affiliates.
4
5This program is free software; you can redistribute it and/or modify it under
6the terms of the GNU General Public License, version 2.0, as published by the
7Free Software Foundation.
8
9This program is designed to work with certain software (including
10but not limited to OpenSSL) that is licensed under separate terms,
11as designated in a particular file or component or in included license
12documentation. The authors of MySQL hereby grant you an additional
13permission to link the program and your derivative works with the
14separately licensed software that they have either included with
15the program or referenced in the documentation.
16
17This program is distributed in the hope that it will be useful, but WITHOUT
18ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
19FOR A PARTICULAR PURPOSE. See the GNU General Public License, version 2.0,
20for more details.
21
22You should have received a copy of the GNU General Public License along with
23this program; if not, write to the Free Software Foundation, Inc.,
2451 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
26*****************************************************************************/
27#ifndef zlob0index_h
28#define zlob0index_h
29
30#include "fil0fil.h"
31#include "fut0lst.h"
32#include "lob0impl.h"
33
34namespace lob {
35
36/** In-memory copy of the information from z_index_entry_t. */
40
41 /** The location of this index entry node. */
43
53
54 /** Uncompressed data length. */
56
57 /** Compressed data length. */
59
60 std::ostream &print(std::ostream &out) const;
61
62 /** Initialize all the members. */
63 void reset() {
68 m_trx_id = 0;
70 m_trx_undo_no = 0;
73 m_z_frag_id = 0;
74 m_data_len = 0;
75 m_z_data_len = 0;
76 }
77
78 bool is_null() { return (m_self.is_equal(fil_addr_null)); }
79};
80
81inline std::ostream &operator<<(std::ostream &out,
82 const z_index_entry_mem_t &obj) {
83 return (obj.print(out));
84}
85
86/** An index entry pointing to one zlib stream. */
88 /** Offset with index entry pointing to the prev index entry. */
89 static const ulint OFFSET_PREV = 0;
90
91 /** Offset with index entry pointing to the next index entry. */
93
94 /** Offset within index entry pointing to base node of list of
95 versions.*/
97
98 /** Offset within index entry pointing to creator trxid.*/
100
101 /** The modifier trx id. */
103
104 /** Offset within index entry pointing to trx undo no.*/
106
107 /** Offset within index entry pointing to modifier trx undo no.*/
109
110 /** Offset within index entry pointing to page number where zlib
111 stream starts. This could be a data page or a fragment page. */
113
114 /** Offset within index entry pointing to location of zlib stream.*/
116
117 /** Offset within index entry pointing to uncompressed data
118 len (bytes).*/
120
121 /** Offset within index entry pointing to compressed data len
122 (bytes).*/
124
125 /** LOB version */
127
128 /** Total size of one index entry. */
129 static const ulint SIZE = OFFSET_LOB_VERSION + 4;
130
131 /** Constructor. */
132 z_index_entry_t(flst_node_t *node, mtr_t *mtr) : m_node(node), m_mtr(mtr) {}
133
134 /** Constructor. */
136 : m_node(node), m_mtr(mtr), m_index(index) {}
137
138 /** Constructor
139 @param[in] mtr the mini-transaction
140 @param[in] index the clustered index to which LOB belongs. */
142 : m_node(nullptr),
143 m_mtr(mtr),
144 m_index(index),
147
148 /** Constructor
149 @param[in] node the location where index entry starts. */
151 : m_node(node),
152 m_mtr(nullptr),
156
157 /** Default constructor */
159 : m_node(nullptr),
160 m_mtr(nullptr),
164
165 void set_index(dict_index_t *index) { m_index = index; }
166
167 /** Point to another index entry.
168 @param[in] node point to this file list node. */
169 void reset(flst_node_t *node) { m_node = node; }
170
171 /** Point to another index entry.
172 @param[in] entry another index entry.*/
173 void reset(const z_index_entry_t &entry) { m_node = entry.m_node; }
174
175 /** Initialize an index entry to some sane value. */
176 void init() {
177 ut_ad(m_mtr != nullptr);
178
182 set_trx_id(0);
186 set_data_len(0);
187 set_zdata_len(0);
188 }
189
190 /** Determine if the current index entry be rolled back.
191 @param[in] trxid the transaction that is being rolled
192 back.
193 @param[in] undo_no the savepoint undo number of trx,
194 up to which rollback happens.
195 @return true if this entry can be rolled back, false otherwise. */
196 bool can_rollback(trx_id_t trxid, undo_no_t undo_no) {
197 /* For rollback, make use of creator trx id. */
198 return ((trxid == get_trx_id()) && (get_trx_undo_no() >= undo_no));
199 }
200
201 /** Determine if the current index entry be purged.
202 @param[in] trxid the transaction that is being purged.
203 @param[in] undo_no the undo number of trx.
204 @return true if this entry can be purged, false otherwise. */
205 bool can_be_purged(trx_id_t trxid, undo_no_t undo_no) {
206 return ((trxid == get_trx_id_modifier()) &&
207 (get_trx_undo_no_modifier() == undo_no));
208 }
209
210 /** Purge one index entry.
211 @param[in] index index to which LOB belongs.
212 @param[in] first first page of LOB.
213 @param[in,out] lst list from which this entry will be
214 removed.
215 @param[in,out] free_list list to which this entry will be
216 added.*/
219
220 /** Purge the current index entry. An index entry points to either a
221 FIRST page or DATA page. That LOB page will be freed if it is DATA
222 page. A FIRST page should not be freed. */
223 void purge(dict_index_t *index, z_first_page_t &first);
224
225 /** Remove this node from the given list.
226 @param[in] bnode the base node of the list from which to remove
227 current node. */
229 ut_ad(m_mtr != nullptr);
230
231 flst_remove(bnode, m_node, m_mtr);
232 }
233
234 /** Insert the given index entry after the current index entry.
235 @param[in] base the base node of the file based list.
236 @param[in] entry the new node to be inserted.*/
238 ut_ad(m_mtr != nullptr);
239
240 flst_insert_after(base, m_node, entry.get_node(), m_mtr);
241 }
242
244 ut_ad(m_mtr != nullptr);
245
246 flst_insert_before(base, entry.get_node(), m_node, m_mtr);
247 }
248
249 /** Add this node as the last node in the given list.
250 @param[in] bnode the base node of the file list. */
252 ut_ad(m_mtr != nullptr);
253
254 flst_add_last(bnode, m_node, m_mtr);
255 }
256
257 /** Add this node as the last node in the given list.
258 @param[in] bnode the base node of the file list. */
260 ut_ad(m_mtr != nullptr);
261 flst_add_first(bnode, m_node, m_mtr);
262 }
263
264 /** Set the previous index entry as null. */
267 }
268
269 /** Get the location of previous index entry. */
272 }
273
274 /** Get the location of next index entry.
275 @return the file address of the next index entry. */
278 }
279
280 /** Set the next index entry as null. */
282 ut_ad(m_mtr != nullptr);
284 }
285
286 /** Set the versions list as null. */
289 flst_init(bnode, m_mtr);
290 }
291
292 /** Get the base node of the list of versions. */
294 return (m_node + OFFSET_VERSIONS);
295 }
296
297 /** Get the base node of the list of versions. */
299 ut_ad(m_mtr != nullptr);
301 return (flst_bnode_t(node, m_mtr));
302 }
303
306 }
307
310 }
311
312 /** Get the undo number of the creator transaction. This is used
313 for rollback purposes.
314 @return the undo number of creator trx. */
316 byte *ptr = m_node + OFFSET_TRX_UNDO_NO;
317 return (mach_read_from_4(ptr));
318 }
319
320 /** Get the undo number of the modifier transaction. This is used
321 for purging purposes.
322 @return the undo number of modifier trx. */
325 return (mach_read_from_4(ptr));
326 }
327
328 /** Set the trx identifier to given value, without generating redo
329 log records.
330 @param[in] id the given trx identifier.*/
332 byte *ptr = m_node + OFFSET_TRXID;
333 mach_write_to_6(ptr, id);
334 }
335
336 /** Set the trx identifier to given value.
337 @param[in] id the given trx identifier.*/
339 ut_ad(m_mtr != nullptr);
340 byte *ptr = m_node + OFFSET_TRXID;
341 mach_write_to_6(ptr, id);
342 mlog_log_string(ptr, 6, m_mtr);
343 }
344
345 /** Set the modifier trxid to the given value.
346 @param[in] id the modifier trxid.*/
348 ut_ad(m_mtr != nullptr);
349
350 byte *ptr = m_node + OFFSET_TRXID_MODIFIER;
351 mach_write_to_6(ptr, id);
352 mlog_log_string(ptr, 6, m_mtr);
353 }
354
355 /** Set the modifier trxid to the given value, without generating
356 redo log records.
357 @param[in] id the modifier trxid.*/
359 byte *ptr = m_node + OFFSET_TRXID_MODIFIER;
360 mach_write_to_6(ptr, id);
361 }
362
363 /** Set the undo number of the creator trx.
364 @param[in] undo_no the undo number value.*/
366 ut_ad(m_mtr != nullptr);
367 byte *ptr = m_node + OFFSET_TRX_UNDO_NO;
368 mlog_write_ulint(ptr, undo_no, MLOG_4BYTES, m_mtr);
369 }
370
371 /** Set the undo number of the modifier trx.
372 @param[in] undo_no the undo number value.*/
374 ut_ad(m_mtr != nullptr);
376 mlog_write_ulint(ptr, undo_no, MLOG_4BYTES, m_mtr);
377 }
378
381 }
382
383 /** Set the page number pointed to by this index entry to FIL_NULL.
384 @param[in] mtr The mini-transaction used for this modification. */
387 }
388
389 /** Free the data pages pointed to by this index entry.
390 @param[in] mtr the mini-transaction used to free the pages.
391 @return the number of pages freed. */
392 size_t free_data_pages(mtr_t *mtr);
393
394 /** Set the page number pointed to by this index entry to given value.
395 @param[in] page_no Page number to be put in index entry. */
396 void set_z_page_no(page_no_t page_no) {
397 ut_ad(m_mtr != nullptr);
399 }
400
403 }
404
406 ut_ad(m_mtr != nullptr);
408 }
409
410 /** Get the uncompressed data length in bytes. */
413 }
414
415 /** Set the uncompressed data length in bytes.
416 @param[in] len the uncompressed data length in bytes */
417 void set_data_len(ulint len) {
418 ut_ad(m_mtr != nullptr);
420 }
421
422 /** Get the compressed data length in bytes. */
425 }
426
427 /** Set the compressed data length in bytes.
428 @param[in] len the compressed data length in bytes */
430 ut_ad(m_mtr != nullptr);
432 }
433
434 /** Get the LOB version. */
435 uint32_t get_lob_version() const {
437 }
438
439 /** Set the LOB version .
440 @param[in] version the lob version. */
442 ut_ad(m_mtr != nullptr);
444 }
445
446 /* The given entry becomes the old version of the current entry.
447 Move the version base node from old entry to current entry.
448 @param[in] entry the old entry */
450
451 /** The current index entry points to a latest LOB page. It may or
452 may not have older versions. If older version is there, bring it
453 back to the index list from the versions list. Then remove the
454 current entry from the index list. Move the versions list from
455 current entry to older entry.
456 @param[in] index the index in which LOB exists.
457 @param[in] first The first lob page containing index list and free
458 list. */
460 z_first_page_t &first);
461
462 flst_node_t *get_node() { return (m_node); }
463 bool is_null() const { return (m_node == nullptr); }
464
465 std::ostream &print(std::ostream &out) const;
466 std::ostream &print_pages(std::ostream &out) const;
467
468 /** Load the page (in shared mode) whose number was cached.
469 @return the buffer block of the page loaded. */
472
475 m_block =
476 buf_page_get(page_id, page_size, RW_S_LATCH, UT_LOCATION_HERE, m_mtr);
477 return (m_block);
478 }
479
480 /** Load the given file address in s mode.
481 @param[in] addr the file address of the required node. */
482 void load_s(fil_addr_t &addr) {
484 const page_size_t page_size = dict_table_page_size(m_index->table);
485 m_node = fut_get_ptr(space, page_size, addr, RW_S_LATCH, m_mtr, &m_block);
487 }
488
489 /** Load the given file address in x mode.
490 @param[in] addr the file address of the required node. */
491 void load_x(fil_addr_t &addr) {
493 const page_size_t page_size = dict_table_page_size(m_index->table);
494 m_node = fut_get_ptr(space, page_size, addr, RW_X_LATCH, m_mtr, &m_block);
496 }
497
498 /** Read the given LOB index entry.
499 @param[in] entry_mem the LOB index entry. */
500 void read(z_index_entry_mem_t &entry_mem) const;
501
502 /** Read the given LOB index entry and then commit the mtr.
503 @param[in] entry_mem the LOB index entry. */
505 read(entry_mem);
507 m_node = nullptr;
508 }
509
510 /** Get the location of the current index entry. */
511 fil_addr_t get_self() const;
512
513 private:
514 /** Move the version base node from current entry to the given entry.
515 @param[in] entry The index entry to which the version base
516 node is moved to. */
518
519 /** The file list node in a db page. This node is persisted. */
521
522 /** A mini-transaction. */
524
525 /** The index containing the LOB. */
527
528 /** The buffer block in which this entry exists. While reading data
529 from m_node, appropriate latches must be held on this block. */
531
532 /** The page number in which this entry is available. This
533 information will be cached and can be used to reload the page
534 conveniently. */
536};
537
538inline std::ostream &operator<<(std::ostream &out, const z_index_entry_t &obj) {
539 return (obj.print(out));
540}
541
542} /* namespace lob */
543
544#endif /* zlob0index_h */
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
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
Page identifier.
Definition: buf0types.h:207
Page size descriptor.
Definition: page0size.h:50
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
The low-level file system.
constexpr page_no_t FIL_NULL
'null' (undefined) page offset in the context of file spaces
Definition: fil0fil.h:1156
constexpr size_t FIL_ADDR_SIZE
Address size is 6 bytes.
Definition: fil0types.h:128
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
void flst_insert_after(flst_base_node_t *base, flst_node_t *node1, flst_node_t *node2, mtr_t *mtr)
Inserts a node after another in a list.
Definition: fut0lst.cc:172
void flst_insert_before(flst_base_node_t *base, flst_node_t *node2, flst_node_t *node3, mtr_t *mtr)
Inserts a node before another in a list.
Definition: fut0lst.cc:228
File-based list utilities.
constexpr ulint FLST_BASE_NODE_SIZE
Definition: fut0lst.h:50
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.
static void flst_init(flst_base_node_t *base, mtr_t *mtr)
Initializes a list base node.
byte flst_node_t
Definition: fut0lst.h:47
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.
static uint64_t mach_read_from_6(const byte *b)
The following function is used to fetch data from 6 consecutive bytes.
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_commit(m)
Commit a mini-transaction.
Definition: mtr0mtr.h:59
@ MLOG_4BYTES
4 bytes ...
Definition: mtr0types.h:76
@ MLOG_2BYTES
2 bytes ...
Definition: mtr0types.h:73
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
Provides the large objects (LOB) module.
Definition: lob0bulk.h:44
ulint frag_id_t
Definition: lob0impl.h:489
const ulint FRAG_ID_NULL
Definition: lob0impl.h:490
std::ostream & operator<<(std::ostream &out, const plist_node_t &obj)
Definition: lob0impl.h:239
required uint64 version
Definition: replication_group_member_actions.proto:41
void free_list(I_List< i_string > *list)
Definition: sql_list.cc:31
Definition: completion_hash.h:35
The buffer control block structure.
Definition: buf0buf.h:1747
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
bool is_equal(const fil_addr_t &rhs) const
Compare to instances.
Definition: fil0fil.h:1185
In-memory representation of flst_base_node_t.
Definition: fut0lst.h:148
void reset()
Definition: fut0lst.h:166
The first page of an zlob.
Definition: zlob0first.h:38
In-memory copy of the information from z_index_entry_t.
Definition: zlob0index.h:37
frag_id_t m_z_frag_id
Definition: zlob0index.h:52
undo_no_t m_trx_undo_no_modifier
Definition: zlob0index.h:50
std::ostream & print(std::ostream &out) const
Definition: zlob0index.cc:238
undo_no_t m_trx_undo_no
Definition: zlob0index.h:49
trx_id_t m_trx_id
Definition: zlob0index.h:47
fil_addr_t m_next
Definition: zlob0index.h:45
fil_addr_t m_prev
Definition: zlob0index.h:44
ulint m_z_data_len
Compressed data length.
Definition: zlob0index.h:58
z_index_entry_mem_t()
Definition: zlob0index.h:38
flst_bnode_t m_versions
Definition: zlob0index.h:46
bool is_null()
Definition: zlob0index.h:78
page_no_t m_z_page_no
Definition: zlob0index.h:51
trx_id_t m_trx_id_modifier
Definition: zlob0index.h:48
ulint m_data_len
Uncompressed data length.
Definition: zlob0index.h:55
void reset()
Initialize all the members.
Definition: zlob0index.h:63
fil_addr_t m_self
The location of this index entry node.
Definition: zlob0index.h:42
An index entry pointing to one zlib stream.
Definition: zlob0index.h:87
z_index_entry_t(flst_node_t *node, mtr_t *mtr)
Constructor.
Definition: zlob0index.h:132
size_t free_data_pages(mtr_t *mtr)
Free the data pages pointed to by this index entry.
Definition: zlob0index.cc:250
z_index_entry_t(flst_node_t *node, mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: zlob0index.h:135
uint32_t get_lob_version() const
Get the LOB version.
Definition: zlob0index.h:435
fil_addr_t get_next() const
Get the location of next index entry.
Definition: zlob0index.h:276
static const ulint OFFSET_TRX_UNDO_NO_MODIFIER
Offset within index entry pointing to modifier trx undo no.
Definition: zlob0index.h:108
buf_block_t * load_s()
Load the page (in shared mode) whose number was cached.
Definition: zlob0index.h:470
static const ulint OFFSET_TRXID_MODIFIER
The modifier trx id.
Definition: zlob0index.h:102
void set_trx_id_modifier_no_redo(trx_id_t id)
Set the modifier trxid to the given value, without generating redo log records.
Definition: zlob0index.h:358
static const ulint OFFSET_PREV
Offset with index entry pointing to the prev index entry.
Definition: zlob0index.h:89
void move_version_base_node(z_index_entry_t &entry)
Move the version base node from current entry to the given entry.
Definition: zlob0index.cc:209
page_no_t get_z_page_no() const
Definition: zlob0index.h:379
fil_addr_t make_old_version_current(dict_index_t *index, z_first_page_t &first)
The current index entry points to a latest LOB page.
Definition: zlob0index.cc:55
static const ulint OFFSET_NEXT
Offset with index entry pointing to the next index entry.
Definition: zlob0index.h:92
static const ulint OFFSET_Z_PAGE_NO
Offset within index entry pointing to page number where zlib stream starts.
Definition: zlob0index.h:112
mtr_t * m_mtr
A mini-transaction.
Definition: zlob0index.h:523
void set_zdata_len(ulint len)
Set the compressed data length in bytes.
Definition: zlob0index.h:429
static const ulint OFFSET_DATA_LEN
Offset within index entry pointing to uncompressed data len (bytes).
Definition: zlob0index.h:119
ulint get_data_len() const
Get the uncompressed data length in bytes.
Definition: zlob0index.h:411
static const ulint OFFSET_TRX_UNDO_NO
Offset within index entry pointing to trx undo no.
Definition: zlob0index.h:105
std::ostream & print(std::ostream &out) const
Definition: zlob0index.cc:142
trx_id_t get_trx_id() const
Definition: zlob0index.h:304
void reset(flst_node_t *node)
Point to another index entry.
Definition: zlob0index.h:169
z_index_entry_t(flst_node_t *node)
Constructor.
Definition: zlob0index.h:150
void push_front(flst_base_node_t *bnode)
Add this node as the last node in the given list.
Definition: zlob0index.h:259
std::ostream & print_pages(std::ostream &out) const
Definition: zlob0index.cc:160
ulint get_zdata_len() const
Get the compressed data length in bytes.
Definition: zlob0index.h:423
void set_z_page_no(page_no_t page_no)
Set the page number pointed to by this index entry to given value.
Definition: zlob0index.h:396
trx_id_t get_trx_id_modifier() const
Definition: zlob0index.h:308
flst_bnode_t get_versions_mem() const
Get the base node of the list of versions.
Definition: zlob0index.h:298
z_index_entry_t()
Default constructor.
Definition: zlob0index.h:158
void insert_before(flst_base_node_t *base, z_index_entry_t &entry)
Definition: zlob0index.h:243
static const ulint OFFSET_VERSIONS
Offset within index entry pointing to base node of list of versions.
Definition: zlob0index.h:96
void set_prev_null()
Set the previous index entry as null.
Definition: zlob0index.h:265
void set_lob_version(ulint version)
Set the LOB version .
Definition: zlob0index.h:441
undo_no_t get_trx_undo_no_modifier() const
Get the undo number of the modifier transaction.
Definition: zlob0index.h:323
static const ulint OFFSET_Z_FRAG_ID
Offset within index entry pointing to location of zlib stream.
Definition: zlob0index.h:115
bool can_rollback(trx_id_t trxid, undo_no_t undo_no)
Determine if the current index entry be rolled back.
Definition: zlob0index.h:196
void remove(flst_base_node_t *bnode)
Remove this node from the given list.
Definition: zlob0index.h:228
void set_z_page_no_null(mtr_t *mtr)
Set the page number pointed to by this index entry to FIL_NULL.
Definition: zlob0index.h:385
void reset(const z_index_entry_t &entry)
Point to another index entry.
Definition: zlob0index.h:173
fil_addr_t get_self() const
Get the location of the current index entry.
Definition: zlob0index.cc:186
static const ulint OFFSET_ZDATA_LEN
Offset within index entry pointing to compressed data len (bytes).
Definition: zlob0index.h:123
flst_base_node_t * get_versions_list() const
Get the base node of the list of versions.
Definition: zlob0index.h:293
static const ulint OFFSET_LOB_VERSION
LOB version.
Definition: zlob0index.h:126
void init()
Initialize an index entry to some sane value.
Definition: zlob0index.h:176
void set_trx_id_no_redo(trx_id_t id)
Set the trx identifier to given value, without generating redo log records.
Definition: zlob0index.h:331
fil_addr_t purge_version(dict_index_t *index, z_first_page_t &first, flst_base_node_t *lst, flst_base_node_t *free_list)
Purge one index entry.
Definition: zlob0index.cc:35
void push_back(flst_base_node_t *bnode)
Add this node as the last node in the given list.
Definition: zlob0index.h:251
page_no_t get_z_frag_id() const
Definition: zlob0index.h:401
void read(z_index_entry_mem_t &entry_mem) const
Read the given LOB index entry.
Definition: zlob0index.cc:197
void set_index(dict_index_t *index)
Definition: zlob0index.h:165
undo_no_t get_trx_undo_no() const
Get the undo number of the creator transaction.
Definition: zlob0index.h:315
void set_trx_undo_no(undo_no_t undo_no)
Set the undo number of the creator trx.
Definition: zlob0index.h:365
buf_block_t * m_block
The buffer block in which this entry exists.
Definition: zlob0index.h:530
void insert_after(flst_base_node_t *base, z_index_entry_t &entry)
Insert the given index entry after the current index entry.
Definition: zlob0index.h:237
void set_next_null()
Set the next index entry as null.
Definition: zlob0index.h:281
flst_node_t * get_node()
Definition: zlob0index.h:462
bool can_be_purged(trx_id_t trxid, undo_no_t undo_no)
Determine if the current index entry be purged.
Definition: zlob0index.h:205
void set_trx_id(trx_id_t id)
Set the trx identifier to given value.
Definition: zlob0index.h:338
page_no_t m_page_no
The page number in which this entry is available.
Definition: zlob0index.h:535
void set_versions_null()
Set the versions list as null.
Definition: zlob0index.h:287
z_index_entry_t(mtr_t *mtr, dict_index_t *index)
Constructor.
Definition: zlob0index.h:141
void read_and_commit(z_index_entry_mem_t &entry_mem)
Read the given LOB index entry and then commit the mtr.
Definition: zlob0index.h:504
void set_data_len(ulint len)
Set the uncompressed data length in bytes.
Definition: zlob0index.h:417
static const ulint SIZE
Total size of one index entry.
Definition: zlob0index.h:129
void set_trx_id_modifier(trx_id_t id)
Set the modifier trxid to the given value.
Definition: zlob0index.h:347
dict_index_t * m_index
The index containing the LOB.
Definition: zlob0index.h:526
void set_z_frag_id(frag_id_t id)
Definition: zlob0index.h:405
static const ulint OFFSET_TRXID
Offset within index entry pointing to creator trxid.
Definition: zlob0index.h:99
void set_old_version(z_index_entry_t &entry)
Definition: zlob0index.cc:231
void load_x(fil_addr_t &addr)
Load the given file address in x mode.
Definition: zlob0index.h:491
flst_node_t * m_node
The file list node in a db page.
Definition: zlob0index.h:520
void set_trx_undo_no_modifier(undo_no_t undo_no)
Set the undo number of the modifier trx.
Definition: zlob0index.h:373
void purge(dict_index_t *index, z_first_page_t &first)
Purge the current index entry.
Definition: zlob0index.cc:89
void load_s(fil_addr_t &addr)
Load the given file address in s mode.
Definition: zlob0index.h:482
fil_addr_t get_prev() const
Get the location of previous index entry.
Definition: zlob0index.h:270
bool is_null() const
Definition: zlob0index.h:463
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:177
@ RW_X_LATCH
Definition: sync0rw.h:99
@ RW_S_LATCH
Definition: sync0rw.h:98
ib_id_t undo_no_t
Undo number.
Definition: trx0types.h:142
ib_id_t trx_id_t
Transaction identifier (DB_TRX_ID, DATA_TRX_ID)
Definition: trx0types.h:138
unsigned long int ulint
Definition: univ.i:406
#define UT_LOCATION_HERE
Definition: ut0core.h:73
#define ut_ad(EXPR)
Debug assertion.
Definition: ut0dbg.h:105