From: Jon Olav Hauglid Date: March 17 2011 11:24am Subject: bzr push into mysql-trunk branch (jon.hauglid:3778 to 3779) Bug#11829666 List-Archive: http://lists.mysql.com/commits/133195 X-Bug: 11829666 Message-Id: <201103171124.p2HBOHWn006412@acsmt358.oracle.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit 3779 Jon Olav Hauglid 2011-03-17 Bug #11829666 (former 60180) Unused mutex THR_LOCK_isam The problem was that the THR_LOCK_isam mutex was declared, initialized and destroyed, but not used anywhere. This patch removes the THR_LOCK_isam mutex completely. No functional changes. No test case added. modified: mysql-test/suite/perfschema/r/server_init.result mysql-test/suite/perfschema/t/server_init.test mysys/my_init.c mysys/my_thr_init.c mysys/mysys_priv.h 3778 Nirbhay Choubey 2011-03-17 [merge] Merge from mysql-5.5 -> mysql-trunk. modified: mysql-test/r/mysqldump.result mysql-test/t/mysqldump.test === modified file 'mysql-test/suite/perfschema/r/server_init.result' --- a/mysql-test/suite/perfschema/r/server_init.result 2011-01-13 11:31:20 +0000 +++ b/mysql-test/suite/perfschema/r/server_init.result 2011-03-17 11:23:31 +0000 @@ -12,10 +12,6 @@ where name like "wait/synch/mutex/mysys/ count(name) 1 select count(name) from mutex_instances -where name like "wait/synch/mutex/mysys/THR_LOCK_isam"; -count(name) -1 -select count(name) from mutex_instances where name like "wait/synch/mutex/mysys/THR_LOCK_myisam"; count(name) 1 === modified file 'mysql-test/suite/perfschema/t/server_init.test' --- a/mysql-test/suite/perfschema/t/server_init.test 2011-01-13 11:31:20 +0000 +++ b/mysql-test/suite/perfschema/t/server_init.test 2011-03-17 11:23:31 +0000 @@ -38,9 +38,6 @@ select count(name) from mutex_instances where name like "wait/synch/mutex/mysys/THR_LOCK_open"; select count(name) from mutex_instances - where name like "wait/synch/mutex/mysys/THR_LOCK_isam"; - -select count(name) from mutex_instances where name like "wait/synch/mutex/mysys/THR_LOCK_myisam"; select count(name) from mutex_instances === modified file 'mysys/my_init.c' --- a/mysys/my_init.c 2011-03-01 13:39:58 +0000 +++ b/mysys/my_init.c 2011-03-17 11:23:31 +0000 @@ -474,7 +474,7 @@ PSI_mutex_key key_LOCK_gethostbyname_r; PSI_mutex_key key_BITMAP_mutex, key_IO_CACHE_append_buffer_lock, key_IO_CACHE_SHARE_mutex, key_KEY_CACHE_cache_lock, key_LOCK_alarm, key_my_thread_var_mutex, key_THR_LOCK_charset, key_THR_LOCK_heap, - key_THR_LOCK_isam, key_THR_LOCK_lock, key_THR_LOCK_malloc, + key_THR_LOCK_lock, key_THR_LOCK_malloc, key_THR_LOCK_mutex, key_THR_LOCK_myisam, key_THR_LOCK_net, key_THR_LOCK_open, key_THR_LOCK_threads, key_TMPDIR_mutex, key_THR_LOCK_myisam_mmap; @@ -498,7 +498,6 @@ static PSI_mutex_info all_mysys_mutexes[ { &key_my_thread_var_mutex, "my_thread_var::mutex", 0}, { &key_THR_LOCK_charset, "THR_LOCK_charset", PSI_FLAG_GLOBAL}, { &key_THR_LOCK_heap, "THR_LOCK_heap", PSI_FLAG_GLOBAL}, - { &key_THR_LOCK_isam, "THR_LOCK_isam", PSI_FLAG_GLOBAL}, { &key_THR_LOCK_lock, "THR_LOCK_lock", PSI_FLAG_GLOBAL}, { &key_THR_LOCK_malloc, "THR_LOCK_malloc", PSI_FLAG_GLOBAL}, { &key_THR_LOCK_mutex, "THR_LOCK::mutex", 0}, === modified file 'mysys/my_thr_init.c' --- a/mysys/my_thr_init.c 2011-03-01 13:39:58 +0000 +++ b/mysys/my_thr_init.c 2011-03-17 11:23:31 +0000 @@ -24,7 +24,7 @@ pthread_key(struct st_my_thread_var*, THR_KEY_mysys); mysql_mutex_t THR_LOCK_malloc, THR_LOCK_open, - THR_LOCK_lock, THR_LOCK_isam, THR_LOCK_myisam, THR_LOCK_heap, + THR_LOCK_lock, THR_LOCK_myisam, THR_LOCK_heap, THR_LOCK_net, THR_LOCK_charset, THR_LOCK_threads, THR_LOCK_myisam_mmap; @@ -88,9 +88,6 @@ void my_thread_global_reinit(void) my_init_mysys_psi_keys(); #endif - mysql_mutex_destroy(&THR_LOCK_isam); - mysql_mutex_init(key_THR_LOCK_isam, &THR_LOCK_isam, MY_MUTEX_INIT_SLOW); - mysql_mutex_destroy(&THR_LOCK_heap); mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST); @@ -212,7 +209,6 @@ my_bool my_thread_global_init(void) #endif /* TARGET_OS_LINUX */ mysql_mutex_init(key_THR_LOCK_lock, &THR_LOCK_lock, MY_MUTEX_INIT_FAST); - mysql_mutex_init(key_THR_LOCK_isam, &THR_LOCK_isam, MY_MUTEX_INIT_SLOW); mysql_mutex_init(key_THR_LOCK_myisam, &THR_LOCK_myisam, MY_MUTEX_INIT_SLOW); mysql_mutex_init(key_THR_LOCK_myisam_mmap, &THR_LOCK_myisam_mmap, MY_MUTEX_INIT_FAST); mysql_mutex_init(key_THR_LOCK_heap, &THR_LOCK_heap, MY_MUTEX_INIT_FAST); @@ -275,7 +271,6 @@ void my_thread_global_end(void) mysql_mutex_destroy(&THR_LOCK_malloc); mysql_mutex_destroy(&THR_LOCK_open); mysql_mutex_destroy(&THR_LOCK_lock); - mysql_mutex_destroy(&THR_LOCK_isam); mysql_mutex_destroy(&THR_LOCK_myisam); mysql_mutex_destroy(&THR_LOCK_myisam_mmap); mysql_mutex_destroy(&THR_LOCK_heap); === modified file 'mysys/mysys_priv.h' --- a/mysys/mysys_priv.h 2011-01-13 11:31:20 +0000 +++ b/mysys/mysys_priv.h 2011-03-17 11:23:31 +0000 @@ -1,4 +1,4 @@ -/* Copyright (C) 2000 MySQL AB, 2008-2009 Sun Microsystems, Inc +/* Copyright (c) 2000, 2011 Oracle and/or its affiliates. All rights reserved. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -43,7 +43,7 @@ extern PSI_mutex_key key_LOCK_gethostbyn extern PSI_mutex_key key_BITMAP_mutex, key_IO_CACHE_append_buffer_lock, key_IO_CACHE_SHARE_mutex, key_KEY_CACHE_cache_lock, key_LOCK_alarm, key_my_thread_var_mutex, key_THR_LOCK_charset, key_THR_LOCK_heap, - key_THR_LOCK_isam, key_THR_LOCK_lock, key_THR_LOCK_malloc, + key_THR_LOCK_lock, key_THR_LOCK_malloc, key_THR_LOCK_mutex, key_THR_LOCK_myisam, key_THR_LOCK_net, key_THR_LOCK_open, key_THR_LOCK_threads, key_TMPDIR_mutex, key_THR_LOCK_myisam_mmap; @@ -59,7 +59,7 @@ extern PSI_thread_key key_thread_alarm; #endif /* HAVE_PSI_INTERFACE */ extern mysql_mutex_t THR_LOCK_malloc, THR_LOCK_open, THR_LOCK_keycache; -extern mysql_mutex_t THR_LOCK_lock, THR_LOCK_isam, THR_LOCK_net; +extern mysql_mutex_t THR_LOCK_lock, THR_LOCK_net; extern mysql_mutex_t THR_LOCK_charset; #include No bundle (reason: useless for push emails).