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