MySQL  8.0.20
Source Code Documentation
dd::upgrade_57 Namespace Reference

Classes

class  Check_table_intact
 Class to check the system tables we are using from 5.7 are not corrupted before migrating the information to new DD. More...
 
class  Handle_old_incorrect_sql_modes_hook
 
class  System_table_close_guard
 RAII for handling open and close of event and proc tables. More...
 
class  Table_upgrade_guard
 RAII to handle cleanup after table upgrading. More...
 
class  Thd_mem_root_guard
 THD::mem_root is only switched with the given mem_root and switched back on destruction. More...
 
struct  Trg_file_data
 Structure representing contents of .TRG file. More...
 
class  Trigger_loader
 Class to handle loading and parsing of Triggers. More...
 
class  Upgrade_MDL_guard
 RAII to handle MDL locks while upgrading. More...
 
class  Upgrade_status
 Class to manage a temporary file to maintain the progess of the upgrade. More...
 

Functions

static void load_event_creation_context (THD *thd, TABLE *table, Event_parse_data *et_parse_data)
 Load the charset and time zone information for an event. More...
 
static bool update_event_timing_fields (THD *thd, TABLE *table, const char *event_db_name, const char *event_name)
 Update the created, last modified and last executed time for the event with the values read from the old data dir. More...
 
static int find_string_in_array (const LEX_CSTRING *haystack, const LEX_CSTRING *needle, const CHARSET_INFO *cs)
 Searches for a LEX_STRING in an LEX_STRING array. More...
 
static bool set_status_and_interval_for_event (THD *thd, TABLE *table, Event_parse_data *et_parse_data)
 Update the event's interval and status information in the DD. More...
 
static bool migrate_event_to_dd (THD *thd, TABLE *event_table)
 Create an entry in the DD for the event by reading all the event attributes stored in 'mysql.event' table. More...
 
bool migrate_events_to_dd (THD *thd)
 Migrate all the events from 'mysql.event' to 'events' DD table. More...
 
static bool set_st_sp_chistics (THD *thd, TABLE *proc_table, st_sp_chistics *chistics)
 Set st_sp_chistics for routines. More...
 
static bool migrate_routine_to_dd (THD *thd, TABLE *proc_table)
 This function migrate one SP/SF from mysql.proc to routines DD table. More...
 
bool migrate_routines_to_dd (THD *thd)
 Migrate Stored Procedure and Functions from mysql.proc to routines dd table. More...
 
static bool load_db_schema_collation (THD *thd, const LEX_STRING *db_opt_path, const CHARSET_INFO **schema_charset)
 Returns the collation id for the database specified. More...
 
bool migrate_schema_to_dd (THD *thd, const char *dbname)
 Update the Schemata:DD for every database present in the data directory. More...
 
bool find_schema_from_datadir (std::vector< String_type > *db_name)
 Scans datadir for databases and lists all the database names. More...
 
static bool is_equal (const LEX_CSTRING &a, const LEX_CSTRING &b)
 
static void fill_create_info_for_upgrade (HA_CREATE_INFO *create_info, const TABLE *table)
 Fill HA_CREATE_INFO from TABLE_SHARE. More...
 
static bool create_unlinked_view (THD *thd, TABLE_LIST *view_ref)
 Create the view in DD without its column and dependency information. More...
 
static void create_alter_view_stmt (const THD *thd, TABLE_LIST *view_ref, String *str, const String_type &db_name, const String_type &view_name, const CHARSET_INFO *cs)
 Construct ALTER VIEW statement to fix the column list and dependency information but retains the previous view defintion entry in DD. More...
 
static bool fix_view_cols_and_deps (THD *thd, TABLE_LIST *view_ref, const String_type &db_name, const String_type &view_name)
 Finalize upgrading view by fixing column data, table and routines dependency. More...
 
static bool migrate_view_to_dd (THD *thd, const FRM_context &frm_context, const String_type &db_name, const String_type &view_name, MEM_ROOT *mem_root, bool is_fix_view_cols_and_deps)
 Create an entry in the DD for the view. More...
 
static bool fill_partition_info_for_upgrade (THD *thd, TABLE_SHARE *share, const FRM_context *frm_context, TABLE *table)
 Create partition information for upgrade. More...
 
