Structure to hold number of multiple values.
More...
#include <data0data.h>
|
void | alloc (uint32_t num, bool bitset, mem_heap_t *heap) |
| Allocate specified number of elements for all arrays and initialize the structure accordingly. More...
|
|
void | alloc_bitset (mem_heap_t *heap, uint32_t size=0) |
| Allocate the bitset for current data array. More...
|
|
bool | equal (const multi_value_data *multi_value) const |
| Check if two multi_value_data are equal or not, regardless of bitset. More...
|
|
void | copy (const multi_value_data *multi_value, mem_heap_t *heap) |
| Copy a multi_value_data structure. More...
|
|
bool | has (const dtype_t *type, const byte *data, uint64_t len) const |
| Compare and check if one value from dfield_t is in current data set. More...
|
|
bool | has (ulint mtype, ulint prtype, const byte *data, uint64_t len) const |
| Compare and check if one value from dfield_t is in current data set. More...
|
|
bool | duplicate () const |
|
Structure to hold number of multiple values.
◆ alloc()
void multi_value_data::alloc |
( |
uint32_t |
num, |
|
|
bool |
bitset, |
|
|
mem_heap_t * |
heap |
|
) |
| |
Allocate specified number of elements for all arrays and initialize the structure accordingly.
- Parameters
-
[in] | num | number of elements to allocate |
[in] | bitset | true if memory for bitset should be allocated too |
[in,out] | heap | memory heap |
◆ alloc_bitset()
void multi_value_data::alloc_bitset |
( |
mem_heap_t * |
heap, |
|
|
uint32_t |
size = 0 |
|
) |
| |
Allocate the bitset for current data array.
- Parameters
-
[in,out] | heap | memory heap |
[in] | size | size of the bitset, if 0 or default, the size would be num_v |
◆ copy()
Copy a multi_value_data structure.
- Parameters
-
[in] | multi_value | multi_value structure to copy from |
[in,out] | heap | memory heap |
◆ copy_low()
Copy a multi_value_data structure, current one should be bigger or equal to the one to be copied.
- Parameters
-
[in] | multi_value | multi_value structure to copy from |
[in,out] | heap | memory heap |
◆ duplicate()
bool multi_value_data::duplicate |
( |
| ) |
const |
|
inline |
◆ equal()
Check if two multi_value_data are equal or not, regardless of bitset.
- Parameters
-
[in] | multi_value | Another multi-value data to be compared |
- Returns
- true if two data structures are equal, otherwise false
◆ has() [1/2]
bool multi_value_data::has |
( |
const dtype_t * |
type, |
|
|
const byte * |
data, |
|
|
uint64_t |
len |
|
) |
| const |
Compare and check if one value from dfield_t is in current data set.
Any caller calls this function to check if one field from clustered index is equal to a record on multi-value index should understand that this function can only be used for equality comparison, rather than order comparison
- Parameters
-
[in] | type | type of the data |
[in] | data | data value to compare |
[in] | len | length of data |
- Returns
- true if the value exists in current data set, otherwise false
◆ has() [2/2]
bool multi_value_data::has |
( |
ulint |
mtype, |
|
|
ulint |
prtype, |
|
|
const byte * |
data, |
|
|
uint64_t |
len |
|
) |
| const |
Compare and check if one value from dfield_t is in current data set.
Any caller calls this function to check if one field from clustered index is equal to a record on multi-value index should understand that this function can only be used for equality comparison, rather than order comparison
- Parameters
-
[in] | mtype | mtype of data |
[in] | prtype | prtype of data |
[in] | data | data value to compare |
[in] | len | length of data |
- Returns
- true if the value exists in current data set, otherwise false
◆ bitset
Bitset* multi_value_data::bitset |
Bitset to indicate which data should be handled for current data array.
This is mainly used for UPDATE case. UPDATE may not need to delete all old values and insert all new values because there could be some same values in both old and new data array. If current data array is for INSERT and DELETE, this can(should) be nullptr since all values in current array should be handled in these two cases.
◆ conv_buf
uint64_t* multi_value_data::conv_buf |
convert buffer if the data is an integer
◆ data_len
uint32_t* multi_value_data::data_len |
each individual value length
◆ datap
const void** multi_value_data::datap |
points to different value
◆ num_alc
uint32_t multi_value_data::num_alc |
number of pointers allocated
◆ num_v
uint32_t multi_value_data::num_v |
◆ s_default_allocate_num
constexpr uint32_t multi_value_data::s_default_allocate_num = 24 |
|
staticconstexpr |
default number of multiple values
The documentation for this struct was generated from the following files: