~mdcallag/+junk/5.1-map

« back to all changes in this revision

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

  • Committer: msvensson at pilot
  • Date: 2007-04-24 09:11:45 UTC
  • mfrom: (2469.1.106)
  • Revision ID: sp1r-msvensson@pilot.blaudden-20070424091145-10463
Merge pilot.blaudden:/home/msvensson/mysql/my51-m-mysql_upgrade
into  pilot.blaudden:/home/msvensson/mysql/mysql-5.1-maint

Show diffs side-by-side

added added

removed removed

Lines of Context:
549
549
        ulint   new_len;
550
550
 
551
551
        ut_a(buf_pool->LRU_old);
552
 
#ifdef UNIV_SYNC_DEBUG
553
552
        ut_ad(mutex_own(&(buf_pool->mutex)));
554
 
#endif /* UNIV_SYNC_DEBUG */
555
553
        ut_ad(3 * (BUF_LRU_OLD_MIN_LEN / 8) > BUF_LRU_OLD_TOLERANCE + 5);
556
554
 
557
555
        for (;;) {
593
591
{
594
592
        buf_block_t*    block;
595
593
 
 
594
        ut_ad(mutex_own(&(buf_pool->mutex)));
596
595
        ut_a(UT_LIST_GET_LEN(buf_pool->LRU) == BUF_LRU_OLD_MIN_LEN);
597
596
 
598
597
        /* We first initialize all blocks in the LRU list as old and then use
624
623
{
625
624
        ut_ad(buf_pool);
626
625
        ut_ad(block);
627
 
#ifdef UNIV_SYNC_DEBUG
628
626
        ut_ad(mutex_own(&(buf_pool->mutex)));
629
 
#endif /* UNIV_SYNC_DEBUG */
630
627
 
631
628
        ut_a(block->state == BUF_BLOCK_FILE_PAGE);
632
629
        ut_a(block->in_LRU_list);
690
687
 
691
688
        ut_ad(buf_pool);
692
689
        ut_ad(block);
693
 
#ifdef UNIV_SYNC_DEBUG
694
690
        ut_ad(mutex_own(&(buf_pool->mutex)));
695
 
#endif /* UNIV_SYNC_DEBUG */
696
691
 
697
692
        ut_a(block->state == BUF_BLOCK_FILE_PAGE);
698
693
 
755
750
 
756
751
        ut_ad(buf_pool);
757
752
        ut_ad(block);
758
 
#ifdef UNIV_SYNC_DEBUG
759
753
        ut_ad(mutex_own(&(buf_pool->mutex)));
760
 
#endif /* UNIV_SYNC_DEBUG */
761
754
 
762
755
        ut_a(block->state == BUF_BLOCK_FILE_PAGE);
763
756
        ut_a(!block->in_LRU_list);
858
851
/*=============================*/
859
852
        buf_block_t*    block)  /* in: block, must not contain a file page */
860
853
{
861
 
#ifdef UNIV_SYNC_DEBUG
 
854
 
862
855
        ut_ad(mutex_own(&(buf_pool->mutex)));
863
856
        ut_ad(mutex_own(&block->mutex));
864
 
#endif /* UNIV_SYNC_DEBUG */
865
857
        ut_ad(block);
866
858
 
867
859
        ut_a((block->state == BUF_BLOCK_MEMORY)
898
890
                                be in a state where it can be freed; there
899
891
                                may or may not be a hash index to the page */
900
892
{
901
 
#ifdef UNIV_SYNC_DEBUG
902
893
        ut_ad(mutex_own(&(buf_pool->mutex)));
903
894
        ut_ad(mutex_own(&block->mutex));
904
 
#endif /* UNIV_SYNC_DEBUG */
905
895
        ut_ad(block);
906
896
 
907
897
        ut_a(block->state == BUF_BLOCK_FILE_PAGE);
961
951
        buf_block_t*    block)  /* in: block, must contain a file page and
962
952
                                be in a state where it can be freed */
963
953
{
964
 
#ifdef UNIV_SYNC_DEBUG
965
954
        ut_ad(mutex_own(&(buf_pool->mutex)));
966
955
        ut_ad(mutex_own(&block->mutex));
967
 
#endif /* UNIV_SYNC_DEBUG */
 
956
 
968
957
        ut_a(block->state == BUF_BLOCK_REMOVE_HASH);
969
958
 
970
959
        block->state = BUF_BLOCK_MEMORY;