MySQL 8.4.2
Source Code Documentation
server.cc File Reference
#include "sql/dd/impl/upgrade/server.h"
#include <errno.h>
#include <fcntl.h>
#include <stdint.h>
#include <sys/types.h>
#include <chrono>
#include <iomanip>
#include <sstream>
#include <string>
#include "sql/dd/upgrade/server.h"
#include <unistd.h>
#include <vector>
#include "my_dbug.h"
#include "my_rapidjson_size_t.h"
#include "mysql/components/services/log_builtins.h"
#include "mysql/psi/mysql_file.h"
#include "mysql/strings/m_ctype.h"
#include "nulls.h"
#include "rapidjson/document.h"
#include "rapidjson/prettywriter.h"
#include "rapidjson/stringbuffer.h"
#include "scripts/mysql_fix_privilege_tables_sql.h"
#include "scripts/sql_commands_system_tables_data_fix.h"
#include "scripts/sql_firewall_sp_firewall_group_delist.h"
#include "scripts/sql_firewall_sp_firewall_group_enlist.h"
#include "scripts/sql_firewall_sp_reload_firewall_group_rules.h"
#include "scripts/sql_firewall_sp_reload_firewall_rules.h"
#include "scripts/sql_firewall_sp_set_firewall_group_mode.h"
#include "scripts/sql_firewall_sp_set_firewall_group_mode_and_user.h"
#include "scripts/sql_firewall_sp_set_firewall_mode.h"
#include "sql/dd/cache/dictionary_client.h"
#include "sql/dd/dd_schema.h"
#include "sql/dd/dd_table.h"
#include "sql/dd/dd_tablespace.h"
#include "sql/dd/dd_trigger.h"
#include "sql/dd/impl/bootstrap/bootstrap_ctx.h"
#include "sql/dd/impl/bootstrap/bootstrapper.h"
#include "sql/dd/impl/tables/dd_properties.h"
#include "sql/dd/impl/tables/events.h"
#include "sql/dd/impl/tables/routines.h"
#include "sql/dd/impl/tables/tables.h"
#include "sql/dd/impl/utils.h"
#include "sql/dd/types/routine.h"
#include "sql/dd/types/table.h"
#include "sql/dd/types/tablespace.h"
#include "sql/dd_sp.h"
#include "sql/sd_notify.h"
#include "sql/sp.h"
#include "sql/sp_head.h"
#include "sql/sql_base.h"
#include "sql/sql_table.h"
#include "sql/statement/ed_connection.h"
#include "sql/strfunc.h"
#include "sql/table_trigger_dispatcher.h"
#include "sql/thd_raii.h"
#include "sql/trigger.h"
#include "sql/trigger_def.h"
#include "string_with_len.h"

Classes

class  dd::upgrade::anonymous_namespace{server.cc}::Server_option_guard< T >
 
class  dd::upgrade::anonymous_namespace{server.cc}::MySQL_check
 

Namespaces

namespace  dd
 The version of the current data dictionary table definitions.
 
namespace  dd::upgrade
 
namespace  dd::upgrade::anonymous_namespace{server.cc}
 

Typedefs

using sql_mode_t = uint64_t
 

Functions

bool dd::upgrade::anonymous_namespace{server.cc}::ignore_error_and_execute (THD *thd, const char *query_ptr, bool print_err=true)
 
static bool dd::upgrade::anonymous_namespace{server.cc}::reinstall_firewall_procedures (THD *thd, const char *drop_query, const char *fw_proc[])
 This function will create the firewall's stored procedures. More...
 
static bool dd::upgrade::anonymous_namespace{server.cc}::upgrade_firewall_procedures (THD *thd)
 This function will check and create the firewall's stored procedures. More...
 
static bool dd::upgrade::anonymous_namespace{server.cc}::switch_to_firewall_schema (THD *thd, std::string &fw_schema)
 This function will switch to the schema which is pointed by the mysql-firewall-database variable by executing USE. More...
 
