~ubuntu-branches/ubuntu/maverick/mysql-5.1/maverick-proposed

« back to all changes in this revision

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

  • Committer: Package Import Robot
  • Author(s): Marc Deslauriers
  • Date: 2012-02-22 14:16:05 UTC
  • mto: This revision was merged to the branch mainline in revision 20.
  • Revision ID: package-import@ubuntu.com-20120222141605-nxlu9yzc6attylc2
Tags: upstream-5.1.61
ImportĀ upstreamĀ versionĀ 5.1.61

Show diffs side-by-side

added added

removed removed

Lines of Context:
334
334
                                "InnoDB: tablespace but not the InnoDB "
335
335
                                "log files. See\n"
336
336
                                "InnoDB: http://dev.mysql.com/doc/refman/"
337
 
                                "5.1/en/forcing-recovery.html\n"
 
337
                                "5.1/en/forcing-innodb-recovery.html\n"
338
338
                                "InnoDB: for more information.\n",
339
339
                                (ulong) mach_read_from_4(read_buf
340
340
                                                         + FIL_PAGE_OFFSET),
1009
1009
}
1010
1010
 
1011
1011
/************************************************************************
1012
 
Resets the check_index_page_at_flush field of a page if found in the buffer
1013
 
pool. */
1014
 
 
1015
 
void
1016
 
buf_reset_check_index_page_at_flush(
1017
 
/*================================*/
1018
 
        ulint   space,  /* in: space id */
1019
 
        ulint   offset) /* in: page number */
1020
 
{
1021
 
        buf_block_t*    block;
1022
 
 
1023
 
        mutex_enter_fast(&(buf_pool->mutex));
1024
 
 
1025
 
        block = buf_page_hash_get(space, offset);
1026
 
 
1027
 
        if (block) {
1028
 
                block->check_index_page_at_flush = FALSE;
1029
 
        }
1030
 
 
1031
 
        mutex_exit(&(buf_pool->mutex));
1032
 
}
1033
 
 
1034
 
/************************************************************************
1035
1012
Returns the current state of is_hashed of a page. FALSE if the page is
1036
1013
not in the pool. NOTE that this operation does not fix the page in the
1037
1014
pool if it is found there. */
1270
1247
                buf_awe_map_page_to_frame(block, TRUE);
1271
1248
        }
1272
1249
 
 
1250
#if defined UNIV_DEBUG || defined UNIV_IBUF_DEBUG
 
1251
        if (mode == BUF_GET_IF_IN_POOL && ibuf_debug) {
 
1252
                /* Try to evict the block from the buffer pool, to use the
 
1253
                insert buffer as much as possible. */
 
1254
 
 
1255
                if (buf_LRU_free_block(block)) {
 
1256
                        mutex_exit(&buf_pool->mutex);
 
1257
                        mutex_exit(&block->mutex);
 
1258
                        fprintf(stderr,
 
1259
                                "innodb_change_buffering_debug evict %u %u\n",
 
1260
                                (unsigned) space, (unsigned) offset);
 
1261
                        return(NULL);
 
1262
                } else if (buf_flush_page_try(block)) {
 
1263
                        fprintf(stderr,
 
1264
                                "innodb_change_buffering_debug flush %u %u\n",
 
1265
                                (unsigned) space, (unsigned) offset);
 
1266
                        guess = block->frame;
 
1267
                        goto loop;
 
1268
                }
 
1269
 
 
1270
                /* Failed to evict the page; change it directly */
 
1271
        }
 
1272
#endif /* UNIV_DEBUG || UNIV_IBUF_DEBUG */
 
1273
 
1273
1274
#ifdef UNIV_SYNC_DEBUG
1274
1275
        buf_block_buf_fix_inc_debug(block, file, line);
1275
1276
#else
2043
2044
                              " table for corruption.\n"
2044
2045
                              "InnoDB: See also"
2045
2046
                              " http://dev.mysql.com/doc/refman/5.1/en/"
2046
 
                              "forcing-recovery.html\n"
 
2047
                              "forcing-innodb-recovery.html\n"
2047
2048
                              "InnoDB: about forcing recovery.\n", stderr);
2048
2049
 
2049
2050
                        if (srv_force_recovery < SRV_FORCE_IGNORE_CORRUPT) {