MySQL 8.4.0
Source Code Documentation
Plan_change_watchdog Class Reference

It is not obvious to see that test_if_skip_sort_order() never changes the plan if no_changes is true. More...

Public Member Functions

 Plan_change_watchdog (const JOIN_TAB *tab_arg, const bool no_changes_arg)
 ~Plan_change_watchdog ()

Private Attributes

const JOIN_TABtab
 table, or NULL if changes are allowed More...
enum join_type type
 copy of tab->type() More...
const AccessPathquick {nullptr}
 copy of tab->select->quick More...
uint quick_index {0}
 copy of tab->select->quick->index More...
enum quick_type use_quick
 copy of tab->use_quick More...
int ref_key
 copy of tab->ref().key More...
uint ref_key_parts
uint index
 copy of tab->ref().key_parts More...

Detailed Description

It is not obvious to see that test_if_skip_sort_order() never changes the plan if no_changes is true.

So we double-check: creating an instance of this class saves some important access-path-related information of the current table; when the instance is destroyed, the latest access-path information is compared with saved data.

Constructor & Destructor Documentation

◆ Plan_change_watchdog()

Plan_change_watchdog::Plan_change_watchdog ( const JOIN_TAB tab_arg,
const bool  no_changes_arg 
tab_argtable whose access path is being determined
no_changes_argwhether a change to the access path is allowed

◆ ~Plan_change_watchdog()

Plan_change_watchdog::~Plan_change_watchdog ( )

Member Data Documentation

◆ index

uint Plan_change_watchdog::index

copy of tab->ref().key_parts

copy of tab->index

◆ quick

const AccessPath* Plan_change_watchdog::quick {nullptr}

copy of tab->select->quick

◆ quick_index

uint Plan_change_watchdog::quick_index {0}

copy of tab->select->quick->index

◆ ref_key

int Plan_change_watchdog::ref_key

copy of tab->ref().key

◆ ref_key_parts

uint Plan_change_watchdog::ref_key_parts

◆ tab

const JOIN_TAB* Plan_change_watchdog::tab

table, or NULL if changes are allowed

◆ type

enum join_type Plan_change_watchdog::type

copy of tab->type()

◆ use_quick

enum quick_type Plan_change_watchdog::use_quick

copy of tab->use_quick

The documentation for this class was generated from the following file: