summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2013-11-11 22:53:40 +0100
committerSergei Golubchik <sergii@pisem.net>2013-11-11 22:53:40 +0100
commitea78785b8b6a27ed0d8e71e64d058e331f08ed36 (patch)
tree8313cc5852a47a63fe10eb46a898a7eeb9675b54
parent1585652862e9fda0b220dc497988e30e7b8c8607 (diff)
downloadmariadb-git-ea78785b8b6a27ed0d8e71e64d058e331f08ed36.tar.gz
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
-rw-r--r--storage/myisam/ha_myisam.cc6
1 files changed, 1 insertions, 5 deletions
diff --git a/storage/myisam/ha_myisam.cc b/storage/myisam/ha_myisam.cc
index 6d4771d7092..893f3d92caf 100644
--- a/storage/myisam/ha_myisam.cc
+++ b/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
{