Commit 089cf5c0 authored by inaam's avatar inaam

branches/zip

Remove unused macros as we erased the random readahead code in r5703.
Also fixed some comments.
parent b7a0c6ac
...@@ -38,14 +38,6 @@ Created 11/5/1995 Heikki Tuuri ...@@ -38,14 +38,6 @@ Created 11/5/1995 Heikki Tuuri
#include "srv0start.h" #include "srv0start.h"
#include "srv0srv.h" #include "srv0srv.h"
/** 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
/** There must be at least this many pages in buf_pool in the area to start
a random read-ahead */
#define BUF_READ_AHEAD_RANDOM_THRESHOLD (1 + BUF_READ_AHEAD_RANDOM_AREA / 2)
/** The linear read-ahead area size */ /** The linear read-ahead area size */
#define BUF_READ_AHEAD_LINEAR_AREA BUF_READ_AHEAD_AREA #define BUF_READ_AHEAD_LINEAR_AREA BUF_READ_AHEAD_AREA
...@@ -62,7 +54,8 @@ flag is cleared and the x-lock released by an i/o-handler thread. ...@@ -62,7 +54,8 @@ flag is cleared and the x-lock released by an i/o-handler thread.
@return 1 if a read request was queued, 0 if the page already resided @return 1 if a read request was queued, 0 if the page already resided
in buf_pool, or if the page is in the doublewrite buffer blocks in in buf_pool, or if the page is in the doublewrite buffer blocks in
which case it is never read into the pool, or if the tablespace does which case it is never read into the pool, or if the tablespace does
not exist or is being dropped */ not exist or is being dropped
@return 1 if read request is issued. 0 if it is not */
static static
ulint ulint
buf_read_page_low( buf_read_page_low(
...@@ -168,12 +161,10 @@ buf_read_page_low( ...@@ -168,12 +161,10 @@ buf_read_page_low(
High-level function which reads a page asynchronously from a file to the High-level function which reads a page asynchronously from a file to the
buffer buf_pool if it is not already there. Sets the io_fix flag and sets buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread. Does a random read-ahead if it seems released by the i/o-handler thread.
sensible. @return TRUE if page has been read in, FALSE in case of failure */
@return number of page read requests issued: this can be greater than
1 if read-ahead occurred */
UNIV_INTERN UNIV_INTERN
ulint ibool
buf_read_page( buf_read_page(
/*==========*/ /*==========*/
ulint space, /*!< in: space id */ ulint space, /*!< in: space id */
...@@ -209,7 +200,7 @@ buf_read_page( ...@@ -209,7 +200,7 @@ buf_read_page(
/* Increment number of I/O operations used for LRU policy. */ /* Increment number of I/O operations used for LRU policy. */
buf_LRU_stat_inc_io(); buf_LRU_stat_inc_io();
return(count); return(count > 0 ? TRUE : FALSE);
} }
/********************************************************************//** /********************************************************************//**
......
...@@ -33,12 +33,10 @@ Created 11/5/1995 Heikki Tuuri ...@@ -33,12 +33,10 @@ Created 11/5/1995 Heikki Tuuri
High-level function which reads a page asynchronously from a file to the High-level function which reads a page asynchronously from a file to the
buffer buf_pool if it is not already there. Sets the io_fix flag and sets buffer buf_pool if it is not already there. Sets the io_fix flag and sets
an exclusive lock on the buffer frame. The flag is cleared and the x-lock an exclusive lock on the buffer frame. The flag is cleared and the x-lock
released by the i/o-handler thread. Does a random read-ahead if it seems released by the i/o-handler thread.
sensible. @return TRUE if page has been read in, FALSE in case of failure */
@return number of page read requests issued: this can be greater than
1 if read-ahead occurred */
UNIV_INTERN UNIV_INTERN
ulint ibool
buf_read_page( buf_read_page(
/*==========*/ /*==========*/
ulint space, /*!< in: space id */ ulint space, /*!< in: space id */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment