1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-01 03:47:19 +03:00

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.
This commit is contained in:
thek@adventure.(none)
2007-11-19 17:59:44 +01:00
parent 82767a0a45
commit 1794242b24
7 changed files with 168 additions and 49 deletions

View File

@ -80,7 +80,6 @@ bool Prelock_error_handler::safely_trapped_errors()
return ((m_handled_errors > 0) && (m_unhandled_errors == 0));
}
TABLE *unused_tables; /* Used by mysql_test */
HASH open_cache; /* Used by mysql_test */
@ -2643,7 +2642,7 @@ int open_tables(THD *thd, TABLE_LIST **start, uint *counter, uint flags)
temporary mem_root for new .frm parsing.
TODO: variables for size
*/
init_alloc_root(&new_frm_mem, 8024, 8024);
init_sql_alloc(&new_frm_mem, 8024, 8024);
thd->current_tablenr= 0;
restart: