MySQL 8.0.40
Source Code Documentation
|
File-based list utilities. More...
Go to the source code of this file.
Classes | |
struct | flst_bnode_t |
In-memory representation of flst_base_node_t. More... | |
Typedefs | |
typedef byte | flst_base_node_t |
typedef byte | flst_node_t |
Functions | |
static void | flst_init (flst_base_node_t *base, mtr_t *mtr) |
Initializes a list base node. More... | |
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. More... | |
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. More... | |
void | flst_remove (flst_base_node_t *base, flst_node_t *node2, mtr_t *mtr) |
Removes a node. More... | |
static ulint | flst_get_len (const flst_base_node_t *base) |
Get the length of a list. More... | |
static fil_addr_t | flst_get_first (const flst_base_node_t *base, mtr_t *mtr) |
Gets list first node address. More... | |
static fil_addr_t | flst_get_last (const flst_base_node_t *base, mtr_t *mtr) |
Gets list last node address. More... | |
static fil_addr_t | flst_get_next_addr (const flst_node_t *node, mtr_t *mtr) |
Gets list next node address. More... | |
static fil_addr_t | flst_get_prev_addr (const flst_node_t *node, mtr_t *mtr) |
Gets list prev node address. More... | |
static void | flst_write_addr (fil_faddr_t *faddr, fil_addr_t addr, mtr_t *mtr) |
Writes a file address. More... | |
static fil_addr_t | flst_read_addr (const fil_faddr_t *faddr, mtr_t *mtr) |
Reads a file address. More... | |
void | flst_validate (const flst_base_node_t *base, mtr_t *mtr1) |
Validates a file-based list. More... | |
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. More... | |
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. More... | |
std::ostream & | operator<< (std::ostream &out, const flst_bnode_t &obj) |
Variables | |
constexpr ulint | FLST_BASE_NODE_SIZE = 4 + 2 * FIL_ADDR_SIZE |
constexpr ulint | FLST_NODE_SIZE = 2 * FIL_ADDR_SIZE |
File-based list utilities.
Created 11/28/1995 Heikki Tuuri
typedef byte flst_base_node_t |
typedef byte flst_node_t |
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.
[in] | base | Pointer to base node of list |
[in] | node | Node to add |
[in] | mtr | Mini-transaction handle |
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.
[in] | base | Pointer to base node of list |
[in] | node | Node to add |
[in] | mtr | Mini-transaction handle |
|
inlinestatic |
Gets list first node address.
[in] | base | Pointer to base node |
[in] | mtr | Mini-transaction handle |
|
inlinestatic |
Gets list last node address.
[in] | base | Pointer to base node |
[in] | mtr | Mini-transaction handle |
|
inlinestatic |
Get the length of a list.
[in] | base | base node |
|
inlinestatic |
Gets list next node address.
[in] | node | Pointer to node |
[in] | mtr | Mini-transaction handle |
|
inlinestatic |
Gets list prev node address.
[in] | node | Pointer to node |
[in] | mtr | Mini-transaction handle |
|
inlinestatic |
Initializes a list base node.
[in] | base | Pointer to base node |
[in] | mtr | Mini-transaction handle |
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.
[in] | base | Pointer to base node of list |
[in] | node1 | Node to insert after |
[in] | node2 | Node to add |
[in] | mtr | Mini-transaction handle. |
in: mini-transaction handle
base | in: pointer to base node of list |
node1 | in: node to insert after |
node2 | in: node to add |
mtr | in: mini-transaction handle |
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.
[in] | base | Pointer to base node of list |
[in] | node2 | Node to insert |
[in] | node3 | Node to insert before |
[in] | mtr | Mini-transaction handle. |
in: mini-transaction handle
base | in: pointer to base node of list |
node2 | in: node to insert |
node3 | in: node to insert before |
mtr | in: mini-transaction handle |
|
inlinestatic |
Reads a file address.
[in] | faddr | Pointer to file faddress |
[in] | mtr | Mini-transaction handle |
void flst_remove | ( | flst_base_node_t * | base, |
flst_node_t * | node2, | ||
mtr_t * | mtr | ||
) |
Removes a node.
[in] | base | Pointer to base node of list |
[in] | node2 | Node to remove |
[in] | mtr | Mini-transaction handle |
void flst_validate | ( | const flst_base_node_t * | base, |
mtr_t * | mtr1 | ||
) |
Validates a file-based list.
[in] | base | pointer to base node of list |
[in] | mtr1 | mtr |
|
inlinestatic |
Writes a file address.
[in] | faddr | Pointer to file faddress |
[in] | addr | File address |
[in] | mtr | Mini-transaction handle |
|
inline |
|
constexpr |
|
constexpr |