static bool invalid_triggers (Table_trigger_dispatcher *d, List<::Trigger > &triggers)
 
static bool add_triggers_to_table (THD *thd, TABLE *table, const String_type &schema_name, const String_type &table_name)
 Add triggers to table. More...
 
static bool fix_generated_columns_for_upgrade (THD *thd, TABLE *table, List< Create_field > &create_fields)
 Fix generated columns. More...
 
static bool set_se_data_for_user_tables (THD *thd, const String_type &schema_name, const String_type &table_name, TABLE *table, bool skip_error)
 Call handler API to get storate engine specific metadata. More...
 
static bool fix_fk_parent_key_names (THD *thd, const String_type &schema_name, const String_type &table_name, handlerton *hton)
 Set names of parent keys (unique constraint names matching FK in parent tables) for the FKs in which table participates. More...
 
static bool migrate_table_to_dd (THD *thd, const String_type &schema_name, const String_type &table_name, bool is_fix_view_cols_and_deps)
 Read .frm files and enter metadata for tables/views. More...
 
bool migrate_plugin_table_to_dd (THD *thd)
 Upgrade mysql.plugin table. More...
 
static bool is_skipped_ndb_table (const char *db_name, const char *table_name)
 Migration of NDB tables is deferred until later, except for legacy privilege tables stored in NDB, which must be migrated now so that they can be moved to InnoDB later in the upgrade. More...
 
bool migrate_all_frm_to_dd (THD *thd, const char *dbname, bool is_fix_view_cols_and_deps)
 Scan the database to identify all .frm files. More...
 
bool in_progress ()
 Check if upgrade is in progress. More...
 
void set_in_progress (bool param)
 
bool allow_sdi_creation ()
 Check if creation of SDI file is allowed by upgrade. More...
 
void set_allow_sdi_creation (bool param)
 
static bool check_file_extension (const String_type &extn)
 Check if it is a file extension which should be moved to backup_metadata_57 folder upgrade upgrade is successful. More...
 
static void rename_stats_tables ()
 Rename stats tables. More...
 
static bool ha_finish_upgrade (THD *thd, plugin_ref plugin, void *failed_upgrade)
 Cleanup inside SE after upgrade for one SE. More...
 
bool ha_finish_upgrade (THD *thd, bool failed_upgrade)
 
bool finalize_upgrade (THD *thd)
 In case of successful upgrade, this function deletes all .frm, .TRG, .TRG, .par, .opt, .isl files from all databases. More...
 
bool check_for_dd_tables ()
 Function to scan mysql schema to check if any tables exist with the same name as DD tables to be created. More...
 
void rename_back_stats_tables (THD *thd)
 Rename back .ibd files for innodb stats table. More...
 
static void drop_sdi_files ()
 Drop all .SDI files created during upgrade. More...
 
bool add_sdi_info (THD *thd)
 Create SDI information for all tablespaces and tables. More...
 
bool terminate (THD *thd)
 Drop all DD tables in case there is an error while upgrading server. More...
 
static bool ha_migrate_tablespaces (THD *thd, plugin_ref plugin, void *)
 create data dictionary entry for tablespaces for one SE. More...
 
static bool ha_migrate_tablespaces (THD *thd)
 create data dictionary entry for tablespaces for one SE. More...
 
static bool migrate_stats (THD *thd)
 Migrate statistics from 5.7 stats tables. More...
 
static bool restart_dictionary (THD *thd)
 
static bool upgrade_logs (THD *thd, plugin_ref plugin, void *)
 Upgrade logs inside one SE. More...
 
static bool ha_upgrade_engine_logs (THD *thd)
 Upgrade logs inside all SE. More...
 
bool do_pre_checks_and_initialize_dd (THD *thd)
 Check if the server is starting on a data directory without dictionary tables or not. More...
 
bool fill_dd_and_finalize (THD *thd)
 Finalize upgrade to the new data-dictionary by populating Data Dictionary tables with metadata. More...
 

Variables

static Check_table_intact table_intact
 
const TABLE_FIELD_TYPE event_table_fields [ET_FIELD_COUNT]
 Column definitions for 5.7 mysql.event table (5.7.13 and up). More...
 
