Commit 17582bc0 authored by unknown's avatar unknown
Browse files

Merge mysql.com:/home/cps/mysql/trees/mysql-5.0

into mysql.com:/home/cps/mysql/devel/innotask/mysql-5.0-inno-final

parents 703c498f e1f5b3f9
Loading
Loading
Loading
Loading
+24 −0
Original line number Diff line number Diff line
@@ -2136,6 +2136,30 @@ buf_print(void)
	ut_a(buf_validate());
}	

/*************************************************************************
Returns the number of latched pages in the buffer pool. */

ulint
buf_get_latched_pages_number(void)
{
        buf_block_t* block;
        ulint i;
        ulint fixed_pages_number = 0;

        mutex_enter(&(buf_pool->mutex));

        for (i = 0; i < buf_pool->curr_size; i++) {

               block = buf_pool_get_nth_block(buf_pool, i);

               if ((block->buf_fix_count != 0) || (block->io_fix != 0))
                       fixed_pages_number++;
        }

        mutex_exit(&(buf_pool->mutex));
        return fixed_pages_number;
}

/*************************************************************************
Returns the number of pending buf pool ios. */

+7 −0
Original line number Diff line number Diff line
@@ -273,6 +273,10 @@ buf_flush_buffered_writes(void)
		}
	}

        /* increment the doublewrite flushed pages counter */
        srv_dblwr_pages_written+= trx_doublewrite->first_free;
        srv_dblwr_writes++;
        
	if (trx_doublewrite->first_free > TRX_SYS_DOUBLEWRITE_BLOCK_SIZE) {
		len = TRX_SYS_DOUBLEWRITE_BLOCK_SIZE * UNIV_PAGE_SIZE;
	} else {
@@ -901,6 +905,9 @@ buf_flush_batch(
			(ulong) page_count);
	}
	
        if (page_count != ULINT_UNDEFINED)
          srv_buf_pool_flushed+= page_count;

	return(page_count);
}

+1 −0
Original line number Diff line number Diff line
@@ -432,6 +432,7 @@ buf_LRU_get_free_block(void)
	/* No free block was found: try to flush the LRU list */

	buf_flush_free_margin();
        ++srv_buf_pool_wait_free;

	os_aio_simulated_wake_handler_threads();

+7 −0
Original line number Diff line number Diff line
@@ -20,6 +20,10 @@ Created 11/5/1995 Heikki Tuuri
#include "os0file.h"
#include "srv0start.h"

extern ulint srv_read_ahead_rnd;
extern ulint srv_read_ahead_seq;
extern ulint srv_buf_pool_reads;

/* The size in blocks of the area where the random read-ahead algorithm counts
the accessed pages when deciding whether to read-ahead */
#define	BUF_READ_AHEAD_RANDOM_AREA	BUF_READ_AHEAD_AREA
@@ -291,6 +295,7 @@ buf_read_ahead_random(
		       				(ulong) count);
	}

        ++srv_read_ahead_rnd;
	return(count);
}

@@ -323,6 +328,7 @@ buf_read_page(

	count2 = buf_read_page_low(&err, TRUE, BUF_READ_ANY_PAGE, space,
					tablespace_version, offset);
        srv_buf_pool_reads+= count2;
	if (err == DB_TABLESPACE_DELETED) {
	        ut_print_timestamp(stderr);
		fprintf(stderr,
@@ -575,6 +581,7 @@ buf_read_ahead_linear(
		(ulong) space, (ulong) offset, (ulong) count);
	}

        ++srv_read_ahead_seq;
	return(count);
}

+10 −0
Original line number Diff line number Diff line
@@ -88,6 +88,9 @@ but in the MySQL Embedded Server Library and ibbackup it is not the default
directory, and we must set the base file path explicitly */
const char*	fil_path_to_mysql_datadir	= ".";

/* The number of fsyncs done to the log */
ulint	fil_n_log_flushes                       = 0;

ulint	fil_n_pending_log_flushes		= 0;
ulint	fil_n_pending_tablespace_flushes	= 0;

@@ -3671,6 +3674,12 @@ fil_io(
		mode = OS_AIO_NORMAL;
	}

        if (type == OS_FILE_READ) {
                srv_data_read+= len;
        } else if (type == OS_FILE_WRITE) {
                srv_data_written+= len;
        }

	/* Reserve the fil_system mutex and make sure that we can open at
	least one file while holding it, if the file is not already open */

@@ -3956,6 +3965,7 @@ fil_flush(
				fil_n_pending_tablespace_flushes++;
			} else {
				fil_n_pending_log_flushes++;
				fil_n_log_flushes++;
			}
#ifdef __WIN__
			if (node->is_raw_disk) {
Loading