mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
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.)
This commit is contained in:
@ -295,6 +295,12 @@ public:
|
||||
return test(m_flags &
|
||||
(CONTAINS_DYNAMIC_SQL|MULTI_RESULTS|HAS_SET_AUTOCOMMIT_STMT));
|
||||
}
|
||||
|
||||
#ifndef DBUG_OFF
|
||||
int show_routine_code(THD *thd);
|
||||
#endif
|
||||
|
||||
|
||||
private:
|
||||
|
||||
MEM_ROOT *m_thd_root; // Temp. store for thd's mem_root
|
||||
@ -856,8 +862,8 @@ class sp_instr_cpush : public sp_instr
|
||||
|
||||
public:
|
||||
|
||||
sp_instr_cpush(uint ip, sp_pcontext *ctx, LEX *lex)
|
||||
: sp_instr(ip, ctx), m_lex_keeper(lex, TRUE)
|
||||
sp_instr_cpush(uint ip, sp_pcontext *ctx, LEX *lex, uint offset)
|
||||
: sp_instr(ip, ctx), m_lex_keeper(lex, TRUE), m_cursor(offset)
|
||||
{}
|
||||
|
||||
virtual ~sp_instr_cpush()
|
||||
@ -876,6 +882,7 @@ public:
|
||||
private:
|
||||
|
||||
sp_lex_keeper m_lex_keeper;
|
||||
uint m_cursor; /* Frame offset (for debugging) */
|
||||
|
||||
}; // class sp_instr_cpush : public sp_instr
|
||||
|
||||
|
Reference in New Issue
Block a user