summaryrefslogtreecommitdiff
path: root/sql/sp_rcontext.cc
diff options
context:
space:
mode:
authorpem@mysql.comhem.se <>2004-01-09 09:36:37 +0100
committerpem@mysql.comhem.se <>2004-01-09 09:36:37 +0100
commit1ef17f0a146f57f6c6eebcb563f0c47c080656ff (patch)
tree727512acc3723695943c2c2e98fb7d75a41f96d5 /sql/sp_rcontext.cc
parentc40e51f28301d216ecfb5fee443c81e0bc326b30 (diff)
downloadmariadb-git-1ef17f0a146f57f6c6eebcb563f0c47c080656ff.tar.gz
Fix BUG#2269: Lost connect if stored procedure called before USE
(And some minor correction of cursor open)
Diffstat (limited to 'sql/sp_rcontext.cc')
-rw-r--r--sql/sp_rcontext.cc9
1 files changed, 6 insertions, 3 deletions
diff --git a/sql/sp_rcontext.cc b/sql/sp_rcontext.cc
index f328cdb7285..0b2b20fe3b3 100644
--- a/sql/sp_rcontext.cc
+++ b/sql/sp_rcontext.cc
@@ -153,12 +153,15 @@ sp_cursor::pre_open(THD *thd)
}
void
-sp_cursor::post_open(THD *thd, my_bool isopen)
+sp_cursor::post_open(THD *thd, my_bool was_opened)
{
thd->net.no_send_eof= m_nseof; // Restore the originals
thd->protocol= m_oprot;
- m_isopen= isopen;
- m_current_row= m_prot->data;
+ if (was_opened)
+ {
+ m_isopen= was_opened;
+ m_current_row= m_prot->data;
+ }
}
int