Browse Source

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
pull/73/head
Sergei Golubchik 12 years ago
parent
commit
ea78785b8b
  1. 6
      storage/myisam/ha_myisam.cc

6
storage/myisam/ha_myisam.cc

@ -1118,14 +1118,10 @@ int ha_myisam::repair(THD *thd, HA_CHECK &param, bool do_optimize)
statistics_done=1;
if (THDVAR(thd, repair_threads)>1)
{
char buf[40];
/* TODO: respect myisam_repair_threads variable */
my_snprintf(buf, 40, "Repair with %d threads", my_count_bits(key_map));
thd_proc_info(thd, buf);
thd_proc_info(thd, "Parallel repair");
error = mi_repair_parallel(&param, file, fixed_name,
test(param.testflag & T_QUICK));
thd_proc_info(thd, "Repair done"); // to reset proc_info, as
// it was pointing to local buffer
}
else
{

Loading…
Cancel
Save