static const TABLE_FIELD_DEF event_table_def
 
static const TABLE_FIELD_TYPE event_table_fields_old [ET_FIELD_COUNT]
 Column definitions for 5.7 mysql.event table (before 5.7.13). More...
 
static const TABLE_FIELD_DEF event_table_def_old
 
const char * TRN_EXT = ".TRN"
 
const char * TRG_EXT = ".TRG"
 
const String_type ISL_EXT = ".isl"
 
const String_type PAR_EXT = ".par"
 
const String_type OPT_EXT = ".opt"
 
const String_type NDB_EXT = ".ndb"
 
const String_type IBD_EXT = ".ibd"
 
const String_type index_stats = "innodb_index_stats"
 
const String_type index_stats_backup = "innodb_index_stats_backup57"
 
const String_type table_stats = "innodb_table_stats"
 
const String_type table_stats_backup = "innodb_table_stats_backup57"
 
static Check_table_intact table_intact
 
static const TABLE_FIELD_TYPE proc_table_fields [MYSQL_PROC_FIELD_COUNT]
 Column definitions for 5.7 mysql.proc table (5.7.13 and up). More...
 
static const TABLE_FIELD_DEF proc_table_def
 
static const TABLE_FIELD_TYPE proc_table_fields_old [MYSQL_PROC_FIELD_COUNT]
 Column definitions for 5.7 mysql.proc table (before 5.7.13). More...
 
static const TABLE_FIELD_DEF proc_table_def_old
 
static const int TRG_NUM_REQUIRED_PARAMETERS = 8
 
const LEX_CSTRING trg_file_type = {STRING_WITH_LEN("TRIGGERS")}
 
static File_option trg_file_parameters []
 Table of .TRG file field descriptors. More...
 
static File_option sql_modes_parameters
 
static LEX_STRING default_client_cs_name = NULL_STR
 
static LEX_STRING default_connection_cl_name = NULL_STR
 
static LEX_STRING default_db_cl_name = NULL_STR
 
static const int REQUIRED_VIEW_PARAMETERS = 12
 
static File_option view_parameters []
 
static bool dd_upgrade_flag = false
 
static bool create_sdi_flag = true
 

Function Documentation

◆ add_sdi_info()

bool dd::upgrade_57::add_sdi_info ( THD thd)

Create SDI information for all tablespaces and tables.

Parameters
[in]thdThread handle.
Return values
falseON SUCCESS
trueON FAILURE

◆ add_triggers_to_table()

static bool dd::upgrade_57::add_triggers_to_table ( THD thd,
TABLE table,
const String_type schema_name,
const String_type table_name 
)
static

Add triggers to table.

◆ allow_sdi_creation()

bool dd::upgrade_57::allow_sdi_creation ( )

Check if creation of SDI file is allowed by upgrade.

◆ check_file_extension()

static bool dd::upgrade_57::check_file_extension ( const String_type extn)
static

Check if it is a file extension which should be moved to backup_metadata_57 folder upgrade upgrade is successful.

◆ check_for_dd_tables()

bool dd::upgrade_57::check_for_dd_tables ( )

Function to scan mysql schema to check if any tables exist with the same name as DD tables to be created.

This function checks existence of .frm files in mysql schema.

Return values
falseON SUCCESS
trueON FAILURE

◆ create_alter_view_stmt()

static void dd::upgrade_57::create_alter_view_stmt ( const THD thd,
TABLE_LIST view_ref,
String str,
const String_type db_name,
const String_type view_name,
const CHARSET_INFO cs 
)
static

Construct ALTER VIEW statement to fix the column list and dependency information but retains the previous view defintion entry in DD.

Parameters
[in]thdThread handle.
[in]view_refTABLE_LIST to store view data.
[out]strString object to store view definition.
[in]db_namedatabase name.
[in]view_nameview name.
[in]csCharset Information.

◆ create_unlinked_view()

static bool dd::upgrade_57::create_unlinked_view ( THD thd,
TABLE_LIST view_ref 
)
static

Create the view in DD without its column and dependency information.

Parameters
[in]thdThread handle.
[in]view_refTABLE_LIST to store view data.
Return values
falseON SUCCESS
trueON FAILURE

◆ do_pre_checks_and_initialize_dd()

