24#ifndef SQL_TABLE_MAINTENANCE_H
25#define SQL_TABLE_MAINTENANCE_H
57#define SQL_ADMIN_MSG_TEXT_SIZE 128 * 1024
79 bool histogram_auto_update);
93 std::set<String *, Column_name_comparator, Mem_root_allocator<String *>>;
336 bool with_admin_option_arg)
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:251
Data describing the table being created by CREATE TABLE or altered by ALTER TABLE.
Definition: sql_alter.h:205
Definition: sql_alter_instance.h:33
Clone plugin handler to convenient way to.
Definition: clone_handler.h:54
Definition: sql_list.h:494
Top-level node for the ALTER INSTANCE statement.
Definition: parse_tree_nodes.h:2216
Definition: parse_tree_nodes.h:3265
Definition: parse_tree_nodes.h:3111
Definition: parse_tree_nodes.h:3122
Definition: parse_tree_nodes.h:3133
Definition: sql_admin.h:409
enum alter_instance_action_enum alter_instance_action
Definition: sql_admin.h:411
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:2067
LEX_CSTRING channel_name_
Definition: sql_admin.h:412
Sql_cmd_alter_instance(enum alter_instance_action_enum alter_instance_action_arg, const LEX_CSTRING &channel_name)
Definition: sql_admin.h:416
Alter_instance * alter_instance
Definition: sql_admin.h:413
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:424
Sql_cmd_alter_user_default_role ALTER USER ... DEFAULT ROLE ... statement.
Definition: sql_admin.h:368
Sql_cmd_alter_user_default_role(bool if_exists_arg, const List< LEX_USER > *users_arg, const List< LEX_USER > *roles_arg, const role_enum role_type_arg)
Definition: sql_admin.h:377
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:387
const bool if_exists
Definition: sql_admin.h:371
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:2475
const List< LEX_USER > * roles
Definition: sql_admin.h:373
const role_enum role_type
Definition: sql_admin.h:374
const List< LEX_USER > * users
Definition: sql_admin.h:372
Sql_cmd_analyze_table represents the ANALYZE TABLE statement.
Definition: sql_admin.h:65
const LEX_STRING m_data
The histogram json literal for update.
Definition: sql_admin.h:105
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:83
LEX_STRING get_histogram_data_string() const
Definition: sql_admin.h:119
Histogram_command
Specifies which (if any) of the commands UPDATE HISTOGRAM or DROP HISTOGRAM that is specified after A...
Definition: sql_admin.h:71
bool handle_histogram_command_inner(THD *thd, Table_ref *table, histograms::results_map &results)
Definition: sql_admin.cc:1751
bool m_histogram_auto_update
True if AUTO UPDATE was specified by the user in UPDATE HISTOGRAM.
Definition: sql_admin.h:108
Histogram_command m_histogram_command
Which histogram command (if any) is specified.
Definition: sql_admin.h:96
Histogram_command get_histogram_command() const
Definition: sql_admin.h:111
Sql_cmd_analyze_table(THD *thd, Alter_info *alter_info, Histogram_command histogram_command, int histogram_buckets, LEX_STRING data, bool histogram_auto_update)
Constructor, used to represent a ANALYZE TABLE statement.
Definition: sql_admin.cc:306
int get_histogram_buckets() const
Definition: sql_admin.h:116
columns_set m_histogram_fields
The fields specified by the user in UPDATE/DROP HISTOGRAM.
Definition: sql_admin.h:99
bool drop_histogram(THD *thd, Table_ref *table, histograms::results_map &results)
Drops one or more histograms.
Definition: sql_admin.cc:317
const columns_set & get_histogram_fields() const
Definition: sql_admin.h:125
bool update_histogram(THD *thd, Table_ref *table, histograms::results_map &results)
Update one or more histograms.
Definition: sql_admin.cc:646
std::set< String *, Column_name_comparator, Mem_root_allocator< String * > > columns_set
Definition: sql_admin.h:93
bool get_histogram_auto_update() const
Definition: sql_admin.h:122
int m_histogram_buckets
The number of buckets specified by the user in UPDATE HISTOGRAM.
Definition: sql_admin.h:102
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:1832
bool send_histogram_results(THD *thd, const histograms::results_map &results, const Table_ref *table)
Send the result of histogram operations back to the client as a result set.
Definition: sql_admin.cc:363
bool set_histogram_fields(List< String > *fields)
Set which fields to (try and) create/update or delete histogram statistics for.
Definition: sql_admin.cc:1655
bool handle_histogram_command(THD *thd, Table_ref *table)
Dispatches the histogram command (DROP or UPDATE) and commits or rollbacks the changes depending on s...
Definition: sql_admin.cc:1825
Sql_cmd_check_table represents the CHECK TABLE statement.
Definition: sql_admin.h:207
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:213
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:1871
Sql_cmd_clone implements CLONE ... statement.
Definition: sql_admin.h:433
bool execute_server(THD *thd)
Execute clone server.
Definition: sql_admin.cc:2264
bool is_local() const
Definition: sql_admin.h:483
Sql_cmd_clone(LEX_CSTRING data_dir)
Construct clone command for local clone.
Definition: sql_admin.h:453
LEX_CSTRING m_data_dir
Data directory for cloned data.
Definition: sql_admin.h:499
Sql_cmd_clone()
Construct clone command for clone server.
Definition: sql_admin.h:436
bool load(THD *thd)
Load clone plugin for clone server.
Definition: sql_admin.cc:2241
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:2123
bool rewrite(THD *thd, String &rlb)
Re-write clone statement to hide password.
Definition: sql_admin.cc:2302
Clone_handler * m_clone
Clone handle in server.
Definition: sql_admin.h:502
LEX_CSTRING m_passwd
Password for remote connection.
Definition: sql_admin.h:496
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:462
LEX_CSTRING m_host
Remote server IP.
Definition: sql_admin.h:487
plugin_ref m_plugin
Loaded clone plugin reference.
Definition: sql_admin.h:505
bool m_is_local
If it is local clone operation.
Definition: sql_admin.h:508
LEX_CSTRING m_user
User name for remote connection.
Definition: sql_admin.h:493
const ulong m_port
Remote server port.
Definition: sql_admin.h:490
Sql_cmd_create_role represents the CREATE ROLE ... statement.
Definition: sql_admin.h:288
const List< LEX_USER > * roles
Definition: sql_admin.h:292
const bool if_not_exists
Definition: sql_admin.h:291
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:300
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:2345
Sql_cmd_create_role(bool if_not_exists_arg, const List< LEX_USER > *roles_arg)
Definition: sql_admin.h:295
A base class for DCL/ACL statements.
Definition: sql_cmd_dcl.h:32
A base class for CREATE/ALTER TABLE commands and friends.
Definition: sql_cmd_ddl_table.h:50
Sql_cmd_ddl_table(Alter_info *alter_info)
Definition: sql_cmd_ddl_table.cc:68
Sql_cmd_drop_role represents the DROP ROLE ... statement.
Definition: sql_admin.h:308
const List< LEX_USER > * roles
Definition: sql_admin.h:312
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:2395
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:320
bool ignore_errors
Definition: sql_admin.h:311
Sql_cmd_drop_role(bool ignore_errors_arg, const List< LEX_USER > *roles_arg)
Definition: sql_admin.h:315
Sql_cmd_grant_roles represents the GRANT role-list TO ... statement.
Definition: sql_admin.h:328
Sql_cmd_grant_roles(const List< LEX_USER > *roles_arg, const List< LEX_USER > *users_arg, bool with_admin_option_arg)
Definition: sql_admin.h:334
const List< LEX_USER > * users
Definition: sql_admin.h:330
const List< LEX_USER > * roles
Definition: sql_admin.h:329
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:342
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:2455
const bool with_admin_option
Definition: sql_admin.h:331
Sql_cmd_optimize_table represents the OPTIMIZE TABLE statement.
Definition: sql_admin.h:222
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:228
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:1925
Sql_cmd_repair_table represents the REPAIR TABLE statement.
Definition: sql_admin.h:237
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:1952
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:243
Sql_cmd_revoke_roles represents the REVOKE [role list] TO ... statement.
Definition: sql_admin.h:350
Sql_cmd_revoke_roles(const List< LEX_USER > *roles_arg, const List< LEX_USER > *users_arg)
Definition: sql_admin.h:355
const List< LEX_USER > * users
Definition: sql_admin.h:352
const List< LEX_USER > * roles
Definition: sql_admin.h:351
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:360
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:2465
Sql_cmd_set_role represents the SET ROLE ... statement.
Definition: sql_admin.h:260
Sql_cmd_set_role(role_enum role_type_arg, const List< LEX_USER > *except_roles_arg)
Definition: sql_admin.h:268
const role_enum role_type
Definition: sql_admin.h:263
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:2417
Sql_cmd_set_role(const List< LEX_USER > *role_arg)
Definition: sql_admin.h:278
const List< LEX_USER > * except_roles
Definition: sql_admin.h:265
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:282
const List< LEX_USER > * role_list
Definition: sql_admin.h:264
Sql_cmd_shutdown represents the SHUTDOWN statement.
Definition: sql_admin.h:249
enum_sql_command sql_command_code() const override
Return the command code for this statement.
Definition: sql_admin.h:252
bool execute(THD *thd) override
Execute this SQL statement.
Definition: sql_admin.cc:1980
Representation of an SQL command.
Definition: sql_cmd.h:83
Using this class is fraught with peril, and you need to be very careful when doing so.
Definition: sql_string.h:167
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:36
enum_sql_command
Definition: my_sqlcommand.h:46
@ SQLCOM_CHECK
Definition: my_sqlcommand.h:93
@ SQLCOM_OPTIMIZE
Definition: my_sqlcommand.h:92
@ SQLCOM_ALTER_INSTANCE
Definition: my_sqlcommand.h:186
@ SQLCOM_REVOKE_ROLE
Definition: my_sqlcommand.h:193
@ SQLCOM_REPAIR
Definition: my_sqlcommand.h:86
@ SQLCOM_CREATE_ROLE
Definition: my_sqlcommand.h:189
@ SQLCOM_SHUTDOWN
Definition: my_sqlcommand.h:184
@ SQLCOM_ALTER_USER_DEFAULT_ROLE
Definition: my_sqlcommand.h:194
@ SQLCOM_CLONE
Definition: my_sqlcommand.h:200
@ SQLCOM_SET_ROLE
Definition: my_sqlcommand.h:191
@ SQLCOM_DROP_ROLE
Definition: my_sqlcommand.h:190
@ SQLCOM_GRANT_ROLE
Definition: my_sqlcommand.h:192
@ SQLCOM_ANALYZE
Definition: my_sqlcommand.h:98
PasswdValue user_info
Definition: mysqld.cc:1924
static PFS_engine_table_share_proxy table
Definition: pfs.cc:61
std::map< std::string, Message, std::less< std::string >, Histogram_key_allocator< std::pair< const std::string, Message > > > results_map
Definition: histogram.h:147
required uint64 port
Definition: replication_asynchronous_connection_failover.proto:33
alter_instance_action_enum
Definition: sql_admin.h:392
@ RELOAD_KEYRING
Definition: sql_admin.h:399
@ ALTER_INSTANCE_RELOAD_TLS_ROLLBACK_ON_ERROR
Definition: sql_admin.h:395
@ ROTATE_BINLOG_MASTER_KEY
Definition: sql_admin.h:396
@ ALTER_INSTANCE_DISABLE_INNODB_REDO
Definition: sql_admin.h:398
@ ALTER_INSTANCE_ENABLE_INNODB_REDO
Definition: sql_admin.h:397
@ LAST_ACTION
Definition: sql_admin.h:400
@ ROTATE_INNODB_MASTER_KEY
Definition: sql_admin.h:393
@ ALTER_INSTANCE_RELOAD_TLS
Definition: sql_admin.h:394
role_enum
Definition: sql_admin.h:255
Representation of an SQL command.
Definition: sql_admin.h:52
bool operator()(const String *lhs, const String *rhs) const
Definition: sql_admin.cc:111
Definition: keycache.h:73
Definition: mysql_lex_string.h:40
Definition: mysql_lex_string.h:35
Definition: sql_plugin_ref.h:45