172 std::ostream &
print(std::ostream &out)
const {
173 out <<
"[flst_base_node_t: len=" <<
len <<
", first=" <<
first
174 <<
", last=" <<
last <<
"]";
180 return (obj.
print(out));
200 flst_node_t *node2, std::vector<buf_block_t *> &blocks);
212 std::vector<buf_block_t *> &blocks);
238 std::vector<buf_block_t *> &blocks);
258 ut_ad(faddr !=
nullptr);
270 ut_ad(faddr !=
nullptr);
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
byte fil_faddr_t
'type' definition in C: an address stored in a file page is a string of bytes
Definition: fil0fil.h:1170
constexpr size_t FIL_ADDR_PAGE
First in address is the page offset.
Definition: fil0types.h:122
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 size_t FIL_ADDR_BYTE
Then comes 2-byte byte offset within page.
Definition: fil0types.h:125
static fil_addr_t flst_get_next_addr(const flst_node_t *node, mtr_t *mtr)
Gets list next node address.
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
constexpr ulint FLST_BASE_NODE_SIZE
Definition: fut0lst.h:50
void flst_remove(flst_base_node_t *base, flst_node_t *node2, mtr_t *mtr)
Removes a node.
Definition: fut0lst.cc:287
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 ulint flst_get_len(const flst_base_node_t *base)
Get the length of a list.
constexpr ulint FLST_NODE_SIZE
Definition: fut0lst.h:53
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
static fil_addr_t flst_get_last(const flst_base_node_t *base, mtr_t *mtr)
Gets list last node address.
static void flst_init(flst_base_node_t *base, mtr_t *mtr)
Initializes a list base node.
static fil_addr_t flst_get_prev_addr(const flst_node_t *node, mtr_t *mtr)
Gets list prev node address.
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
std::ostream & operator<<(std::ostream &out, const flst_bnode_t &obj)
Definition: fut0lst.h:179
void flst_validate(const flst_base_node_t *base, mtr_t *mtr1)
Validates a file-based list.
Definition: fut0lst.cc:353
static fil_addr_t flst_get_first(const flst_base_node_t *base, mtr_t *mtr)
Gets list first node address.
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
byte flst_node_t
Definition: fut0lst.h:47
File-based list utilities.
constexpr uint32_t FLST_PREV
6-byte address of the previous list element; the page part of address is FIL_NULL,...
Definition: fut0lst.ic:41
constexpr uint32_t FLST_LAST
6-byte address of the last element of the list; undefined if empty list
Definition: fut0lst.ic:52
constexpr uint32_t FLST_LEN
32-bit list length field
Definition: fut0lst.ic:48
constexpr uint32_t FLST_FIRST
6-byte address of the first element of the list; undefined if empty list
Definition: fut0lst.ic:50
constexpr uint32_t FLST_NEXT
Definition: fut0lst.ic:44
static uint32_t mach_read_ulint(const byte *ptr, mlog_id_t type)
Read 1 to 4 bytes from a file page buffered in the buffer pool.
static void mach_write_to_4(byte *b, ulint n)
The following function is used to store data in 4 consecutive bytes.
static void mach_write_ulint(byte *ptr, ulint val, mlog_id_t type)
Writes 1, 2 or 4 bytes to a file page.
Definition: mach0data.h:292
@ MLOG_4BYTES
4 bytes ...
Definition: mtr0types.h:76
@ MLOG_2BYTES
2 bytes ...
Definition: mtr0types.h:73
Used for bulk load of data.
Definition: fut0lst.cc:411
fil_addr_t flst_get_prev_addr(const flst_node_t *node)
Gets list prev node address.
Definition: fut0lst.h:281
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
fil_addr_t flst_read_addr(const fil_faddr_t *faddr)
Reads a file address.
Definition: fut0lst.h:269
void flst_remove(flst_base_node_t *base, flst_node_t *node2, std::vector< buf_block_t * > &blocks)
Bulk load version.
Definition: fut0lst.cc:441
void flst_write_addr(fil_faddr_t *faddr, fil_addr_t addr)
Writes a file address.
Definition: fut0lst.h:257
fil_addr_t flst_get_last(const flst_base_node_t *base)
Gets list last node address.
Definition: fut0lst.h:289
void flst_init(flst_base_node_t *base)
Initializes a list base node.
Definition: fut0lst.h:251
void flst_add_last(flst_base_node_t *base, flst_node_t *node, std::vector< buf_block_t * > &blocks)
Adds a node as the last node in a list.
Definition: fut0lst.cc:511
fil_addr_t flst_get_next_addr(const flst_node_t *node)
Gets list next node address.
Definition: fut0lst.h:285
fil_addr_t flst_get_first(const flst_base_node_t *base)
Gets list first node address.
Definition: fut0lst.h:265
void flst_insert_after(flst_base_node_t *base, flst_node_t *node1, flst_node_t *node2, std::vector< buf_block_t * > &blocks)
Inserts a node after another in a list.
Definition: fut0lst.cc:543
File space address.
Definition: fil0fil.h:1173
uint32_t boffset
Byte offset within the page.
Definition: fil0fil.h:1205
page_no_t page
Page number within a space.
Definition: fil0fil.h:1202
In-memory representation of flst_base_node_t.
Definition: fut0lst.h:148
ulint len
Definition: fut0lst.h:149
std::ostream & print(std::ostream &out) const
Definition: fut0lst.h:172
flst_bnode_t()
Definition: fut0lst.h:153
fil_addr_t last
Definition: fut0lst.h:151
flst_bnode_t(const flst_base_node_t *base, mtr_t *mtr)
Definition: fut0lst.h:155
void set(const flst_base_node_t *base, mtr_t *mtr)
Definition: fut0lst.h:160
fil_addr_t first
Definition: fut0lst.h:150
void reset()
Definition: fut0lst.h:166
Mini-transaction handle and buffer.
Definition: mtr0mtr.h:177
Version control for database, common definitions, and include files.
#define UNIV_PAGE_SIZE
The universal page size of the database.
Definition: univ.i:294
unsigned long int ulint
Definition: univ.i:406
static ulint ut_align_offset(const void *ptr, ulint align_no)
The following function computes the offset of a pointer from the nearest aligned address.
#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