summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorVadim Tkachenko <vadim@percona.com>2009-01-29 08:54:13 -0800
committerVadim Tkachenko <vadim@percona.com>2009-01-29 08:54:13 -0800
commit0a073efd1ad9f4bd9d43fe3e8a4dd643d2683d82 (patch)
treeb1d2dfdfeee5bdd90b7189dae3b5011c9cee1ebe /include
parentec1ed62c1d06f395ed4b1cb59ea2fc8baa94fb23 (diff)
downloadmariadb-git-0a073efd1ad9f4bd9d43fe3e8a4dd643d2683d82.tar.gz
sync with rev40 extensions-1.0
Diffstat (limited to 'include')
-rw-r--r--include/buf0buddy.ic14
-rw-r--r--include/buf0buf.h4
-rw-r--r--include/buf0buf.ic18
-rw-r--r--include/buf0lru.h3
-rw-r--r--include/srv0srv.h3
-rw-r--r--include/trx0sys.h7
-rw-r--r--include/univ.i2
7 files changed, 39 insertions, 12 deletions
diff --git a/include/buf0buddy.ic b/include/buf0buddy.ic
index b6101d02cdd..5584d2af819 100644
--- a/include/buf0buddy.ic
+++ b/include/buf0buddy.ic
@@ -107,9 +107,21 @@ buf_buddy_free(
{
//ut_ad(buf_pool_mutex_own());
+ if (!have_page_hash_mutex) {
+ mutex_enter(&LRU_list_mutex);
+ mutex_enter(&flush_list_mutex);
+ mutex_enter(&page_hash_mutex);
+ }
+
mutex_enter(&zip_free_mutex);
- buf_buddy_free_low(buf, buf_buddy_get_slot(size), have_page_hash_mutex);
+ buf_buddy_free_low(buf, buf_buddy_get_slot(size), TRUE);
mutex_exit(&zip_free_mutex);
+
+ if (!have_page_hash_mutex) {
+ mutex_exit(&LRU_list_mutex);
+ mutex_exit(&flush_list_mutex);
+ mutex_exit(&page_hash_mutex);
+ }
}
#ifdef UNIV_MATERIALIZE
diff --git a/include/buf0buf.h b/include/buf0buf.h
index 8cd87c7a1db..98346b266f3 100644
--- a/include/buf0buf.h
+++ b/include/buf0buf.h
@@ -1098,11 +1098,11 @@ struct buf_block_struct{
a block is in the unzip_LRU list
if page.state == BUF_BLOCK_FILE_PAGE
and page.zip.data != NULL */
-#ifdef UNIV_DEBUG
+//#ifdef UNIV_DEBUG
ibool in_unzip_LRU_list;/* TRUE if the page is in the
decompressed LRU list;
used in debugging */
-#endif /* UNIV_DEBUG */
+//#endif /* UNIV_DEBUG */
byte* frame; /* pointer to buffer frame which
is of size UNIV_PAGE_SIZE, and
aligned to an address divisible by
diff --git a/include/buf0buf.ic b/include/buf0buf.ic
index 4de9efc3b73..5625a9d6ce8 100644
--- a/include/buf0buf.ic
+++ b/include/buf0buf.ic
@@ -222,7 +222,7 @@ buf_page_in_file(
case BUF_BLOCK_ZIP_FREE:
/* This is a free page in buf_pool->zip_free[].
Such pages should only be accessed by the buddy allocator. */
- ut_error;
+ /* ut_error; */ /* optimistic */
break;
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
@@ -280,7 +280,7 @@ buf_page_get_mutex(
{
switch (buf_page_get_state(bpage)) {
case BUF_BLOCK_ZIP_FREE:
- ut_error;
+ /* ut_error; */ /* optimistic */
return(NULL);
case BUF_BLOCK_ZIP_PAGE:
case BUF_BLOCK_ZIP_DIRTY:
@@ -414,11 +414,12 @@ buf_page_can_relocate(
const buf_page_t* bpage) /* control block being relocated */
{
//ut_ad(buf_pool_mutex_own());
- ut_ad(mutex_own(buf_page_get_mutex(bpage)));
- ut_ad(buf_page_in_file(bpage));
- ut_ad(bpage->in_LRU_list);
+ /* optimistic */
+ //ut_ad(mutex_own(buf_page_get_mutex(bpage)));
+ //ut_ad(buf_page_in_file(bpage));
+ //ut_ad(bpage->in_LRU_list);
- return(buf_page_get_io_fix(bpage) == BUF_IO_NONE
+ return(bpage->in_LRU_list && bpage->io_fix == BUF_IO_NONE
&& bpage->buf_fix_count == 0);
}
@@ -1045,12 +1046,15 @@ buf_page_release(
if (rw_latch == RW_X_LATCH && mtr->modifications) {
//buf_pool_mutex_enter();
mutex_enter(&flush_list_mutex);
+ mutex_enter(&block->mutex);
+ ut_ad(buf_block_get_state(block) == BUF_BLOCK_FILE_PAGE);
buf_flush_note_modification(block, mtr);
//buf_pool_mutex_exit();
mutex_exit(&flush_list_mutex);
}
-
+ else {
mutex_enter(&block->mutex);
+ }
#ifdef UNIV_SYNC_DEBUG
rw_lock_s_unlock(&(block->debug_latch));
diff --git a/include/buf0lru.h b/include/buf0lru.h
index c81fe9ee85d..c73033fe5e4 100644
--- a/include/buf0lru.h
+++ b/include/buf0lru.h
@@ -100,10 +100,11 @@ buf_LRU_free_block(
buf_page_t* bpage, /* in: block to be freed */
ibool zip, /* in: TRUE if should remove also the
compressed page of an uncompressed page */
- ibool* buf_pool_mutex_released);
+ ibool* buf_pool_mutex_released,
/* in: pointer to a variable that will
be assigned TRUE if buf_pool_mutex
was temporarily released, or NULL */
+ ibool have_LRU_mutex);
/**********************************************************************
Try to free a replaceable block. */
UNIV_INTERN
diff --git a/include/srv0srv.h b/include/srv0srv.h
index 3f11c30ee6f..7b1f898f63a 100644
--- a/include/srv0srv.h
+++ b/include/srv0srv.h
@@ -157,9 +157,12 @@ extern long long srv_ibuf_max_size;
extern ulint srv_ibuf_active_contract;
extern ulint srv_ibuf_accel_rate;
extern ulint srv_flush_neighbor_pages;
+extern ulint srv_enable_unsafe_group_commit;
extern ulint srv_read_ahead;
extern ulint srv_adaptive_checkpoint;
+extern ulint srv_extra_rsegments;
+
/*-------------------------------------------*/
extern ulint srv_n_rows_inserted;
diff --git a/include/trx0sys.h b/include/trx0sys.h
index 8271a5fb38a..30f9cf4c2a5 100644
--- a/include/trx0sys.h
+++ b/include/trx0sys.h
@@ -106,6 +106,13 @@ UNIV_INTERN
void
trx_sys_create(void);
/*================*/
+/*********************************************************************
+Create extra rollback segments when create_new_db */
+UNIV_INTERN
+void
+trx_sys_create_extra_rseg(
+/*======================*/
+ ulint num); /* in: number of extra user rollback segments */
/********************************************************************
Looks for a free slot for a rollback segment in the trx system file copy. */
UNIV_INTERN
diff --git a/include/univ.i b/include/univ.i
index 46c69573f9f..08db6883bba 100644
--- a/include/univ.i
+++ b/include/univ.i
@@ -12,7 +12,7 @@ Created 1/20/1994 Heikki Tuuri
#define INNODB_VERSION_MAJOR 1
#define INNODB_VERSION_MINOR 0
#define INNODB_VERSION_BUGFIX 2
-#define PERCONA_INNODB_VERSION 1
+#define PERCONA_INNODB_VERSION 3
/* The following is the InnoDB version as shown in
SELECT plugin_version FROM information_schema.plugins;