Partition specific Handler_share.
More...
#include <partition_handler.h>
Partition specific Handler_share.
◆ Partition_share()
Partition_share::Partition_share |
( |
| ) |
|
◆ ~Partition_share()
Partition_share::~Partition_share |
( |
| ) |
|
|
override |
◆ get_partition_name()
const char * Partition_share::get_partition_name |
( |
size_t |
part_id | ) |
const |
Get partition name.
- Parameters
-
part_id | Partition id (for subpartitioned table only subpartition names will be returned.) |
- Returns
- partition name or NULL if error.
◆ init_auto_inc_mutex()
bool Partition_share::init_auto_inc_mutex |
( |
TABLE_SHARE * |
table_share | ) |
|
Initializes and sets auto_inc_mutex.
Initialize auto increment mutex in share.
Only needed to be called if the table have an auto increment. Must hold TABLE_SHARE::LOCK_ha_data when calling.
- Returns
- Operation status.
- Return values
-
true | Failure (out of memory). |
false | Success. |
◆ insert_partition_name_in_hash()
bool Partition_share::insert_partition_name_in_hash |
( |
const char * |
name, |
|
|
uint |
part_id, |
|
|
bool |
is_subpart |
|
) |
| |
|
private |
Insert [sub]partition name into partition_name_hash.
- Parameters
-
name | Partition name. |
part_id | Partition id. |
is_subpart | True if subpartition else partition. |
- Returns
- Operation status.
- Return values
-
false | Success. |
true | Failure. |
◆ lock_auto_inc()
void Partition_share::lock_auto_inc |
( |
| ) |
|
|
inline |
lock mutex protecting auto increment value next_auto_inc_val.
◆ populate_partition_name_hash()
bool Partition_share::populate_partition_name_hash |
( |
partition_info * |
part_info | ) |
|
Populate partition_name_hash with partition and subpartition names from part_info.
Populate the partition_name_hash in part_share.
- Parameters
-
part_info | Partition info containing all partitions metadata. |
- Returns
- Operation status.
- Return values
-
false | Success. |
true | Failure. |
◆ release_auto_inc_if_possible()
Release reserved auto increment values not used.
- Parameters
-
thd | Thread. |
table_share | Table Share |
next_insert_id | Next insert id (first non used auto inc value). |
max_reserved | End of reserved auto inc range. |
◆ unlock_auto_inc()
void Partition_share::unlock_auto_inc |
( |
| ) |
|
|
inline |
unlock mutex protecting auto increment value next_auto_inc_val.
◆ auto_inc_initialized
bool Partition_share::auto_inc_initialized |
Set if auto increment is used an initialized.
◆ auto_inc_mutex
Mutex protecting next_auto_inc_val.
Initialized if table uses auto increment.
◆ next_auto_inc_val
First non reserved auto increment value.
◆ partition_name_hash
Hash of partition names.
Initialized by the first handler instance of a table_share calling populate_partition_name_hash(). After that it is read-only, i.e. no locking required for reading.
◆ partition_names
const uchar** Partition_share::partition_names |
|
private |
The documentation for this class was generated from the following files: