diff options
author | pem@mysql.com <> | 2005-11-17 11:11:48 +0100 |
---|---|---|
committer | pem@mysql.com <> | 2005-11-17 11:11:48 +0100 |
commit | c518a2405fefd175030a0e9ff019dedb064f28e5 (patch) | |
tree | 56f597a525587468da328317b4cb9b936d5a2d3f /sql/sp_pcontext.h | |
parent | 43bbd352e3aa4af23f479e33ba80a6dfdeb6774f (diff) | |
download | mariadb-git-c518a2405fefd175030a0e9ff019dedb064f28e5.tar.gz |
Background:
Since long, the compiled code of stored routines has been printed in the trace file
when starting mysqld with the "--debug" flag. (At creation time only, and only in
debug builds of course.) This has been helpful when debugging stored procedure
execution, but it's a bit awkward to use. Also, the printing of some of the
instructions is a bit terse, in particular for sp_instr_stmt where only the command
code was printed.
This improves the printout of several of the instructions, and adds the debugging-
only commands "show procedure code <name>" and "show function code <name>".
(In non-debug builds they are not available.)
Diffstat (limited to 'sql/sp_pcontext.h')
-rw-r--r-- | sql/sp_pcontext.h | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/sql/sp_pcontext.h b/sql/sp_pcontext.h index bd2259cb6fb..77e749fe3ad 100644 --- a/sql/sp_pcontext.h +++ b/sql/sp_pcontext.h @@ -172,16 +172,7 @@ class sp_pcontext : public Sql_alloc // Find by index sp_pvar_t * - find_pvar(uint i) - { - sp_pvar_t *p; - - if (i < m_pvar.elements) - get_dynamic(&m_pvar, (gptr)&p, i); - else - p= NULL; - return p; - } + find_pvar(uint i); // // Labels @@ -261,6 +252,10 @@ class sp_pcontext : public Sql_alloc my_bool find_cursor(LEX_STRING *name, uint *poff, my_bool scoped=0); + /* Find by index (for debugging only) */ + my_bool + find_cursor(uint i, LEX_STRING *n); + inline uint max_cursors() { |