diff options
author | Michael Widenius <monty@askmonty.org> | 2011-10-06 16:56:59 +0300 |
---|---|---|
committer | Michael Widenius <monty@askmonty.org> | 2011-10-06 16:56:59 +0300 |
commit | 9c32088322f69155d91f6033319ebb03d108f044 (patch) | |
tree | 159ff05f36694d017d5c5a62d559a0c9ef1f5b21 /sql/sp.h | |
parent | 5f607a2c705063ef23a9974b34151a991e80538f (diff) | |
download | mariadb-git-9c32088322f69155d91f6033319ebb03d108f044.tar.gz |
Fixed that when using a trigger mysql.proc is now accessed
Cleanup: Changed procedure type from a int/char to an enum for easier to manage and debug code.
mysql-test/r/trigger.result:
Test that mysql.proc is not used as part of creating or using a trigger.
mysql-test/t/trigger.test:
Test that mysql.proc is not used as part of creating or using a trigger.
sql/sp.cc:
The main bug fix is to not look up triggers in mysql.proc; This is done by ignoreing type == TYPE_ENUM_TRIGGER in sp_add_used_routine()
Cleanup: Changed procedure type from a int/char to an enum.
sql/sp.h:
Cleanup: Changed procedure type from a int/char to an enum.
sql/sp_head.h:
Cleanup: Changed procedure type from a int/char to an enum.
sql/sql_db.cc:
Fix include order
sql/sql_lex.cc:
Fix include order
sql/sql_parse.cc:
Cleanup: Changed procedure type from a int/char to an enum.
sql/sql_show.cc:
Fix include order
sql/sql_view.cc:
Fix include order
Diffstat (limited to 'sql/sp.h')
-rw-r--r-- | sql/sp.h | 16 |
1 files changed, 9 insertions, 7 deletions
@@ -39,26 +39,28 @@ int sp_drop_db_routines(THD *thd, char *db); sp_head * -sp_find_routine(THD *thd, int type, sp_name *name, +sp_find_routine(THD *thd, stored_procedure_type type, sp_name *name, sp_cache **cp, bool cache_only); bool sp_exist_routines(THD *thd, TABLE_LIST *procs, bool any); int -sp_routine_exists_in_table(THD *thd, int type, sp_name *name); +sp_routine_exists_in_table(THD *thd, stored_procedure_type type, + sp_name *name); bool -sp_show_create_routine(THD *thd, int type, sp_name *name); +sp_show_create_routine(THD *thd, stored_procedure_type type, sp_name *name); int -sp_create_routine(THD *thd, int type, sp_head *sp); +sp_create_routine(THD *thd, stored_procedure_type type, sp_head *sp); int -sp_update_routine(THD *thd, int type, sp_name *name, st_sp_chistics *chistics); +sp_update_routine(THD *thd, stored_procedure_type type, sp_name *name, + st_sp_chistics *chistics); int -sp_drop_routine(THD *thd, int type, sp_name *name); +sp_drop_routine(THD *thd, stored_procedure_type type, sp_name *name); /* Procedures for pre-caching of stored routines and building table list @@ -67,7 +69,7 @@ sp_drop_routine(THD *thd, int type, sp_name *name); void sp_get_prelocking_info(THD *thd, bool *need_prelocking, bool *first_no_prelocking); void sp_add_used_routine(LEX *lex, Query_arena *arena, - sp_name *rt, char rt_type); + sp_name *rt, stored_procedure_type rt_type); void sp_remove_not_own_routines(LEX *lex); bool sp_update_sp_used_routines(HASH *dst, HASH *src); int sp_cache_routines_and_add_tables(THD *thd, LEX *lex, |