bool dd::upgrade_57::do_pre_checks_and_initialize_dd ( THD thd)

Check if the server is starting on a data directory without dictionary tables or not.

If the dictionary tables are present, continue with restart of the server.

If the dicionary tables are not present, create the dictionary tables in existing data directory. This function marks dd_upgrade_flag as true to indicate to the server that Data dictionary is being upgraded.

metadata mysql.plugin table is migrated to the DD tables in case of upgrade. mysql.plugin table is used to initialize all other Storage Engines. This is necessary before migrating other user tables.

Parameters
thdThread context.
Returns
Upon failure, return true, otherwise false.

◆ drop_sdi_files()

static void dd::upgrade_57::drop_sdi_files ( )
static

Drop all .SDI files created during upgrade.

◆ fill_create_info_for_upgrade()

static void dd::upgrade_57::fill_create_info_for_upgrade ( HA_CREATE_INFO create_info,
const TABLE table 
)
static

Fill HA_CREATE_INFO from TABLE_SHARE.

◆ fill_dd_and_finalize()

bool dd::upgrade_57::fill_dd_and_finalize ( THD thd)

Finalize upgrade to the new data-dictionary by populating Data Dictionary tables with metadata.

Populate metadata in Data dictionary tables. This will be done for following database objects:

  • Databases
  • Tables
  • Views
  • Stored Procedures and Stored Functions
  • Events
  • Triggers
Parameters
thdThread context.
Returns
Upon failure, return true, otherwise false.

◆ fill_partition_info_for_upgrade()

static bool dd::upgrade_57::fill_partition_info_for_upgrade ( THD thd,
TABLE_SHARE share,
const FRM_context frm_context,
TABLE table 
)
static

Create partition information for upgrade.

This function uses the same method to create partition information as done by open_table_from_share().

◆ finalize_upgrade()

bool dd::upgrade_57::finalize_upgrade ( THD thd)

In case of successful upgrade, this function deletes all .frm, .TRG, .TRG, .par, .opt, .isl files from all databases.

mysql.proc, mysql.event, statistics tables from 5.7 will be deleted as part of cleanup.

Parameters
[in]thdThread handle.

◆ find_schema_from_datadir()

bool dd::upgrade_57::find_schema_from_datadir ( std::vector< String_type > *  db_name)

Scans datadir for databases and lists all the database names.

Find all the directories inside data directory.

Every directory will be treated as a schema. These directories are in filename-encoded form.

Parameters
[out]db_nameAn std::vector containing all database name.
Return values
falseON SUCCESS
trueON FAILURE

◆ find_string_in_array()

static int dd::upgrade_57::find_string_in_array ( const LEX_CSTRING haystack,
const LEX_CSTRING needle,
const CHARSET_INFO cs 
)
static

Searches for a LEX_STRING in an LEX_STRING array.

Parameters
[in]haystackThe array.
[in]needleThe string to search for.
[in]csCharset info.
Note
The last LEX_STRING in the array should have str member set to NULL.
Return values
-1Not found.
>=0Ordinal position.

◆ fix_fk_parent_key_names()

static bool dd::upgrade_57::fix_fk_parent_key_names ( THD thd,
const String_type schema_name,
const String_type table_name,
handlerton hton 
)
static

Set names of parent keys (unique constraint names matching FK in parent tables) for the FKs in which table participates.

Parameters
thdThread context.
schema_nameName of schema.
table_nameName of table.
htonTable's handlerton.
Return values
false- Success.
true- Failure.

◆ fix_generated_columns_for_upgrade()

static bool dd::upgrade_57::fix_generated_columns_for_upgrade ( THD thd,
TABLE table,
List< Create_field > &  create_fields 
)
static

Fix generated columns.

Parameters
[in]thdThread handle.
[in]tableTABLE object.
[in]create_fieldsList of Create_fields
Return values
falseON SUCCESS
trueON FAILURE

◆ fix_view_cols_and_deps()

static bool dd::upgrade_57::fix_view_cols_and_deps ( THD thd,
TABLE_LIST view_ref,
const String_type db_name,
const String_type view_name 
)
static

Finalize upgrading view by fixing column data, table and routines dependency.

