diff options
author | unknown <anozdrin/alik@ibm.> | 2007-06-14 19:23:55 +0400 |
---|---|---|
committer | unknown <anozdrin/alik@ibm.> | 2007-06-14 19:23:55 +0400 |
commit | 83de46bcf71f05580cf664f02569290a8fa214dd (patch) | |
tree | b54dd9543e107094f780c4a99b8dde4aa0213024 /sql/sql_trigger.h | |
parent | c7aeb8f37b007dfdd4d5339a7dd4b0083282be4e (diff) | |
download | mariadb-git-83de46bcf71f05580cf664f02569290a8fa214dd.tar.gz |
This the 4-th patch in scope of CS patch (BUG#11986).
The patch contains the following changes:
- Introduce auxilary functions to convenient work with character sets:
- resolve_charset();
- resolve_collation();
- get_default_db_collation();
- Introduce lex_string_set();
- Refactor Table_trigger_list::process_triggers() &
sp_head::execute_trigger() to be consistent with other code;
- Move reusable code from add_table_for_trigger() into
build_trn_path(), check_trn_exists() and load_table_name_for_trigger()
to be used in the following patch.
- Rename triggers_file_ext and trigname_file_ext into TRN_EXT and
TRG_EXT respectively.
include/my_sys.h:
Introduced auxilary functions (to be used in the following patch).
mysys/charset.c:
Introduced auxilary functions (to be used in the following patch).
sql/handler.cc:
Rename triggers_file_ext -> TRG_EXT;
Rename trigname_file_ext -> TRN_EXT.
sql/mysql_priv.h:
1. Fix typo;
2. Introduce auxilary functions (set_lex_string() will be used
in the following patch);
3. Rename triggers_file_ext -> TRG_EXT;
Rename trigname_file_ext -> TRN_EXT.
sql/sp_head.cc:
Make sp_head::execute_trigger() consistent with
sp_head::execute_function() and sp_head::execute_procedure().
sql/sp_head.h:
Make sp_head::execute_trigger() consistent with
sp_head::execute_function() and sp_head::execute_procedure().
sql/sql_db.cc:
1. Introduce auxilary function.
2. Polishing.
sql/sql_trigger.cc:
1. Move common code from add_table_for_trigger() into
- build_trn_path();
- check_trn_exists();
- load_table_name_for_trigger();
2. Polishing.
sql/sql_trigger.h:
1. Move common code from add_table_for_trigger() into
- build_trn_path();
- check_trn_exists();
- load_table_name_for_trigger();
2. Polishing.
Diffstat (limited to 'sql/sql_trigger.h')
-rw-r--r-- | sql/sql_trigger.h | 19 |
1 files changed, 15 insertions, 4 deletions
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h index 7d99dd811cd..c305efb5029 100644 --- a/sql/sql_trigger.h +++ b/sql/sql_trigger.h @@ -17,7 +17,7 @@ /* This class holds all information about triggers of table. - QQ: Will it be merged into TABLE in future ? + QQ: Will it be merged into TABLE in the future ? */ class Table_triggers_list: public Sql_alloc @@ -143,6 +143,17 @@ private: extern const LEX_STRING trg_action_time_type_names[]; extern const LEX_STRING trg_event_type_names[]; -int -add_table_for_trigger(THD *thd, sp_name *trig, bool if_exists, - TABLE_LIST **table); +bool add_table_for_trigger(THD *thd, + sp_name *trg_name, + bool continue_if_not_exist, + TABLE_LIST **table); + +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 load_table_name_for_trigger(THD *thd, + const sp_name *trg_name, + const LEX_STRING *trn_path, + LEX_STRING *tbl_name); + |