static bool dd::upgrade::anonymous_namespace{server.cc}::upgrade_firewall (THD *thd)
 upgrades Firewall stored procedures More...
 
bool dd::upgrade::anonymous_namespace{server.cc}::fix_sys_schema (THD *thd)
 
bool dd::upgrade::anonymous_namespace{server.cc}::fix_mysql_tables (THD *thd)
 
bool dd::upgrade::anonymous_namespace{server.cc}::upgrade_help_tables (THD *thd)
 
static bool dd::upgrade::anonymous_namespace{server.cc}::get_shared_tablespace_names (THD *thd, std::set< dd::String_type > *shared_spaces)
 
static bool dd::upgrade::anonymous_namespace{server.cc}::check_tables (THD *thd, std::unique_ptr< Schema > &schema, const std::set< dd::String_type > *shared_spaces, Upgrade_error_counter *error_count)
 
static bool dd::upgrade::anonymous_namespace{server.cc}::check_events (THD *thd, std::unique_ptr< Schema > &schema, Upgrade_error_counter *error_count)
 
static bool dd::upgrade::anonymous_namespace{server.cc}::check_routines (THD *thd, std::unique_ptr< Schema > &schema, Syntax_error_handler &error_handler, Upgrade_error_counter *error_count)
 
static bool dd::upgrade::anonymous_namespace{server.cc}::check_views (THD *thd, std::unique_ptr< Schema > &schema, Upgrade_error_counter *error_count)
 
static void dd::upgrade::anonymous_namespace{server.cc}::remove_legacy_upgrade_info_file ()
 
void dd::upgrade::update_upgrade_history_file (bool initialize)
 Maintain a file named "mysql_upgrade_history" in the data directory. More...
 
bool dd::upgrade::do_server_upgrade_checks (THD *thd)
 Performs validation on server metadata. More...
 
bool dd::upgrade::invalid_routine (THD *thd, const dd::Schema &schema, const dd::Routine &routine)
 Validate a dd::Routine object. More...
 
bool dd::upgrade::invalid_triggers (THD *thd, const char *schema_name, const dd::Table &table)
 Validate all the triggers of the given table. More...
 
bool dd::upgrade::invalid_sql (THD *thd, const char *dbname, const dd::String_type &sql)
 Validate the SQL string provided. More...
 
bool dd::upgrade::build_event_sp (const THD *thd, const char *name, size_t name_len, const char *body, size_t body_len, dd::String_type *sp_sql)
 Helper function to create a stored procedure from an event body. More...
 
bool dd::upgrade::upgrade_system_schemas (THD *thd)
 Upgrades/restores the system tables to defaults of the current MySQL version. More...
 
bool dd::upgrade::no_server_upgrade_required ()
 
bool dd::upgrade::I_S_upgrade_required ()
 

Variables

const char * mysql_sys_schema []
 
const char * fill_help_tables []
 
const char * upgrade_modes [] = {"NONE", "MINIMAL", "AUTO", "FORCE", NullS}
 
TYPELIB upgrade_mode_typelib
 
static std::vector< uint > dd::upgrade::anonymous_namespace{server.cc}::ignored_errors
 

Typedef Documentation

◆ sql_mode_t

using sql_mode_t = uint64_t

Variable Documentation

◆ fill_help_tables

const char* fill_help_tables[]
extern

◆ mysql_sys_schema

const char* mysql_sys_schema[]
extern

◆ upgrade_mode_typelib

TYPELIB upgrade_mode_typelib
Initial value:
upgrade_modes, nullptr}
const char * upgrade_modes[]
Definition: server.cc:92
#define array_elements(A)
Definition: validate_password_imp.cc:48

◆ upgrade_modes

const char* upgrade_modes[] = {"NONE", "MINIMAL", "AUTO", "FORCE", NullS}