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_rcontext.cc | |
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_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index 0c6c8c5aa70..a2e2a38dfff 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -125,9 +125,9 @@ sp_rcontext::restore_variables(uint fp) } void -sp_rcontext::push_cursor(LEX *lex) +sp_rcontext::push_cursor(sp_lex_keeper *lex_keeper) { - m_cstack[m_ccount++]= new sp_cursor(lex); + m_cstack[m_ccount++]= new sp_cursor(lex_keeper); } void @@ -148,7 +148,7 @@ sp_rcontext::pop_cursors(uint count) // We have split this in two to make it easy for sp_instr_copen // to reuse the sp_instr::exec_stmt() code. -LEX * +sp_lex_keeper* sp_cursor::pre_open(THD *thd) { if (m_isopen) @@ -168,7 +168,7 @@ sp_cursor::pre_open(THD *thd) m_nseof= thd->net.no_send_eof; thd->net.no_send_eof= TRUE; - return m_lex; + return m_lex_keeper; } void |