mirror of
https://github.com/MariaDB/server.git
synced 2025-07-27 18:02:13 +03:00
Fixes for tests after merge from 5.0
This commit is contained in:
@ -147,15 +147,9 @@ MYSQL_ERROR *push_warning(THD *thd, MYSQL_ERROR::enum_warning_level level,
|
||||
|
||||
if (thd->warn_list.elements < thd->variables.max_error_count)
|
||||
{
|
||||
/*
|
||||
The following code is here to change the allocation to not
|
||||
use the thd->mem_root, which is freed after each query
|
||||
*/
|
||||
MEM_ROOT *old_root= thd->mem_root;
|
||||
thd->mem_root= &thd->warn_root;
|
||||
if ((err= new MYSQL_ERROR(thd, code, level, msg)))
|
||||
/* We have to use warn_root, as mem_root is freed after each query */
|
||||
if ((err= new (&thd->warn_root) MYSQL_ERROR(thd, code, level, msg)))
|
||||
thd->warn_list.push_back(err);
|
||||
thd->mem_root= old_root;
|
||||
}
|
||||
thd->warn_count[(uint) level]++;
|
||||
thd->total_warn_count++;
|
||||
|
Reference in New Issue
Block a user