summaryrefslogtreecommitdiff
path: root/sql/sp.h
diff options
context:
space:
mode:
authorunknown <pem@mysql.com>2005-10-26 15:34:57 +0200
committerunknown <pem@mysql.com>2005-10-26 15:34:57 +0200
commit9349f18b4491b55d8edc4a314131bd44108278ad (patch)
tree8438f02a4a9ed206e60f26923143418163c0ba22 /sql/sp.h
parent10a889a577e1a09f29922ba20d7e8ad96449bb04 (diff)
downloadmariadb-git-9349f18b4491b55d8edc4a314131bd44108278ad.tar.gz
Fixed BUG#14233: Crash after tampering with the mysql.proc table
Added error checking for errors when attempting to use stored procedures after the mysql.proc table has been dropped, corrupted, or tampered with. Test cases were put in a separate file (sp-destruct.test). mysql-test/t/sp.test: Added comment. sql/share/errmsg.txt: New error message for corrupted mysql.proc table. sql/sp.cc: Check and return error code when caching stored routines. In the case when no error message has been set, set one. sql/sp.h: Return error code from stored routine cache function. sql/sql_base.cc: Check for error from sp_cache_routines_* calls. sql/sql_trigger.h: Updated friend declaration for sp_cache_routines*. mysql-test/r/sp-destruct.result: New test file for destruction of the mysql.proc table. mysql-test/t/sp-destruct.test: New result file for destruction of the mysql.proc table.
Diffstat (limited to 'sql/sp.h')
-rw-r--r--sql/sp.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sql/sp.h b/sql/sp.h
index 933e5793e4c..2332e8a0cbb 100644
--- a/sql/sp.h
+++ b/sql/sp.h
@@ -86,11 +86,11 @@ void sp_add_used_routine(LEX *lex, Query_arena *arena,
sp_name *rt, char rt_type);
void sp_remove_not_own_routines(LEX *lex);
void sp_update_sp_used_routines(HASH *dst, HASH *src);
-bool sp_cache_routines_and_add_tables(THD *thd, LEX *lex,
- bool first_no_prelock);
-void sp_cache_routines_and_add_tables_for_view(THD *thd, LEX *lex,
- LEX *aux_lex);
-void sp_cache_routines_and_add_tables_for_triggers(THD *thd, LEX *lex,
+int sp_cache_routines_and_add_tables(THD *thd, LEX *lex,
+ bool first_no_prelock, bool *tabs_changed);
+int sp_cache_routines_and_add_tables_for_view(THD *thd, LEX *lex,
+ LEX *aux_lex);
+int sp_cache_routines_and_add_tables_for_triggers(THD *thd, LEX *lex,
Table_triggers_list *triggers);
extern "C" byte* sp_sroutine_key(const byte *ptr, uint *plen, my_bool first);