mirror of
https://github.com/MariaDB/server.git
synced 2025-08-08 11:22:35 +03:00
mysql-5.5.31 merge
This commit is contained in:
@@ -1166,10 +1166,16 @@ MYSQL_ERROR* THD::raise_condition(uint sql_errno,
|
||||
|
||||
query_cache_abort(&query_cache_tls);
|
||||
|
||||
/* When simulating OOM, skip writing to error log to avoid mtr errors */
|
||||
DBUG_EXECUTE_IF("simulate_out_of_memory", DBUG_RETURN(NULL););
|
||||
|
||||
cond= warning_info->push_warning(this, sql_errno, sqlstate, level, msg);
|
||||
/*
|
||||
Avoid pushing a condition for fatal out of memory errors as this will
|
||||
require memory allocation and therefore might fail. Non fatal out of
|
||||
memory errors can occur if raised by SIGNAL/RESIGNAL statement.
|
||||
*/
|
||||
if (!(is_fatal_error && (sql_errno == EE_OUTOFMEMORY ||
|
||||
sql_errno == ER_OUTOFMEMORY)))
|
||||
{
|
||||
cond= warning_info->push_warning(this, sql_errno, sqlstate, level, msg);
|
||||
}
|
||||
DBUG_RETURN(cond);
|
||||
}
|
||||
|
||||
@@ -2084,7 +2090,7 @@ CHANGED_TABLE_LIST* THD::changed_table_dup(const char *key, long key_length)
|
||||
key_length + 1);
|
||||
if (!new_table)
|
||||
{
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL),
|
||||
my_error(EE_OUTOFMEMORY, MYF(ME_BELL+ME_FATALERROR),
|
||||
ALIGN_SIZE(sizeof(TABLE_LIST)) + key_length + 1);
|
||||
killed= KILL_CONNECTION;
|
||||
return 0;
|
||||
@@ -2674,7 +2680,7 @@ int select_export::send_data(List<Item> &items)
|
||||
set_if_smaller(estimated_bytes, UINT_MAX32);
|
||||
if (cvt_str.realloc((uint32) estimated_bytes))
|
||||
{
|
||||
my_error(ER_OUTOFMEMORY, MYF(0), (uint32) estimated_bytes);
|
||||
my_error(ER_OUTOFMEMORY, MYF(ME_FATALERROR), (uint32) estimated_bytes);
|
||||
goto err;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user