summaryrefslogtreecommitdiff
path: root/storage/innobase/include/buf0dblwr.h
diff options
context:
space:
mode:
authorSergei Golubchik <sergii@pisem.net>2014-02-01 09:33:26 +0100
committerSergei Golubchik <sergii@pisem.net>2014-02-01 09:33:26 +0100
commit27d45e46968e4bd623565688a997b83b0a5cc1a8 (patch)
tree8df9c87f8fd3855d81e3ae46078d34609668e63a /storage/innobase/include/buf0dblwr.h
parent27fbb637d36324992b270f0dc0472807ffa4ebc2 (diff)
downloadmariadb-git-27d45e46968e4bd623565688a997b83b0a5cc1a8.tar.gz
MDEV-5574 Set AUTO_INCREMENT below max value of column.
Update InnoDB to 5.6.14 Apply MySQL-5.6 hack for MySQL Bug#16434374 Move Aria-only HA_RTREE_INDEX from my_base.h to maria_def.h (breaks an assert in InnoDB) Fix InnoDB memory leak
Diffstat (limited to 'storage/innobase/include/buf0dblwr.h')
-rw-r--r--storage/innobase/include/buf0dblwr.h50
1 files changed, 28 insertions, 22 deletions
diff --git a/storage/innobase/include/buf0dblwr.h b/storage/innobase/include/buf0dblwr.h
index 357ba697f6a..1b9336f4002 100644
--- a/storage/innobase/include/buf0dblwr.h
+++ b/storage/innobase/include/buf0dblwr.h
@@ -63,12 +63,13 @@ void
buf_dblwr_free(void);
/*================*/
/********************************************************************//**
-Updates the doublewrite buffer when an IO request that is part of an
-LRU or flush batch is completed. */
+Updates the doublewrite buffer when an IO request is completed. */
UNIV_INTERN
void
-buf_dblwr_update(void);
-/*==================*/
+buf_dblwr_update(
+/*=============*/
+ const buf_page_t* bpage, /*!< in: buffer block descriptor */
+ buf_flush_t flush_type);/*!< in: flush type */
/****************************************************************//**
Determines if a page number is located inside the doublewrite buffer.
@return TRUE if the location is inside the two blocks of the
@@ -109,36 +110,41 @@ UNIV_INTERN
void
buf_dblwr_write_single_page(
/*========================*/
- buf_page_t* bpage); /*!< in: buffer block to write */
+ buf_page_t* bpage, /*!< in: buffer block to write */
+ bool sync); /*!< in: true if sync IO requested */
/** Doublewrite control struct */
struct buf_dblwr_t{
- ib_mutex_t mutex; /*!< mutex protecting the first_free field and
- write_buf */
- ulint block1; /*!< the page number of the first
+ ib_mutex_t mutex; /*!< mutex protecting the first_free
+ field and write_buf */
+ ulint block1; /*!< the page number of the first
doublewrite block (64 pages) */
- ulint block2; /*!< page number of the second block */
- ulint first_free; /*!< first free position in write_buf measured
- in units of UNIV_PAGE_SIZE */
- ulint s_reserved; /*!< number of slots currently reserved
- for single page flushes. */
- ulint b_reserved; /*!< number of slots currently reserved
+ ulint block2; /*!< page number of the second block */
+ ulint first_free;/*!< first free position in write_buf
+ measured in units of UNIV_PAGE_SIZE */
+ ulint b_reserved;/*!< number of slots currently reserved
for batch flush. */
- ibool* in_use; /*!< flag used to indicate if a slot is
+ os_event_t b_event;/*!< event where threads wait for a
+ batch flush to end. */
+ ulint s_reserved;/*!< number of slots currently
+ reserved for single page flushes. */
+ os_event_t s_event;/*!< event where threads wait for a
+ single page flush slot. */
+ bool* in_use; /*!< flag used to indicate if a slot is
in use. Only used for single page
flushes. */
- ibool batch_running; /*!< set to TRUE if currently a batch
+ bool batch_running;/*!< set to TRUE if currently a batch
is being written from the doublewrite
buffer. */
- byte* write_buf; /*!< write buffer used in writing to the
+ byte* write_buf;/*!< write buffer used in writing to the
doublewrite buffer, aligned to an
address divisible by UNIV_PAGE_SIZE
(which is required by Windows aio) */
- byte* write_buf_unaligned;
- /*!< pointer to write_buf, but unaligned */
- buf_page_t**
- buf_block_arr; /*!< array to store pointers to the buffer
- blocks which have been cached to write_buf */
+ byte* write_buf_unaligned;/*!< pointer to write_buf,
+ but unaligned */
+ buf_page_t** buf_block_arr;/*!< array to store pointers to
+ the buffer blocks which have been
+ cached to write_buf */
};