Bug#11765252 - READ OF FREED MEMORY WHEN "USE DB" AND

"SHOW PROCESSLIST"

Follow up path, addressing pb2 test failure.
This commit is contained in:
Praveenkumar Hulakund 2013-08-23 18:56:31 +05:30
parent 561f68eccd
commit 45daf55a55

View file

@ -1844,8 +1844,6 @@ void mysqld_list_processes(THD *thd,const char *user, bool verbose)
tmp_sctx->host_or_ip : tmp_sctx->host_or_ip :
tmp_sctx->get_host()->length() ? tmp_sctx->get_host()->length() ?
tmp_sctx->get_host()->ptr() : ""); tmp_sctx->get_host()->ptr() : "");
if ((thd_info->db=tmp->db)) // Safe test
thd_info->db=thd->strdup(thd_info->db);
thd_info->command=(int) tmp->command; thd_info->command=(int) tmp->command;
mysql_mutex_lock(&tmp->LOCK_thd_data); mysql_mutex_lock(&tmp->LOCK_thd_data);
if ((thd_info->db= tmp->db)) // Safe test if ((thd_info->db= tmp->db)) // Safe test