diff options
author | dlenev@brandersnatch.localdomain <> | 2005-03-04 16:35:28 +0300 |
---|---|---|
committer | dlenev@brandersnatch.localdomain <> | 2005-03-04 16:35:28 +0300 |
commit | 5a6c7027f070aaa634051870d88bc185fed70878 (patch) | |
tree | b4e76c9e63193526fe9a7fecdf02c5a44fe5c270 /sql/sp.h | |
parent | 6611d3d2f8ea02886c4b507b7d15f5c3773431cc (diff) | |
download | mariadb-git-5a6c7027f070aaa634051870d88bc185fed70878.tar.gz |
Better approach for prelocking of tables for stored routines execution
and some SP-related cleanups.
- We don't have separate stage for calculation of list of tables
to be prelocked and doing implicit LOCK/UNLOCK any more.
Instead we calculate this list at open_tables() and do implicit
LOCK in lock_tables() (and UNLOCK in close_thread_tables()).
Also now we support cases when same table (with same alias) is
used several times in the same query in SP.
- Cleaned up execution of SP. Moved all common code which handles
LEX and does preparations before statement execution or complex
expression evaluation to auxilary sp_lex_keeper class. Now
all statements in SP (and corresponding instructions) that
evaluate expression which can contain subquery have their
own LEX.
Diffstat (limited to 'sql/sp.h')
-rw-r--r-- | sql/sp.h | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -34,7 +34,7 @@ int sp_drop_db_routines(THD *thd, char *db); sp_head * -sp_find_procedure(THD *thd, sp_name *name); +sp_find_procedure(THD *thd, sp_name *name, bool cache_only = 0); int sp_exists_routine(THD *thd, TABLE_LIST *procs, bool any, bool no_error); @@ -82,10 +82,10 @@ sp_function_exists(THD *thd, sp_name *name); */ void sp_add_to_hash(HASH *h, sp_name *fun); -void +bool sp_merge_hash(HASH *dst, HASH *src); -int -sp_cache_routines(THD *thd, LEX *lex, int type); +void +sp_cache_routines(THD *thd, LEX *lex); // |