summaryrefslogtreecommitdiff
path: root/btr
diff options
context:
space:
mode:
authorVadim Tkachenko <vadim@percona.com>2009-01-29 08:54:13 -0800
committerVadim Tkachenko <vadim@percona.com>2009-01-29 08:54:13 -0800
commit0a073efd1ad9f4bd9d43fe3e8a4dd643d2683d82 (patch)
treeb1d2dfdfeee5bdd90b7189dae3b5011c9cee1ebe /btr
parentec1ed62c1d06f395ed4b1cb59ea2fc8baa94fb23 (diff)
downloadmariadb-git-0a073efd1ad9f4bd9d43fe3e8a4dd643d2683d82.tar.gz
sync with rev40 extensions-1.0
Diffstat (limited to 'btr')
-rw-r--r--btr/btr0cur.c6
-rw-r--r--btr/btr0sea.c3
2 files changed, 7 insertions, 2 deletions
diff --git a/btr/btr0cur.c b/btr/btr0cur.c
index ea010bc6a3f..0981344f90c 100644
--- a/btr/btr0cur.c
+++ b/btr/btr0cur.c
@@ -3690,6 +3690,7 @@ btr_blob_free(
mtr_commit(mtr);
//buf_pool_mutex_enter();
+ mutex_enter(&LRU_list_mutex);
mutex_enter(&block->mutex);
/* Only free the block if it is still allocated to
@@ -3700,7 +3701,7 @@ btr_blob_free(
&& buf_block_get_space(block) == space
&& buf_block_get_page_no(block) == page_no) {
- if (buf_LRU_free_block(&block->page, all, NULL)
+ if (buf_LRU_free_block(&block->page, all, NULL, TRUE)
!= BUF_LRU_FREED
&& all && block->page.zip.data
/* Now, buf_LRU_free_block() may release mutex temporarily */
@@ -3710,11 +3711,12 @@ btr_blob_free(
/* Attempt to deallocate the uncompressed page
if the whole block cannot be deallocted. */
- buf_LRU_free_block(&block->page, FALSE, NULL);
+ buf_LRU_free_block(&block->page, FALSE, NULL, TRUE);
}
}
//buf_pool_mutex_exit();
+ mutex_exit(&LRU_list_mutex);
mutex_exit(&block->mutex);
}
diff --git a/btr/btr0sea.c b/btr/btr0sea.c
index a7ee394712e..d3532c097f2 100644
--- a/btr/btr0sea.c
+++ b/btr/btr0sea.c
@@ -800,7 +800,10 @@ btr_search_guess_on_hash(
rw_lock_s_lock(&btr_search_latch);
}
+#ifndef HAVE_GCC_ATOMIC_BUILTINS
+ /* It is used as lock word among x_lock */
ut_ad(btr_search_latch.writer != RW_LOCK_EX);
+#endif
ut_ad(btr_search_latch.reader_count > 0);
rec = ha_search_and_get_data(btr_search_sys->hash_index, fold);