diff options
author | Monty <monty@mariadb.org> | 2018-01-07 18:03:44 +0200 |
---|---|---|
committer | Monty <monty@mariadb.org> | 2018-01-30 21:33:55 +0200 |
commit | a7e352b54ddfaf91c92951d605cb02a4ffd2676b (patch) | |
tree | dc76f140342938ed2a0fe0e005100402762d5308 /sql/sql_trigger.h | |
parent | 921c5e931452301a09c84c53ffe35b81e6a1c71a (diff) | |
download | mariadb-git-a7e352b54ddfaf91c92951d605cb02a4ffd2676b.tar.gz |
Changed database, tablename and alias to be LEX_CSTRING
This was done in, among other things:
- thd->db and thd->db_length
- TABLE_LIST tablename, db, alias and schema_name
- Audit plugin database name
- lex->db
- All db and table names in Alter_table_ctx
- st_select_lex db
Other things:
- Changed a lot of functions to take const LEX_CSTRING* as argument
for db, table_name and alias. See init_one_table() as an example.
- Changed some function arguments from LEX_CSTRING to const LEX_CSTRING
- Changed some lists from LEX_STRING to LEX_CSTRING
- threads_mysql.result changed because process list_db wasn't always
correctly updated
- New append_identifier() function that takes LEX_CSTRING* as arguments
- Added new element tmp_buff to Alter_table_ctx to separate temp name
handling from temporary space
- Ensure we store the length after my_casedn_str() of table/db names
- Removed not used version of rename_table_in_stat_tables()
- Changed Natural_join_column::table_name and db_name() to never return
NULL (used for print)
- thd->get_db() now returns db as a printable string (thd->db.str or "")
Diffstat (limited to 'sql/sql_trigger.h')
-rw-r--r-- | sql/sql_trigger.h | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index 6c02afdb89c..0fddb94fde1 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -223,17 +223,17 @@ public: bool old_row_is_record1); void empty_lists(); bool create_lists_needed_for_files(MEM_ROOT *root); - bool save_trigger_file(THD *thd, const char *db, const char *table_name); + bool save_trigger_file(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *table_name); - static bool check_n_load(THD *thd, const char *db, const char *table_name, + static bool check_n_load(THD *thd, const LEX_CSTRING *db, const LEX_CSTRING *table_name, TABLE *table, bool names_only); - static bool drop_all_triggers(THD *thd, const char *db, - const char *table_name); - static bool change_table_name(THD *thd, const char *db, - const char *old_alias, - const char *old_table, - const char *new_db, - const char *new_table); + static bool drop_all_triggers(THD *thd, const LEX_CSTRING *db, + const LEX_CSTRING *table_name); + static bool change_table_name(THD *thd, const LEX_CSTRING *db, + const LEX_CSTRING *old_alias, + const LEX_CSTRING *old_table, + const LEX_CSTRING *new_db, + const LEX_CSTRING *new_table); void add_trigger(trg_event_type event_type, trg_action_time_type action_time, trigger_order_type ordering_clause, @@ -286,15 +286,15 @@ public: private: bool prepare_record_accessors(TABLE *table); - Trigger *change_table_name_in_trignames(const char *old_db_name, - const char *new_db_name, - LEX_CSTRING *new_table_name, + Trigger *change_table_name_in_trignames(const LEX_CSTRING *old_db_name, + const LEX_CSTRING *new_db_name, + const LEX_CSTRING *new_table_name, Trigger *trigger); bool change_table_name_in_triggers(THD *thd, - const char *old_db_name, - const char *new_db_name, - LEX_CSTRING *old_table_name, - LEX_CSTRING *new_table_name); + const LEX_CSTRING *old_db_name, + const LEX_CSTRING *new_db_name, + const LEX_CSTRING *old_table_name, + const LEX_CSTRING *new_table_name); bool check_for_broken_triggers() { @@ -314,7 +314,7 @@ bool add_table_for_trigger(THD *thd, void build_trn_path(THD *thd, const sp_name *trg_name, LEX_STRING *trn_path); -bool check_trn_exists(const LEX_STRING *trn_path); +bool check_trn_exists(const LEX_CSTRING *trn_path); bool load_table_name_for_trigger(THD *thd, const sp_name *trg_name, |