1#ifndef SQL_TRIGGER_INCLUDED
2#define SQL_TRIGGER_INCLUDED
98 const char *new_db_name);
130 const char *trg_name);
144 const char *trg_name) {
157#ifdef HAVE_PSI_SP_INTERFACE
Kerberos Client Authentication nullptr
Definition: auth_kerberos_client_plugin.cc:250
A granted metadata lock.
Definition: mdl.h:984
This class implements the CREATE TRIGGER statement.
Definition: sql_trigger.h:200
bool execute(THD *thd) final
Execute CREATE TRIGGER statement.
Definition: sql_trigger.cc:366
enum_sql_command sql_command_code() const final
Return the command code for CREATE TRIGGER.
Definition: sql_trigger.h:206
This class has common code for CREATE/DROP TRIGGER statements.
Definition: sql_trigger.h:167
Table_ref * m_trigger_table
Definition: sql_trigger.h:193
bool check_trg_priv_on_subj_table(THD *thd, Table_ref *table) const
Check that the user has TRIGGER privilege on the subject table.
Definition: sql_trigger.cc:225
Sql_cmd_ddl_trigger_common()
Definition: sql_trigger.h:178
void set_table(Table_ref *trigger_table)
Set a table associated with a trigger.
Definition: sql_trigger.h:175
void restore_original_mdl_state(THD *thd, MDL_ticket *mdl_ticket) const
Restore original state of meta-data locks.
Definition: sql_trigger.cc:335
TABLE * open_and_lock_subj_table(THD *thd, Table_ref *tables, MDL_ticket **mdl_ticket) const
Open and lock a table associated with a trigger.
Definition: sql_trigger.cc:248
This class implements the DROP TRIGGER statement.
Definition: sql_trigger.h:217
bool execute(THD *thd) final
Execute DROP TRIGGER statement.
Definition: sql_trigger.cc:496
enum_sql_command sql_command_code() const final
Return the command code for DROP TRIGGER.
Definition: sql_trigger.h:223
Representation of an SQL command.
Definition: sql_cmd.h:81
For each client connection we create a separate thread with THD serving as a thread/connection descri...
Definition: sql_lexer_thd.h:35
Defines various enable/disable and HAVE_ macros related to the performance schema instrumentation sys...
enum_sql_command
Definition: my_sqlcommand.h:45
@ SQLCOM_CREATE_TRIGGER
Definition: my_sqlcommand.h:150
@ SQLCOM_DROP_TRIGGER
Definition: my_sqlcommand.h:151
static PFS_engine_table_share_proxy table
Definition: pfs.cc:60
The version of the current data dictionary table definitions.
Definition: dictionary_client.h:42
const char * db_name
Definition: rules_table_service.cc:54
Representation of an SQL command.
enum_mdl_type
Type of metadata lock request.
Definition: sql_lexer_yacc_state.h:105
@ MDL_SHARED_HIGH_PRIO
Definition: sql_lexer_yacc_state.h:157
bool acquire_exclusive_mdl_for_trigger(THD *thd, const char *db, const char *trg_name)
Acquire exclusive MDL lock for a trigger in specified schema.
Definition: sql_trigger.cc:176
bool acquire_mdl_for_trigger(THD *thd, const char *db, const char *trg_name, enum_mdl_type trigger_name_mdl_type)
Acquire either exclusive or shared MDL lock for a trigger in specified schema.
Definition: sql_trigger.cc:186
bool acquire_shared_mdl_for_trigger(THD *thd, const char *db, const char *trg_name)
Acquire shared MDL lock for a trigger in specified schema.
Definition: sql_trigger.h:143
void remove_all_triggers_from_perfschema(const char *schema_name, const dd::Table &table)
Drop statistics from performance schema for every trigger associated with a table.
Definition: sql_trigger.cc:148
bool check_table_triggers_are_not_in_the_same_schema(const char *db_name, const dd::Table &table, const char *new_db_name)
Check for table with triggers that old database name and new database name are the same.
Definition: sql_trigger.cc:158
bool get_table_for_trigger(THD *thd, const LEX_CSTRING &db_name, const LEX_STRING &trigger_name, bool continue_if_not_exist, Table_ref **table)
Find trigger's table from trigger identifier.
Definition: sql_trigger.cc:79
Definition: mysql_lex_string.h:39
Definition: mysql_lex_string.h:34