View will be marked invalid if ALTER VIEW statement fails on the view.

Parameters
[in]thdThread handle.
[in]view_refTABLE_LIST with view data.
[in]db_namedatabase name.
[in]view_nameview name.
Return values
falseON SUCCESS
trueON FAILURE

◆ ha_finish_upgrade() [1/2]

static bool dd::upgrade_57::ha_finish_upgrade ( THD thd,
plugin_ref  plugin,
void *  failed_upgrade 
)
static

Cleanup inside SE after upgrade for one SE.

Parameters
[in]thdThread Handle
[in]pluginHandlerton Plugin
[in]failed_upgradeFlag to tell SE if cleanup is after failed failed upgrade or successful upgrade.
Return values
falseON SUCCESS
trueON FAILURE

◆ ha_finish_upgrade() [2/2]

bool dd::upgrade_57::ha_finish_upgrade ( THD thd,
bool  failed_upgrade 
)

◆ ha_migrate_tablespaces() [1/2]

static bool dd::upgrade_57::ha_migrate_tablespaces ( THD thd,
plugin_ref  plugin,
void *   
)
static

create data dictionary entry for tablespaces for one SE.

Parameters
[in]thdThread Handle
[in]pluginHandlerton Plugin
Return values
falseON SUCCESS
trueON FAILURE

◆ ha_migrate_tablespaces() [2/2]

static bool dd::upgrade_57::ha_migrate_tablespaces ( THD thd)
static

create data dictionary entry for tablespaces for one SE.

Parameters
[in]thdThread Handle
Return values
falseON SUCCESS
trueON FAILURE

◆ ha_upgrade_engine_logs()

static bool dd::upgrade_57::ha_upgrade_engine_logs ( THD thd)
static

Upgrade logs inside all SE.

Parameters
[in]thdThread Handle
Return values
falseON SUCCESS
trueON FAILURE

◆ in_progress()

bool dd::upgrade_57::in_progress ( )

Check if upgrade is in progress.

◆ invalid_triggers()

static bool dd::upgrade_57::invalid_triggers ( Table_trigger_dispatcher d,
List<::Trigger > &  triggers 
)
static

◆ is_equal()

static bool dd::upgrade_57::is_equal ( const LEX_CSTRING a,
const LEX_CSTRING b 
)
static

◆ is_skipped_ndb_table()

static bool dd::upgrade_57::is_skipped_ndb_table ( const char *  db_name,
const char *  table_name 
)
static

Migration of NDB tables is deferred until later, except for legacy privilege tables stored in NDB, which must be migrated now so that they can be moved to InnoDB later in the upgrade.

To check whether the table is a NDB table, look for the presence of a table_name.ndb file in the data directory. These files still exist at this point, though they will be permanently removed later in the upgrade.

◆ load_db_schema_collation()

static bool dd::upgrade_57::load_db_schema_collation ( THD thd,
const LEX_STRING db_opt_path,
const CHARSET_INFO **  schema_charset 
)
static

Returns the collation id for the database specified.

Parameters
[in]thdThread handle.
[in]db_opt_pathPath for database.
[out]schema_charsetCharacter set of database.
Return values
falseON SUCCESS
trueON FAILURE

◆ load_event_creation_context()

static void dd::upgrade_57::load_event_creation_context ( THD thd,
TABLE table,
Event_parse_data et_parse_data 
)
static

Load the charset and time zone information for an event.

◆ migrate_all_frm_to_dd()

bool dd::upgrade_57::migrate_all_frm_to_dd ( THD thd,
const char *  dbname,
bool  is_fix_view_cols_and_deps 
)

Scan the database to identify all .frm files.

Identify all .frm files to upgrade in a database.

Triggers existence will be checked only for tables found here.

Parameters
[in]thdThread handle.
[in]dbnamePointer for database name.
[in]is_fix_view_cols_and_depsFix view col data, table and routines dependency.
Return values
falseON SUCCESS
trueON FAILURE

◆ migrate_event_to_dd()

static bool dd::upgrade_57::migrate_event_to_dd ( THD thd,
TABLE event_table 
)
static

Create an entry in the DD for the event by reading all the event attributes stored in 'mysql.event' table.

◆ migrate_events_to_dd()

