Merge mysql-5.1 to mysql-5.5.
This commit is contained in:
commit
c6177ded7e
@ -2290,7 +2290,6 @@ loop:
|
|||||||
buf_pool, space, offset, fold);
|
buf_pool, space, offset, fold);
|
||||||
}
|
}
|
||||||
|
|
||||||
loop2:
|
|
||||||
if (block && buf_pool_watch_is_sentinel(buf_pool, &block->page)) {
|
if (block && buf_pool_watch_is_sentinel(buf_pool, &block->page)) {
|
||||||
block = NULL;
|
block = NULL;
|
||||||
}
|
}
|
||||||
@ -2407,6 +2406,11 @@ wait_until_unfixed:
|
|||||||
goto loop;
|
goto loop;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Buffer-fix the block so that it cannot be evicted
|
||||||
|
or relocated while we are attempting to allocate an
|
||||||
|
uncompressed page. */
|
||||||
|
bpage->buf_fix_count++;
|
||||||
|
|
||||||
/* Allocate an uncompressed page. */
|
/* Allocate an uncompressed page. */
|
||||||
buf_pool_mutex_exit(buf_pool);
|
buf_pool_mutex_exit(buf_pool);
|
||||||
mutex_exit(&buf_pool->zip_mutex);
|
mutex_exit(&buf_pool->zip_mutex);
|
||||||
@ -2416,34 +2420,20 @@ wait_until_unfixed:
|
|||||||
|
|
||||||
buf_pool_mutex_enter(buf_pool);
|
buf_pool_mutex_enter(buf_pool);
|
||||||
mutex_enter(&block->mutex);
|
mutex_enter(&block->mutex);
|
||||||
|
mutex_enter(&buf_pool->zip_mutex);
|
||||||
|
/* Buffer-fixing prevents the page_hash from changing. */
|
||||||
|
ut_ad(bpage == buf_page_hash_get_low(buf_pool,
|
||||||
|
space, offset, fold));
|
||||||
|
|
||||||
{
|
if (--bpage->buf_fix_count
|
||||||
buf_page_t* hash_bpage;
|
|| buf_page_get_io_fix(bpage) != BUF_IO_NONE) {
|
||||||
|
|
||||||
hash_bpage = buf_page_hash_get_low(
|
mutex_exit(&buf_pool->zip_mutex);
|
||||||
buf_pool, space, offset, fold);
|
/* The block was buffer-fixed or I/O-fixed while
|
||||||
|
buf_pool->mutex was not held by this thread.
|
||||||
if (UNIV_UNLIKELY(bpage != hash_bpage)) {
|
Free the block that was allocated and retry.
|
||||||
/* The buf_pool->page_hash was modified
|
This should be extremely unlikely, for example,
|
||||||
while buf_pool->mutex was released.
|
if buf_page_get_zip() was invoked. */
|
||||||
Free the block that was allocated. */
|
|
||||||
|
|
||||||
buf_LRU_block_free_non_file_page(block);
|
|
||||||
mutex_exit(&block->mutex);
|
|
||||||
|
|
||||||
block = (buf_block_t*) hash_bpage;
|
|
||||||
goto loop2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (UNIV_UNLIKELY
|
|
||||||
(bpage->buf_fix_count
|
|
||||||
|| buf_page_get_io_fix(bpage) != BUF_IO_NONE)) {
|
|
||||||
|
|
||||||
/* The block was buffer-fixed or I/O-fixed
|
|
||||||
while buf_pool->mutex was not held by this thread.
|
|
||||||
Free the block that was allocated and try again.
|
|
||||||
This should be extremely unlikely. */
|
|
||||||
|
|
||||||
buf_LRU_block_free_non_file_page(block);
|
buf_LRU_block_free_non_file_page(block);
|
||||||
mutex_exit(&block->mutex);
|
mutex_exit(&block->mutex);
|
||||||
@ -2454,8 +2444,6 @@ wait_until_unfixed:
|
|||||||
/* Move the compressed page from bpage to block,
|
/* Move the compressed page from bpage to block,
|
||||||
and uncompress it. */
|
and uncompress it. */
|
||||||
|
|
||||||
mutex_enter(&buf_pool->zip_mutex);
|
|
||||||
|
|
||||||
buf_relocate(bpage, &block->page);
|
buf_relocate(bpage, &block->page);
|
||||||
buf_block_init_low(block);
|
buf_block_init_low(block);
|
||||||
block->lock_hash_val = lock_rec_hash(space, offset);
|
block->lock_hash_val = lock_rec_hash(space, offset);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user