summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.h
diff options
context:
space:
mode:
authoranozdrin/alik@ibm. <>2007-06-14 19:23:55 +0400
committeranozdrin/alik@ibm. <>2007-06-14 19:23:55 +0400
commit62e3e462757af6dd2e0d8dab0ecefb77aa461768 (patch)
treeb54dd9543e107094f780c4a99b8dde4aa0213024 /sql/sql_trigger.h
parentf8be48bb4f27e4472346987dde341f393dc7d944 (diff)
downloadmariadb-git-62e3e462757af6dd2e0d8dab0ecefb77aa461768.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.
Diffstat (limited to 'sql/sql_trigger.h')
-rw-r--r--sql/sql_trigger.h19
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);
+