diff -ruN a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc
--- a/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:34:35.285040381 +0900
+++ b/storage/innobase/handler/ha_innodb.cc 2010-12-03 17:35:12.974975252 +0900
-@@ -9498,8 +9498,8 @@
+@@ -9575,8 +9575,8 @@
rw_lock_wait_time += mutex->lspent_time;
}
#else /* UNIV_DEBUG */
buf2len= (uint) my_snprintf(buf2, sizeof(buf2), "os_waits=%lu",
(ulong) mutex->count_os_wait);
-@@ -9514,9 +9514,8 @@
+@@ -9591,9 +9591,8 @@
if (block_mutex) {
buf1len = (uint) my_snprintf(buf1, sizeof buf1,
buf2len = (uint) my_snprintf(buf2, sizeof buf2,
"os_waits=%lu",
(ulong) block_mutex_oswait_count);
-@@ -9545,8 +9544,8 @@
+@@ -9622,8 +9621,8 @@
continue;
}
buf2len = my_snprintf(buf2, sizeof buf2, "os_waits=%lu",
(ulong) lock->count_os_wait);
-@@ -9560,9 +9559,8 @@
+@@ -9637,9 +9636,8 @@
if (block_lock) {
buf1len = (uint) my_snprintf(buf1, sizeof buf1,
/******************************************************************//**
Calling this function is obligatory only if the memory buffer containing
the rw-lock is freed. Removes an rw-lock object from the global list. The
-@@ -610,7 +610,8 @@
+@@ -611,7 +611,8 @@
struct PSI_rwlock *pfs_psi;/*!< The instrumentation hook */
#endif
ulint count_os_wait; /*!< Count of os_waits. May not be accurate */
/* last s-lock file/line is not guaranteed to be correct */
const char* last_s_file_name;/*!< File name where last s-locked */
const char* last_x_file_name;/*!< File name where last x-locked */
-@@ -621,7 +622,7 @@
+@@ -622,7 +623,7 @@
are at the start of this struct, thus we can
peek this field without causing much memory
bus traffic */
unsigned last_s_line:14; /*!< Line number where last time s-locked */
unsigned last_x_line:14; /*!< Line number where last time x-locked */
#ifdef UNIV_DEBUG
-@@ -691,10 +692,10 @@
+@@ -692,10 +693,10 @@
# ifdef UNIV_SYNC_DEBUG
ulint level, /*!< in: level */
# endif /* UNIV_SYNC_DEBUG */
# endif
#endif /* INNODB_RW_LOCKS_USE_ATOMICS */
-@@ -280,8 +281,7 @@
+@@ -283,8 +284,7 @@
ut_d(lock->magic_n = RW_LOCK_MAGIC_N);
lock->count_os_wait = 0;
lock->last_s_file_name = "not yet reserved";
-@@ -401,10 +401,10 @@
+@@ -404,10 +404,10 @@
if (srv_print_latch_waits) {
fprintf(stderr,
"Thread %lu spin wait rw-s-lock at %p"
}
/* We try once again to obtain the lock */
-@@ -437,10 +437,9 @@
+@@ -440,10 +440,9 @@
if (srv_print_latch_waits) {
fprintf(stderr,
"Thread %lu OS wait rw-s-lock at %p"
}
/* these stats may not be accurate */
-@@ -659,9 +658,9 @@
+@@ -662,9 +661,9 @@
if (srv_print_latch_waits) {
fprintf(stderr,
"Thread %lu spin wait rw-x-lock at %p"
}
sync_array_reserve_cell(sync_primary_wait_array,
-@@ -682,9 +681,9 @@
+@@ -685,9 +684,9 @@
if (srv_print_latch_waits) {
fprintf(stderr,
"Thread %lu OS wait for rw-x-lock at %p"
diff -ruN a/storage/innobase/sync/sync0sync.c b/storage/innobase/sync/sync0sync.c
--- a/storage/innobase/sync/sync0sync.c 2010-12-03 15:49:59.233955565 +0900
+++ b/storage/innobase/sync/sync0sync.c 2010-12-03 17:35:12.989024400 +0900
-@@ -250,13 +250,13 @@
+@@ -269,13 +269,13 @@
/*==============*/
mutex_t* mutex, /*!< in: pointer to memory */
#ifdef UNIV_DEBUG
{
#if defined(HAVE_ATOMIC_BUILTINS)
mutex_reset_lock_word(mutex);
-@@ -274,11 +274,13 @@
+@@ -293,11 +293,13 @@
mutex->file_name = "not yet reserved";
mutex->level = level;
#endif /* UNIV_SYNC_DEBUG */
mutex->count_using= 0;
mutex->mutex_type= 0;
mutex->lspent_time= 0;
-@@ -532,9 +534,9 @@
+@@ -551,9 +553,9 @@
#ifdef UNIV_SRV_PRINT_LATCH_WAITS
fprintf(stderr,
"Thread %lu spin wait mutex at %p"
#endif
mutex_spin_round_count += i;
-@@ -609,9 +611,9 @@
+@@ -628,9 +630,9 @@
#ifdef UNIV_SRV_PRINT_LATCH_WAITS
fprintf(stderr,
#endif
mutex_os_wait_count++;
-@@ -913,9 +915,8 @@
+@@ -878,8 +880,8 @@
- if (mutex->magic_n == MUTEX_MAGIC_N) {
- fprintf(stderr,
-- "Mutex created at %s %lu\n",
-- mutex->cfile_name,
-- (ulong) mutex->cline);
-+ "Mutex '%s'\n",
-+ mutex->cmutex_name);
+ if (mutex->magic_n == MUTEX_MAGIC_N) {
+ fprintf(stderr,
+- "Mutex created at %s %lu\n",
+- mutex->cfile_name, (ulong) mutex->cline);
++ "Mutex '%s'\n",
++ mutex->cmutex_name);
- if (mutex_get_lock_word(mutex) != 0) {
- const char* file_name;
+ if (mutex_get_lock_word(mutex) != 0) {
+ ulint line;