From 1794242b24cc0f958af48db9019d95aed06cf589 Mon Sep 17 00:00:00 2001 From: "thek@adventure.(none)" <> Date: Mon, 19 Nov 2007 17:59:44 +0100 Subject: Bug #31153 calling stored procedure crashes server if available memory is low When the server was out of memory it crashed because of invalid memory access. This patch adds detection for failed memory allocations and make the server output a proper error message. --- sql/sp_head.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sql/sp_head.h') diff --git a/sql/sp_head.h b/sql/sp_head.h index ebe40ce9c87..cb243dd2503 100644 --- a/sql/sp_head.h +++ b/sql/sp_head.h @@ -191,10 +191,10 @@ public: Security_context m_security_ctx; static void * - operator new(size_t size); + operator new(size_t size) throw (); static void - operator delete(void *ptr, size_t size); + operator delete(void *ptr, size_t size) throw (); sp_head(); @@ -254,7 +254,7 @@ public: } // Resets lex in 'thd' and keeps a copy of the old one. - void + bool reset_lex(THD *thd); // Restores lex in 'thd' from our copy, but keeps some status from the -- cgit v1.2.1