List:Commits« Previous MessageNext Message »
From:Vasil Dimov Date:April 28 2010 10:22am
Subject:Re: bzr commit into mysql-5.1-innodb branch (vasil.dimov:3427)
Bug#53046
View as plain text  
On Wed, Apr 28, 2010 at 12:09:28 +0300, Marko Mäkelä wrote:
> On Wed, Apr 28, 2010 at 08:50:26AM -0000, vasil.dimov@stripped wrote:
> >+/* array of mutexes protecting dict_index_t::stat_n_diff_key_vals[] */
> >+#define DICT_INDEX_STAT_MUTEX_SIZE	32
> >+mutex_t	dict_index_stat_mutex[DICT_INDEX_STAT_MUTEX_SIZE];
> 
> Add Doxygen-style comments, please.

Done.

> >+#define FOLD_INDEX_FOR_STAT_MUTEX(index) \
> >+	(ut_fold_dulint(index->id) % DICT_INDEX_STAT_MUTEX_SIZE)
> 
> Add Doxygen-style comments and make this macro return the mutex
> (an element of dict_index_stat_mutex[]).

Done.

> >+UNIV_INTERN
> >+void
> >+dict_index_stat_mutex_enter(
> >+/*========================*/
> >+	const dict_index_t*	index)	/*!< in: index */
> >+{
> Some assertions would be nice here and in dict_index_stat_mutex_exit(), 
> e.g.,
> 
> ut_ad(index);
> ut_ad(index->magic_n == DICT_INDEX_MAGIC_N);
> ut_ad(index->cached);
> ut_ad(!index->to_be_dropped);

Done.

> >@@ -605,6 +636,8 @@ void
> > dict_init(void)
> > /*===========*/
> > {
> >+	int	i;
> >+
> > 	dict_sys = mem_alloc(sizeof(dict_sys_t));
> >
> > 	mutex_create(&dict_sys->mutex, SYNC_DICT);
> >@@ -625,6 +658,11 @@ dict_init(void)
> > 	ut_a(dict_foreign_err_file);
> >
> > 	mutex_create(&dict_foreign_err_mutex, SYNC_ANY_LATCH);
> >+
> >+	for (i = 0; i < DICT_INDEX_STAT_MUTEX_SIZE; i++) {
> >+		mutex_create(&dict_index_stat_mutex[i],
> >+			     /* XXX */ SYNC_INDEX_TREE);
> >+	}
> > }
> >
> 
> Please remove the /* XXX */ from the final commit, and add corresponding 
> mutex_free() calls to dict_close().

Done.

Thanks!

-- 
Vasil Dimov
moc.elcaro@stripped        Software Developer @ Oracle/Innobase Oy
gro.DSBeerF@dv                Committer @ FreeBSD.org
gro.d5v@dv                    Home @ Sofia, Bulgaria

Attachment: [application/pgp-signature]
Thread
bzr commit into mysql-5.1-innodb branch (vasil.dimov:3427) Bug#53046vasil.dimov28 Apr
  • Re: bzr commit into mysql-5.1-innodb branch (vasil.dimov:3427)Bug#53046Marko Mäkelä28 Apr
    • Re: bzr commit into mysql-5.1-innodb branch (vasil.dimov:3427)Bug#53046Vasil Dimov28 Apr
  • Re: bzr commit into mysql-5.1-innodb branch (vasil.dimov:3427)Bug#53046Marko Mäkelä28 Apr