MySQL 9.1.0
Source Code Documentation
|
Class to handle TRUNCATE for one InnoDB table or one partition. More...
#include <ha_innodb.h>
Public Member Functions | |
innobase_truncate (THD *thd, const char *name, TABLE *form, Table *dd_table, bool keep_autoinc, bool table_truncate) | |
Constructor. More... | |
~innobase_truncate () | |
Destructor. More... | |
int | open_table (dict_table_t *&innodb_table) |
Open the table/partition to be truncated. More... | |
int | exec () |
Do the truncate of the table/partition. More... | |
Private Member Functions | |
int | prepare () |
Prepare for truncate. More... | |
int | truncate () |
Do the real truncation. More... | |
int | rename_tablespace () |
Rename tablespace file name. More... | |
void | cleanup () |
Cleanup. More... | |
int | load_fk () |
Reload the FK related information. More... | |
Private Attributes | |
THD * | m_thd |
THD object. More... | |
const char * | m_name |
Normalized table name. More... | |
Table * | m_dd_table |
dd::Table or dd::Partition More... | |
trx_t * | m_trx |
Transaction attached to current thd. More... | |
dict_table_t * | m_table |
InnoDB table object for the table/partition. More... | |
TABLE * | m_form |
Table format. More... | |
HA_CREATE_INFO | m_create_info |
Create information. More... | |
bool | m_file_per_table |
True if this table/partition is file per table. More... | |
bool | m_keep_autoinc |
True if the original autoinc counter should be kept. More... | |
bool | m_table_truncate |
For a prtition table, this is true if full table is truncated. More... | |
uint32_t | m_flags |
flags of the table to be truncated, which should not change More... | |
uint32_t | m_flags2 |
flags2 of the table to be truncated, which should not change More... | |
Class to handle TRUNCATE for one InnoDB table or one partition.
|
inline |
Constructor.
[in] | thd | THD object |
[in] | name | normalized table name |
[in] | form | Table format; columns and index information |
[in] | dd_table | dd::Table or dd::Partition |
[in] | keep_autoinc | true to remember original autoinc counter |
[in] | table_truncate | true if this is full table truncate |
template innobase_truncate< Table >::~innobase_truncate | ( | ) |
Destructor.
|
private |
Cleanup.
template int innobase_truncate< Table >::exec | ( | ) |
Do the truncate of the table/partition.
|
private |
Reload the FK related information.
template int innobase_truncate< Table >::open_table | ( | dict_table_t *& | innodb_table | ) |
Open the table/partition to be truncated.
[out] | innodb_table | InnoDB table object opened |
|
private |
Prepare for truncate.
|
private |
Rename tablespace file name.
|
private |
Do the real truncation.
|
private |
Create information.
|
private |
dd::Table or dd::Partition
|
private |
True if this table/partition is file per table.
|
private |
flags of the table to be truncated, which should not change
|
private |
flags2 of the table to be truncated, which should not change
|
private |
Table format.
|
private |
True if the original autoinc counter should be kept.
It's specified by caller, however if the table has no AUTOINC column, it would be reset to false internally
|
private |
Normalized table name.
|
private |
InnoDB table object for the table/partition.
|
private |
For a prtition table, this is true if full table is truncated.
If only a partition is truncated, it is set to false.
|
private |
THD object.
|
private |
Transaction attached to current thd.