bool dd::upgrade_57::migrate_events_to_dd ( THD thd)

Migrate all the events from 'mysql.event' to 'events' DD table.

Migrate all events from mysql.event to mysql.events table.

Parameters
[in]thdThread handle.
Return values
falseON SUCCESS
trueON FAILURE

◆ migrate_plugin_table_to_dd()

bool dd::upgrade_57::migrate_plugin_table_to_dd ( THD thd)

Upgrade mysql.plugin table.

Migrate plugin table to Data Dictionary.

This is required to initialize the plugins. User tables will be upgraded after all the plugins are initialized.

All plugin initialization should happens before user tables upgrade. It is needed to initialize all the Storage Engines.

Parameters
[in]thdThread handle.
Return values
falseON SUCCESS
trueON FAILURE

◆ migrate_routine_to_dd()

static bool dd::upgrade_57::migrate_routine_to_dd ( THD thd,
TABLE proc_table 
)
static

This function migrate one SP/SF from mysql.proc to routines DD table.

One record in mysql.proc is metadata for one SP/SF. This function parses one record to extract metadata required and store it in DD table.

◆ migrate_routines_to_dd()

bool dd::upgrade_57::migrate_routines_to_dd ( THD thd)

Migrate Stored Procedure and Functions from mysql.proc to routines dd table.

Migrate all SP/SF from mysql.proc to mysql.routines dd table.

Parameters
[in]thdThread handle.
Return values
falseON SUCCESS
trueON FAILURE

◆ migrate_schema_to_dd()

bool dd::upgrade_57::migrate_schema_to_dd ( THD thd,
const char *  dbname 
)

Update the Schemata:DD for every database present in the data directory.

Create entry in mysql.schemata for all the folders found in data directory.

If db.opt file is not present in any folder, that folder will be treated as a database and a warning is issued.

Parameters
[in]thdThread handle.
[in]dbnameSchema name.
Return values
falseON SUCCESS
trueON FAILURE

◆ migrate_stats()

static bool dd::upgrade_57::migrate_stats ( THD thd)
static

Migrate statistics from 5.7 stats tables.

Ignore error here as stats table data can be regenerated by user using ANALYZE command.

◆ migrate_table_to_dd()

static bool dd::upgrade_57::migrate_table_to_dd ( THD thd,
const String_type schema_name,
const String_type table_name,
bool  is_fix_view_cols_and_deps 
)
static

Read .frm files and enter metadata for tables/views.

◆ migrate_view_to_dd()

static bool dd::upgrade_57::migrate_view_to_dd ( THD thd,
const FRM_context frm_context,
const String_type db_name,
const String_type view_name,
MEM_ROOT mem_root,
bool  is_fix_view_cols_and_deps 
)
static

Create an entry in the DD for the view.

Parameters
[in]thdThread handle.
[in]frm_contextStructure to hold view definition read from frm file.
[in]db_namedatabase name.
[in]view_nameview name.
[in]mem_rootMEM_ROOT to handle memory allocations.
[in]is_fix_view_cols_and_depsFlag to create view with dependency information.
Return values
falseON SUCCESS
trueON FAILURE

◆ rename_back_stats_tables()

void dd::upgrade_57::rename_back_stats_tables ( THD thd)

Rename back .ibd files for innodb stats table.

◆ rename_stats_tables()

static void dd::upgrade_57::rename_stats_tables ( )
static

Rename stats tables.

Installation from 5.7 should contain mysql.innodb_table_stats and mysql.innodb_index_stats. Rename .frm and .ibd files for these tables here. These tables will be created from scratch with other dictionary tables. Data from 5.7 stats table will be inserted in new created stats table via INSERT...SELECT statement.

◆ restart_dictionary()

static bool dd::upgrade_57::restart_dictionary ( THD thd)
static

◆ set_allow_sdi_creation()

void dd::upgrade_57::set_allow_sdi_creation ( bool  param)

◆ set_in_progress()

void dd::upgrade_57::set_in_progress ( bool  param)

◆ set_se_data_for_user_tables()

static bool dd::upgrade_57::set_se_data_for_user_tables ( THD thd,
const String_type schema_name,
const String_type table_name,
TABLE table,
bool  skip_error 
)
static

