Hi Kristofer
kpettersson@stripped wrote:
> Below is the list of changes that have just been committed into a local
> 5.0 repository of thek. When thek does a push these changes will
> be propagated to the main repository and, within 24 hours after the
> push, to the public repository.
> For information on how to access the public repository
> see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
>
> ChangeSet@stripped, 2007-11-19 17:59:44+01:00, thek@adventure.(none) +7 -0
> 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/mysqld.cc@stripped, 2007-11-19 17:59:43+01:00, thek@adventure.(none) +12 -2
> Don't try to push_warning from within push_warning. It will cause a recursion
> until the stack is consumed.
>
> If my_net_init fails (for example: because of OOM) the temporary vio object
> might have been attached to the thd object already. This will cause a double
> free on the vio object when the thd object is deleted later on and the server
> will crash.
>
> sql/sp_head.cc@stripped, 2007-11-19 17:59:43+01:00, thek@adventure.(none) +30 -8
> Added check for out-of-memory on a 'new' operation.
> Refactored reset_lex method to return a error state code instead of void.
> Initialize the mem-root with init_sql_alloc to get a basic error handler for
> memory allocation problems. This alone won't prevent the server from crashing,
> NULL pointers have to be accounted for as well.
>
> sql/sp_head.h@stripped, 2007-11-19 17:59:43+01:00, thek@adventure.(none) +3 -3
> Use the throw() clause in operator new, to indicate to the compiler that
> memory allocation can fail and return NULL, so that the compiler should
> generate code to check for NULL before invoking C++ constructors, to be
> crash safe.
>
> sql/sql_base.cc@stripped, 2007-11-19 17:59:43+01:00, thek@adventure.(none) +1 -2
> Use init_sql_alloc to get basic out-of-memory error handling.
>
> sql/sql_lex.h@stripped, 2007-11-19 17:59:43+01:00, thek@adventure.(none) +3 -2
> Use the throw() clause in operator new, to indicate to the compiler that
> memory allocation can fail and return NULL, so that the compiler should
> generate code to check for NULL before invoking C++ constructors, to be
> crash safe.
>
> sql/sql_prepare.cc@stripped, 2007-11-19 17:59:43+01:00, thek@adventure.(none) +1 -1
> Use init_sql_alloc to get basic out-of-memory error handling.
>
> sql/sql_yacc.yy@stripped, 2007-11-19 17:59:43+01:00, thek@adventure.(none) +118 -31
> Check for memory allocation failures where it matters.
>
>
Ok to push
Regards,
Marc.