From e1cb1ca6fe25380edae06ded5e22e106761dcb46 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 12 Mar 2004 17:14:51 +0200 Subject: Allow UNIV_SYNC_DEBUG to be disabled while UNIV_DEBUG is enabled --- innobase/buf/buf0flu.c | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'innobase/buf/buf0flu.c') diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c index c0999ee4841..9ed99096451 100644 --- a/innobase/buf/buf0flu.c +++ b/innobase/buf/buf0flu.c @@ -47,7 +47,9 @@ buf_flush_insert_into_flush_list( /*=============================*/ buf_block_t* block) /* in: block which is modified */ { +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); +#endif /* UNIV_SYNC_DEBUG */ ut_ad((UT_LIST_GET_FIRST(buf_pool->flush_list) == NULL) || (ut_dulint_cmp( @@ -73,7 +75,9 @@ buf_flush_insert_sorted_into_flush_list( buf_block_t* prev_b; buf_block_t* b; +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); +#endif /* UNIV_SYNC_DEBUG */ prev_b = NULL; b = UT_LIST_GET_FIRST(buf_pool->flush_list); @@ -105,7 +109,9 @@ buf_flush_ready_for_replace( buf_block_t* block) /* in: buffer control block, must be in state BUF_BLOCK_FILE_PAGE and in the LRU list*/ { +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); +#endif /* UNIV_SYNC_DEBUG */ ut_a(block->state == BUF_BLOCK_FILE_PAGE); if ((ut_dulint_cmp(block->oldest_modification, ut_dulint_zero) > 0) @@ -129,7 +135,9 @@ buf_flush_ready_for_flush( BUF_BLOCK_FILE_PAGE */ ulint flush_type)/* in: BUF_FLUSH_LRU or BUF_FLUSH_LIST */ { +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); +#endif /* UNIV_SYNC_DEBUG */ ut_ad(block->state == BUF_BLOCK_FILE_PAGE); if ((ut_dulint_cmp(block->oldest_modification, ut_dulint_zero) > 0) @@ -161,8 +169,9 @@ buf_flush_write_complete( buf_block_t* block) /* in: pointer to the block in question */ { ut_ad(block); +#ifdef UNIV_SYNC_DEBUG ut_ad(mutex_own(&(buf_pool->mutex))); - +#endif /* UNIV_SYNC_DEBUG */ block->oldest_modification = ut_dulint_zero; UT_LIST_REMOVE(flush_list, buf_pool->flush_list, block); -- cgit v1.2.1 From 1f7f2662b99b55082be807e224309395bedf6032 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 13 Mar 2004 22:48:00 +0200 Subject: InnoDB: Replace ut_a(0) with ut_error innobase/btr/btr0btr.c: Replace ut_a(0) with ut_error innobase/buf/buf0flu.c: Replace ut_a(0) with ut_error innobase/buf/buf0lru.c: Replace ut_a(0) with ut_error innobase/data/data0data.c: Replace ut_a(0) with ut_error innobase/dict/dict0crea.c: Replace ut_a(0) with ut_error innobase/dict/dict0dict.c: Replace ut_a(0) with ut_error innobase/dict/dict0load.c: Replace ut_a(0) with ut_error innobase/fil/fil0fil.c: Replace ut_a(0) with ut_error innobase/fsp/fsp0fsp.c: Replace ut_a(0) with ut_error innobase/ibuf/ibuf0ibuf.c: Replace ut_a(0) with ut_error innobase/include/buf0buf.ic: Replace ut_a(0) with ut_error innobase/include/data0type.ic: Replace ut_a(0) with ut_error innobase/include/mtr0log.ic: Replace ut_a(0) with ut_error innobase/include/trx0rseg.ic: Replace ut_a(0) with ut_error innobase/lock/lock0lock.c: Replace ut_a(0) with ut_error innobase/log/log0log.c: Replace ut_a(0) with ut_error innobase/log/log0recv.c: Replace ut_a(0) with ut_error innobase/mem/mem0pool.c: Replace ut_a(0) with ut_error innobase/mtr/mtr0log.c: Replace ut_a(0) with ut_error innobase/os/os0file.c: Replace ut_a(0) with ut_error innobase/page/page0cur.c: Replace ut_a(0) with ut_error innobase/page/page0page.c: Replace ut_a(0) with ut_error innobase/pars/lexyy.c: Replace ut_a(0) with ut_error innobase/que/que0que.c: Replace ut_a(0) with ut_error innobase/rem/rem0cmp.c: Replace ut_a(0) with ut_error innobase/rem/rem0rec.c: Replace ut_a(0) with ut_error innobase/row/row0ins.c: Replace ut_a(0) with ut_error innobase/row/row0mysql.c: Replace ut_a(0) with ut_error innobase/row/row0purge.c: Replace ut_a(0) with ut_error innobase/row/row0row.c: Replace ut_a(0) with ut_error innobase/row/row0sel.c: Replace ut_a(0) with ut_error innobase/row/row0undo.c: Replace ut_a(0) with ut_error innobase/srv/srv0srv.c: Replace ut_a(0) with ut_error innobase/sync/sync0arr.c: Replace ut_a(0) with ut_error innobase/trx/trx0purge.c: Replace ut_a(0) with ut_error innobase/trx/trx0trx.c: Replace ut_a(0) with ut_error innobase/trx/trx0undo.c: Replace ut_a(0) with ut_error --- innobase/buf/buf0flu.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'innobase/buf/buf0flu.c') diff --git a/innobase/buf/buf0flu.c b/innobase/buf/buf0flu.c index 9ed99096451..66c9bb605dc 100644 --- a/innobase/buf/buf0flu.c +++ b/innobase/buf/buf0flu.c @@ -253,7 +253,7 @@ buf_flush_buffered_writes(void) "InnoDB: files.\n", block->offset, block->space); - ut_a(0); + ut_error; } } -- cgit v1.2.1