~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/innobase/buf/buf0lru.c

  • Committer: Patrick Crews
  • Date: 2010-12-07 20:02:50 UTC
  • Revision ID: gleebix@gmail.com-20101207200250-6a27jgqalgw5bsb5
Added disabled.def file to disable drizzleslap due to Bug#684269.  Need to skip for tarball release this round

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*****************************************************************************
2
2
 
3
 
Copyright (C) 1995, 2010, Innobase Oy. All Rights Reserved.
 
3
Copyright (c) 1995, 2010, Innobase Oy. All Rights Reserved.
4
4
 
5
5
This program is free software; you can redistribute it and/or modify it under
6
6
the terms of the GNU General Public License as published by the Free Software
244
244
                return;
245
245
        }
246
246
 
247
 
        page_arr = static_cast<unsigned long *>(ut_malloc(
248
 
                sizeof(ulint) * BUF_LRU_DROP_SEARCH_HASH_SIZE));
 
247
        page_arr = ut_malloc(
 
248
                sizeof(ulint) * BUF_LRU_DROP_SEARCH_HASH_SIZE);
249
249
 
250
250
        buf_pool_mutex_enter(buf_pool);
251
251
 
357
357
                prev_bpage = UT_LIST_GET_PREV(LRU, bpage);
358
358
 
359
359
                /* bpage->space and bpage->io_fix are protected by
360
 
                buf_pool->mutex and block_mutex.  It is safe to check
361
 
                them while holding buf_pool->mutex only. */
 
360
                buf_pool_mutex and block_mutex.  It is safe to check
 
361
                them while holding buf_pool_mutex only. */
362
362
 
363
363
                if (buf_page_get_space(bpage) != id) {
364
364
                        /* Skip this block, as it does not belong to
404
404
                                                /* Descriptors of uncompressed
405
405
                                                blocks will not be relocated,
406
406
                                                because we are holding the
407
 
                                                buf_pool->mutex. */
 
407
                                                buf_pool_mutex. */
408
408
                                                break;
409
409
                                        case BUF_BLOCK_ZIP_PAGE:
410
410
                                        case BUF_BLOCK_ZIP_DIRTY:
952
952
                        ibool   lru;
953
953
                        page_zip_set_size(&block->page.zip, zip_size);
954
954
 
955
 
                        block->page.zip.data = static_cast<unsigned char *>(buf_buddy_alloc(
956
 
                                buf_pool, zip_size, &lru));
 
955
                        block->page.zip.data = buf_buddy_alloc(
 
956
                                buf_pool, zip_size, &lru);
957
957
 
958
958
                        UNIV_MEM_DESC(block->page.zip.data, zip_size, block);
959
959
                } else {
1444
1444
page, the descriptor object will be freed as well.
1445
1445
 
1446
1446
NOTE: If this function returns BUF_LRU_FREED, it will temporarily
1447
 
release buf_pool->mutex.  Furthermore, the page frame will no longer be
 
1447
release buf_pool_mutex.  Furthermore, the page frame will no longer be
1448
1448
accessible via bpage.
1449
1449
 
1450
 
The caller must hold buf_pool->mutex and buf_page_get_mutex(bpage) and
 
1450
The caller must hold buf_pool_mutex and buf_page_get_mutex(bpage) and
1451
1451
release these two mutexes after the call.  No other
1452
1452
buf_page_get_mutex() may be held when calling this function.
1453
1453
@return BUF_LRU_FREED if freed, BUF_LRU_CANNOT_RELOCATE or
1513
1513
                from the LRU list), refuse to free bpage. */
1514
1514
alloc:
1515
1515
                buf_pool_mutex_exit_forbid(buf_pool);
1516
 
                b = static_cast<buf_page_t *>(buf_buddy_alloc(buf_pool, sizeof *b, NULL));
 
1516
                b = buf_buddy_alloc(buf_pool, sizeof *b, NULL);
1517
1517
                buf_pool_mutex_exit_allow(buf_pool);
1518
1518
 
1519
1519
                if (UNIV_UNLIKELY(!b)) {