4266 Vasil Dimov 2012-08-21
Register the mutex which protects "recalc_pool" in dict0stats_bg.cc
with all_innodb_mutexes[].
Spotted by: Sunny
modified:
storage/innobase/dict/dict0stats_bg.cc
storage/innobase/handler/ha_innodb.cc
storage/innobase/include/dict0stats_bg.h
4265 Jimmy Yang 2012-08-21 [merge]
Merge from mysql-5.6 to mysql-trunk
modified:
mysql-test/suite/innodb/r/innodb-index-online-fk.result
mysql-test/suite/innodb/r/innodb-index.result
mysql-test/suite/innodb/t/innodb-index-online-fk.test
mysql-test/suite/innodb/t/innodb-index.test
storage/innobase/dict/dict0dict.cc
storage/innobase/handler/handler0alter.cc
=== modified file 'storage/innobase/dict/dict0stats_bg.cc'
--- a/storage/innobase/dict/dict0stats_bg.cc revid:jimmy.yang@stripped
+++ b/storage/innobase/dict/dict0stats_bg.cc revid:vasil.dimov@stripped
@@ -52,7 +52,7 @@ UNIV_INTERN os_event_t dict_stats_event
/** This mutex protects the "recalc_pool" variable. */
static ib_mutex_t recalc_pool_mutex;
#ifdef HAVE_PSI_INTERFACE
-static mysql_pfs_key_t recalc_pool_mutex_key;
+UNIV_INTERN mysql_pfs_key_t dict_stats_recalc_pool_mutex_key;
#endif /* HAVE_PSI_INTERFACE */
/** The number of tables that can be added to "recalc_pool" before
@@ -238,7 +238,7 @@ dict_stats_thread_init()
and dict_operation_lock (SYNC_DICT_OPERATION) have been locked
(thus a level <SYNC_DICT && <SYNC_DICT_OPERATION would do)
So we choose SYNC_STATS_AUTO_RECALC to be about below SYNC_DICT. */
- mutex_create(recalc_pool_mutex_key, &recalc_pool_mutex,
+ mutex_create(dict_stats_recalc_pool_mutex_key, &recalc_pool_mutex,
SYNC_STATS_AUTO_RECALC);
dict_stats_recalc_pool_init();
=== modified file 'storage/innobase/handler/ha_innodb.cc'
--- a/storage/innobase/handler/ha_innodb.cc revid:jimmy.yang@stripped
+++ b/storage/innobase/handler/ha_innodb.cc revid:vasil.dimov@stripped
@@ -298,6 +298,7 @@ static PSI_mutex_info all_innodb_mutexes
{&cache_last_read_mutex_key, "cache_last_read_mutex", 0},
{&dict_foreign_err_mutex_key, "dict_foreign_err_mutex", 0},
{&dict_sys_mutex_key, "dict_sys_mutex", 0},
+ {&dict_stats_recalc_pool_mutex_key, "dict_stats_recalc_pool_mutex_key", 0},
{&file_format_max_mutex_key, "file_format_max_mutex", 0},
{&fil_system_mutex_key, "fil_system_mutex", 0},
{&flush_list_mutex_key, "flush_list_mutex", 0},
=== modified file 'storage/innobase/include/dict0stats_bg.h'
--- a/storage/innobase/include/dict0stats_bg.h revid:jimmy.yang@stripped
+++ b/storage/innobase/include/dict0stats_bg.h revid:vasil.dimov@stripped
@@ -35,6 +35,10 @@ Created Apr 26, 2012 Vasil Dimov
/** Event to wake up the stats thread */
extern os_event_t dict_stats_event;
+#ifdef HAVE_PSI_INTERFACE
+extern mysql_pfs_key_t dict_stats_recalc_pool_mutex_key;
+#endif /* HAVE_PSI_INTERFACE */
+
/*****************************************************************//**
Add a table to the recalc pool, which is processed by the
background stats gathering thread. Only the table id is added to the
No bundle (reason: useless for push emails).
| Thread |
|---|
| • bzr push into mysql-trunk branch (vasil.dimov:4265 to 4266) | vasil.dimov | 21 Aug |