diff options
author | pem@mysql.comhem.se <> | 2005-06-30 18:07:06 +0200 |
---|---|---|
committer | pem@mysql.comhem.se <> | 2005-06-30 18:07:06 +0200 |
commit | fda325b943dd56a3762e062570cf081472b046f4 (patch) | |
tree | d2ab360420738387ec9248b89a5b579f332c03d1 /sql/sp_rcontext.cc | |
parent | f60ebc4815f9fd7fedacfb849547edf73feee3a9 (diff) | |
download | mariadb-git-fda325b943dd56a3762e062570cf081472b046f4.tar.gz |
Fixed BUG#11529: crash server after use stored procedure
Make sure to cleanup the items for a cursor query after each open, otherwise
it's done too late, after the run-time mem_root is freed.
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r-- | sql/sp_rcontext.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc index aacb9254753..d0817e43790 100644 --- a/sql/sp_rcontext.cc +++ b/sql/sp_rcontext.cc @@ -148,9 +148,9 @@ sp_rcontext::restore_variables(uint fp) } void -sp_rcontext::push_cursor(sp_lex_keeper *lex_keeper) +sp_rcontext::push_cursor(sp_lex_keeper *lex_keeper, sp_instr_cpush *i) { - m_cstack[m_ccount++]= new sp_cursor(lex_keeper); + m_cstack[m_ccount++]= new sp_cursor(lex_keeper, i); } void @@ -169,8 +169,9 @@ sp_rcontext::pop_cursors(uint count) * */ -sp_cursor::sp_cursor(sp_lex_keeper *lex_keeper) - :m_lex_keeper(lex_keeper), m_prot(NULL), m_isopen(0), m_current_row(NULL) +sp_cursor::sp_cursor(sp_lex_keeper *lex_keeper, sp_instr_cpush *i) + :m_lex_keeper(lex_keeper), m_prot(NULL), m_isopen(0), m_current_row(NULL), + m_i(i) { /* currsor can't be stored in QC, so we should prevent opening QC for |