MySQL 8.0.39
Source Code Documentation
|
Table modification plan for JOIN-less statements (update/delete) More...
#include <opt_explain.h>
Public Member Functions | |
Modification_plan (THD *thd_arg, enum_mod_type mt, TABLE *table_arg, enum join_type type_arg, AccessPath *quick_arg, Item *condition_arg, uint key_arg, ha_rows limit_arg, bool need_tmp_table_arg, bool need_sort_arg, bool used_key_is_modified_arg, ha_rows rows) | |
Modification_plan's constructor, to represent that we will use an access method on the table. More... | |
Modification_plan (THD *thd_arg, enum_mod_type mt, TABLE *table_arg, const char *message_arg, bool zero_result_arg, ha_rows rows) | |
Modification_plan's constructor, to convey a message in the "extra" column of EXPLAIN. More... | |
~Modification_plan () | |
Public Attributes | |
THD *const | thd |
Owning thread. More... | |
const enum_mod_type | mod_type |
Modification type - MT_INSERT/MT_UPDATE/etc. More... | |
TABLE * | table |
Table to modify. More... | |
enum join_type | type = JT_UNKNOWN |
AccessPath * | range_scan {nullptr} |
Item * | condition {nullptr} |
uint | key |
Key to use. More... | |
ha_rows | limit |
Limit. More... | |
bool | need_tmp_table |
Whether tmp table needs to be used. More... | |
bool | need_sort |
Whether to use filesort. More... | |
bool | used_key_is_modified |
Whether the key used to scan is modified. More... | |
const char * | message |
Arbitrary message. More... | |
bool | zero_result |
true <=> plan will not be executed More... | |
ha_rows | examined_rows |
Private Member Functions | |
void | register_in_thd () |
Table modification plan for JOIN-less statements (update/delete)
Modification_plan::Modification_plan | ( | THD * | thd_arg, |
enum_mod_type | mt, | ||
TABLE * | table_arg, | ||
enum join_type | type_arg, | ||
AccessPath * | range_scan_arg, | ||
Item * | condition_arg, | ||
uint | key_arg, | ||
ha_rows | limit_arg, | ||
bool | need_tmp_table_arg, | ||
bool | need_sort_arg, | ||
bool | used_key_is_modified_arg, | ||
ha_rows | rows | ||
) |
Modification_plan's constructor, to represent that we will use an access method on the table.
Create single table modification plan. The plan is registered in the given thd unless the modification is done in a sub-statement (function/trigger).
thd_arg | owning thread |
mt | modification type - MT_INSERT/MT_UPDATE/etc |
table_arg | Table to modify |
type_arg | Access type (JT_*) for this table |
range_scan_arg | Range index scan used, if any |
condition_arg | Condition applied, if any |
key_arg | MAX_KEY or and index number of the key that was chosen to access table data. |
limit_arg | HA_POS_ERROR or LIMIT value. |
need_tmp_table_arg | true if it requires temporary table – "Using temporary" string in the "extra" column. |
need_sort_arg | true if it requires filesort() – "Using filesort" string in the "extra" column. |
used_key_is_modified_arg | UPDATE updates used key column |
rows | How many rows we plan to modify in the table. |
Modification_plan::Modification_plan | ( | THD * | thd_arg, |
enum_mod_type | mt, | ||
TABLE * | table_arg, | ||
const char * | message_arg, | ||
bool | zero_result_arg, | ||
ha_rows | rows | ||
) |
Modification_plan's constructor, to convey a message in the "extra" column of EXPLAIN.
This is for the case where this message is the main information (there is no access path to the table).
Create minimal single table modification plan. The plan is registered in the given thd unless the modification is done in a sub-statement (function/trigger).
thd_arg | Owning thread |
mt | Modification type - MT_INSERT/MT_UPDATE/etc |
table_arg | Table to modify |
message_arg | Message |
zero_result_arg | If we shortcut execution |
rows | How many rows we plan to modify in the table. |
Modification_plan::~Modification_plan | ( | ) |
|
private |
ha_rows Modification_plan::examined_rows |
uint Modification_plan::key |
Key to use.
ha_rows Modification_plan::limit |
Limit.
const char* Modification_plan::message |
Arbitrary message.
const enum_mod_type Modification_plan::mod_type |
Modification type - MT_INSERT/MT_UPDATE/etc.
bool Modification_plan::need_sort |
Whether to use filesort.
bool Modification_plan::need_tmp_table |
Whether tmp table needs to be used.
AccessPath* Modification_plan::range_scan {nullptr} |
TABLE* Modification_plan::table |
Table to modify.
THD* const Modification_plan::thd |
Owning thread.
enum join_type Modification_plan::type = JT_UNKNOWN |
bool Modification_plan::used_key_is_modified |
Whether the key used to scan is modified.
bool Modification_plan::zero_result |
true <=> plan will not be executed