Call handler API to get storate engine specific metadata.

Storage Engine should fill tablespace information, Foreign key information, partition information and correct row type.

Parameters
[in]thdThread Handle
[in]schema_nameName of schema
[in]table_nameName of table
[in]tableTABLE object
[in]skip_errorSkip error in case of innodb stats table.
Return values
falseON SUCCESS
trueON FAILURE

◆ set_st_sp_chistics()

static bool dd::upgrade_57::set_st_sp_chistics ( THD thd,
TABLE proc_table,
st_sp_chistics chistics 
)
static

Set st_sp_chistics for routines.

◆ set_status_and_interval_for_event()

static bool dd::upgrade_57::set_status_and_interval_for_event ( THD thd,
TABLE table,
Event_parse_data et_parse_data 
)
static

Update the event's interval and status information in the DD.

◆ terminate()

bool dd::upgrade_57::terminate ( THD thd)

Drop all DD tables in case there is an error while upgrading server.

Parameters
[in]thdThread context.
Returns
Upon failure, return true, otherwise false.

◆ update_event_timing_fields()

static bool dd::upgrade_57::update_event_timing_fields ( THD thd,
TABLE table,
const char *  event_db_name,
const char *  event_name 
)
static

Update the created, last modified and last executed time for the event with the values read from the old data dir.

◆ upgrade_logs()

static bool dd::upgrade_57::upgrade_logs ( THD thd,
plugin_ref  plugin,
void *   
)
static

Upgrade logs inside one SE.

Parameters
[in]thdThread Handle
[in]pluginHandlerton Plugin
Return values
falseON SUCCESS
trueON FAILURE

Variable Documentation

◆ create_sdi_flag

bool dd::upgrade_57::create_sdi_flag = true
static

◆ dd_upgrade_flag

bool dd::upgrade_57::dd_upgrade_flag = false
static

◆ default_client_cs_name

LEX_STRING dd::upgrade_57::default_client_cs_name = NULL_STR
static

◆ default_connection_cl_name

LEX_STRING dd::upgrade_57::default_connection_cl_name = NULL_STR
static

◆ default_db_cl_name

LEX_STRING dd::upgrade_57::default_db_cl_name = NULL_STR
static

◆ event_table_def

const TABLE_FIELD_DEF dd::upgrade_57::event_table_def
static
Initial value:
Definition: event_db_repository.h:72
const TABLE_FIELD_TYPE event_table_fields[ET_FIELD_COUNT]
Column definitions for 5.7 mysql.event table (5.7.13 and up).
Definition: event.cc:83

◆ event_table_def_old

const TABLE_FIELD_DEF dd::upgrade_57::event_table_def_old
static
Initial value:
Definition: event_db_repository.h:72
static const TABLE_FIELD_TYPE event_table_fields_old[ET_FIELD_COUNT]
Column definitions for 5.7 mysql.event table (before 5.7.13).
Definition: event.cc:169

◆ event_table_fields

const TABLE_FIELD_TYPE dd::upgrade_57::event_table_fields[ET_FIELD_COUNT]

Column definitions for 5.7 mysql.event table (5.7.13 and up).

◆ event_table_fields_old

const TABLE_FIELD_TYPE dd::upgrade_57::event_table_fields_old[ET_FIELD_COUNT]
static

Column definitions for 5.7 mysql.event table (before 5.7.13).

◆ IBD_EXT

const String_type dd::upgrade_57::IBD_EXT = ".ibd"

◆ index_stats

const String_type dd::upgrade_57::index_stats = "innodb_index_stats"

◆ index_stats_backup

const String_type dd::upgrade_57::index_stats_backup = "innodb_index_stats_backup57"

◆ ISL_EXT

const String_type dd::upgrade_57::ISL_EXT = ".isl"

◆ NDB_EXT

const String_type dd::upgrade_57::NDB_EXT = ".ndb"

◆ OPT_EXT

const String_type dd::upgrade_57::OPT_EXT = ".opt"

◆ PAR_EXT

const String_type dd::upgrade_57::PAR_EXT = ".par"

◆ proc_table_def

