Bug #40072 Fix for exceptional handling is not complete in src 5.0.67
Submitted: 16 Oct 2008 9:13 Modified: 16 Oct 2008 9:58
Reporter: Aarushi Gupta Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: Compiling Severity:S5 (Performance)
Version:5.0.67 OS:Other (Tru64)
Assigned to: CPU Architecture:Any

[16 Oct 2008 9:13] Aarushi Gupta
Description:
We are porting 5.0.67 on Tru64 and find that below fixes are done:
http://lists.mysql.com/commits/51209

And one of them is for exceptional handling.
=== modified file 'sql/sp_head.cc'
--- a/sql/sp_head.cc	2008-07-14 21:41:30 +0000
+++ b/sql/sp_head.cc	2008-08-08 16:59:58 +0000
@@ -446,7 +446,7 @@ sp_head::operator new(size_t size) throw
   init_sql_alloc(&own_root, MEM_ROOT_BLOCK_SIZE, MEM_ROOT_PREALLOC);
   sp= (sp_head *) alloc_root(&own_root, size);
   if (sp == NULL)
-    return NULL;
+    DBUG_RETURN(NULL);
   sp->main_mem_root= own_root;
   DBUG_PRINT("info", ("mem_root 0x%lx", (ulong) &sp->mem_root));
   DBUG_RETURN(sp);
=====================

This fix also include changes for some more files like:
 sql/field.h
 sql/item.h

But fix is missing. 

How to repeat:
Compilation 

Suggested fix:
Update for hearder files is needed. Complete fix need to port in src.
[16 Oct 2008 9:58] Sveta Smirnova
Thank you for the report.

According to following comment to bug #38296 patch was pushed to version 5.0.68. Please use Enterprise version or wait next Community release.

 [14 Aug 17:34] Paul DuBois

Noted in 5.0.68, 6.0.7 changelogs.

The server consumed excess memory while parsing statements with
hundreds or thousands of nested boolean conditions (such as OR (OR 
... (OR ... ))). This could lead to a server crash or incorrect 
statement execution, or cause other client statements to fail due to
lack of memory. The latter result constitutes a denial of service.

Setting report to Patch Queued pending push of fix into 5.1.x.