Commit 1e951155 authored by Sergei Golubchik's avatar Sergei Golubchik

bugfix: use THD::main_mem_root for kill error message

cannot use the current THD::mem_root, because it can be temporarily
reassigned to something with a very different life time
(e.g. to TABLE::mem_root or range optimizer mem_root).
parent b01c8a6c
......@@ -3729,7 +3729,8 @@ class THD :public Statement,
The worst things that can happen is that we get
a suboptimal error message.
*/
if ((killed_err= (err_info*) alloc(sizeof(*killed_err))))
killed_err= (err_info*) alloc_root(&main_mem_root, sizeof(*killed_err));
if (killed_err)
{
killed_err->no= killed_errno_arg;
::strmake((char*) killed_err->msg, killed_err_msg_arg,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment