Commit ea78785b authored by Sergei Golubchik's avatar Sergei Golubchik

MDEV-4723 "State" column of SHOW PROCESSLIST returns wrong values (non-ascii chars) for some states

allocate thd_proc_info string in thd memroot, not on the stack, so that it
won't be overwritten while another thread might be printing it
parent 15856528
...@@ -1118,14 +1118,10 @@ int ha_myisam::repair(THD *thd, HA_CHECK &param, bool do_optimize) ...@@ -1118,14 +1118,10 @@ int ha_myisam::repair(THD *thd, HA_CHECK &param, bool do_optimize)
statistics_done=1; statistics_done=1;
if (THDVAR(thd, repair_threads)>1) if (THDVAR(thd, repair_threads)>1)
{ {
char buf[40];
/* TODO: respect myisam_repair_threads variable */ /* TODO: respect myisam_repair_threads variable */
my_snprintf(buf, 40, "Repair with %d threads", my_count_bits(key_map)); thd_proc_info(thd, "Parallel repair");
thd_proc_info(thd, buf);
error = mi_repair_parallel(&param, file, fixed_name, error = mi_repair_parallel(&param, file, fixed_name,
test(param.testflag & T_QUICK)); test(param.testflag & T_QUICK));
thd_proc_info(thd, "Repair done"); // to reset proc_info, as
// it was pointing to local buffer
} }
else else
{ {
......
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