Bug #60180 Unused mutex THR_LOCK_isam
Submitted: 19 Feb 2011 19:31 Modified: 21 Mar 2011 19:11
Reporter: Linhai Song Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S5 (Performance)
Version:mysql-5.1, mysql-6.0.11-alpha, mysql-trunk OS:Any
Assigned to: CPU Architecture:Any

[19 Feb 2011 19:31] Linhai Song
Description:
pthread_mutex_t THR_LOCK_isam

is initialized and destroyed, but never locked / unlocked in the server code.

How to repeat:
Code review

Suggested fix:
Remove
[20 Feb 2011 9:54] Valeriy Kravchuk
Indeed, this is what we have in current mysql-trunk tree:

macbook-pro:mysql-trunk-work openxs$ grep -rn THR_LOCK_isam *
mysql-test/suite/perfschema/r/server_init.result:15:where name like "wait/synch/mutex/mysys/THR_LOCK_isam";
mysql-test/suite/perfschema/t/server_init.test:41: where name like "wait/synch/mutex/mysys/THR_LOCK_isam";
mysys/my_init.c:511:  key_THR_LOCK_isam, key_THR_LOCK_lock, key_THR_LOCK_malloc,
mysys/my_init.c:535:  { &key_THR_LOCK_isam, "THR_LOCK_isam", PSI_FLAG_GLOBAL},
mysys/my_thr_init.c:27:              THR_LOCK_lock, THR_LOCK_isam, THR_LOCK_myisam, THR_LOCK_heap,
mysys/my_thr_init.c:217:  mysql_mutex_init(key_THR_LOCK_isam, &THR_LOCK_isam, MY_MUTEX_INIT_SLOW);
mysys/my_thr_init.c:285:  mysql_mutex_destroy(&THR_LOCK_isam);
mysys/mysys_priv.h:46:  key_THR_LOCK_isam, key_THR_LOCK_lock, key_THR_LOCK_malloc,
mysys/mysys_priv.h:62:extern mysql_mutex_t THR_LOCK_lock, THR_LOCK_isam, THR_LOCK_net;
[21 Mar 2011 19:11] Paul DuBois
Code cleanup. No changelog entry needed.

CHANGESET - http://lists.mysql.com/commits/133194