From 027535733de4e0daef066d1c0a2aff489239d94f Mon Sep 17 00:00:00 2001 From: unknown Date: Thu, 8 Jan 2004 10:37:31 +0100 Subject: Fix BUG#2259: Crash after fetch from not-open cursor in stored procedure Initialize and test properly when cleaning up, to avoid crash in some error cases. mysql-test/r/sp-error.result: Test case for BUG#2259 mysql-test/t/sp-error.test: Test case for BUG#2259 sql/sp_rcontext.cc: Cleanup in a more controlled way to avoid crashes in some error cases. Remove unused variable. sql/sp_rcontext.h: Initialize member var, for cleanup tests. --- sql/sp_rcontext.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sql/sp_rcontext.h') diff --git a/sql/sp_rcontext.h b/sql/sp_rcontext.h index 5d836998cb1..7a9271ed06a 100644 --- a/sql/sp_rcontext.h +++ b/sql/sp_rcontext.h @@ -205,7 +205,7 @@ class sp_cursor : public Sql_alloc public: sp_cursor(LEX *lex) - : m_lex(lex), m_isopen(0), m_current_row(NULL) + : m_lex(lex), m_prot(NULL), m_isopen(0), m_current_row(NULL) { /* Empty */ } -- cgit v1.2.1