const TABLE_FIELD_DEF dd::upgrade_57::proc_table_def
static
Initial value:
Definition: sp.h:133
static const TABLE_FIELD_TYPE proc_table_fields[MYSQL_PROC_FIELD_COUNT]
Column definitions for 5.7 mysql.proc table (5.7.13 and up).
Definition: routine.cc:75

◆ proc_table_def_old

const TABLE_FIELD_DEF dd::upgrade_57::proc_table_def_old
static
Initial value:
static const TABLE_FIELD_TYPE proc_table_fields_old[MYSQL_PROC_FIELD_COUNT]
Column definitions for 5.7 mysql.proc table (before 5.7.13).
Definition: routine.cc:152
Definition: sp.h:133

◆ proc_table_fields

const TABLE_FIELD_TYPE dd::upgrade_57::proc_table_fields[MYSQL_PROC_FIELD_COUNT]
static

Column definitions for 5.7 mysql.proc table (5.7.13 and up).

◆ proc_table_fields_old

const TABLE_FIELD_TYPE dd::upgrade_57::proc_table_fields_old[MYSQL_PROC_FIELD_COUNT]
static

Column definitions for 5.7 mysql.proc table (before 5.7.13).

◆ REQUIRED_VIEW_PARAMETERS

const int dd::upgrade_57::REQUIRED_VIEW_PARAMETERS = 12
static

◆ sql_modes_parameters

File_option dd::upgrade_57::sql_modes_parameters
static
Initial value:
= {
{STRING_WITH_LEN("sql_modes")},
my_offsetof_upgrade(struct Trg_file_data, sql_modes),
#define my_offsetof_upgrade(TYPE, MEMBER)
Definition: table.cc:179
list of ulonglong values (List<ulonglong>)
Definition: parse_file.h:44
#define STRING_WITH_LEN(X)
Definition: m_string.h:315

◆ table_intact [1/2]

Check_table_intact dd::upgrade_57::table_intact
static

◆ table_intact [2/2]

Check_table_intact dd::upgrade_57::table_intact
static

◆ table_stats

const String_type dd::upgrade_57::table_stats = "innodb_table_stats"

◆ table_stats_backup

const String_type dd::upgrade_57::table_stats_backup = "innodb_table_stats_backup57"

◆ TRG_EXT

const char * dd::upgrade_57::TRG_EXT = ".TRG"

◆ trg_file_parameters

File_option dd::upgrade_57::trg_file_parameters[]
static
Initial value:
= {
{{STRING_WITH_LEN("triggers")},
my_offsetof_upgrade(struct Trg_file_data, definitions),
{{STRING_WITH_LEN("sql_modes")},
my_offsetof_upgrade(struct Trg_file_data, sql_modes),
{{STRING_WITH_LEN("definers")},
my_offsetof_upgrade(struct Trg_file_data, definers_list),
{{STRING_WITH_LEN("client_cs_names")},
my_offsetof_upgrade(struct Trg_file_data, client_cs_names),
{{STRING_WITH_LEN("connection_cl_names")},
my_offsetof_upgrade(struct Trg_file_data, connection_cl_names),
{{STRING_WITH_LEN("db_cl_names")},
my_offsetof_upgrade(struct Trg_file_data, db_cl_names),
{{STRING_WITH_LEN("created")},
my_offsetof_upgrade(struct Trg_file_data, created_timestamps),
{{nullptr, 0}, 0, FILE_OPTIONS_STRING}}
#define my_offsetof_upgrade(TYPE, MEMBER)
Definition: table.cc:179
String (LEX_STRING)
Definition: parse_file.h:37
list of ulonglong values (List<ulonglong>)
Definition: parse_file.h:44
list of escaped strings (List<LEX_STRING>)
Definition: parse_file.h:42
#define STRING_WITH_LEN(X)
Definition: m_string.h:315

Table of .TRG file field descriptors.

◆ trg_file_type

const LEX_CSTRING dd::upgrade_57::trg_file_type = {STRING_WITH_LEN("TRIGGERS")}

◆ TRG_NUM_REQUIRED_PARAMETERS

const int dd::upgrade_57::TRG_NUM_REQUIRED_PARAMETERS = 8
static

◆ TRN_EXT

const char * dd::upgrade_57::TRN_EXT = ".TRN"

◆ view_parameters

File_option dd::upgrade_57::view_parameters[]
static