summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2017-11-10 16:12:45 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2017-11-10 16:12:45 +0200
commita48aa0cd569eda88bef98ed4abe41b0b570fcd51 (patch)
tree6008b19aabfe0554432c87614d1022594f08fc5f /storage/innobase/include
parent8409f721ffe2d91b11d3fc03c6872ff57051bbf8 (diff)
parent386e5d476e9bf8f216c760c9076ae0ecdc99054d (diff)
downloadmariadb-git-a48aa0cd569eda88bef98ed4abe41b0b570fcd51.tar.gz
Merge bb-10.2-ext into 10.3
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/buf0buf.h1
-rw-r--r--storage/innobase/include/buf0lru.h18
-rw-r--r--storage/innobase/include/buf0types.h11
-rw-r--r--storage/innobase/include/fil0fil.h15
-rw-r--r--storage/innobase/include/rem0rec.h23
-rw-r--r--storage/innobase/include/row0log.h9
-rw-r--r--storage/innobase/include/trx0rec.h6
7 files changed, 17 insertions, 66 deletions
diff --git a/storage/innobase/include/buf0buf.h b/storage/innobase/include/buf0buf.h
index 516898066aa..4a54c30629b 100644
--- a/storage/innobase/include/buf0buf.h
+++ b/storage/innobase/include/buf0buf.h
@@ -65,6 +65,7 @@ struct fil_addr_t;
#define BUF_GET_POSSIBLY_FREED 16
/*!< Like BUF_GET, but do not mind
if the file page has been freed. */
+#define BUF_EVICT_IF_IN_POOL 20 /*!< evict a clean block if found */
/* @} */
/** @name Modes for buf_page_get_known_nowait */
/* @{ */
diff --git a/storage/innobase/include/buf0lru.h b/storage/innobase/include/buf0lru.h
index 3cc01473da1..54c001ce478 100644
--- a/storage/innobase/include/buf0lru.h
+++ b/storage/innobase/include/buf0lru.h
@@ -50,18 +50,14 @@ These are low-level functions
/** Minimum LRU list length for which the LRU_old pointer is defined */
#define BUF_LRU_OLD_MIN_LEN 512 /* 8 megabytes of 16k pages */
-/******************************************************************//**
-Flushes all dirty pages or removes all pages belonging
-to a given tablespace. A PROBLEM: if readahead is being started, what
-guarantees that it will not try to read in pages after this operation
-has completed? */
+/** Empty the flush list for all pages belonging to a tablespace.
+@param[in] id tablespace identifier
+@param[in] trx transaction, for checking for user interrupt;
+ or NULL if nothing is to be written
+@param[in] drop_ahi whether to drop the adaptive hash index */
+UNIV_INTERN
void
-buf_LRU_flush_or_remove_pages(
-/*==========================*/
- ulint id, /*!< in: space id */
- buf_remove_t buf_remove, /*!< in: remove or flush strategy */
- const trx_t* trx); /*!< to check if the operation must
- be interrupted */
+buf_LRU_flush_or_remove_pages(ulint id, const trx_t* trx, bool drop_ahi=false);
#if defined UNIV_DEBUG || defined UNIV_BUF_DEBUG
/********************************************************************//**
diff --git a/storage/innobase/include/buf0types.h b/storage/innobase/include/buf0types.h
index 102b831ec61..719699f5ee2 100644
--- a/storage/innobase/include/buf0types.h
+++ b/storage/innobase/include/buf0types.h
@@ -59,17 +59,6 @@ enum buf_flush_t {
BUF_FLUSH_N_TYPES /*!< index of last element + 1 */
};
-/** Algorithm to remove the pages for a tablespace from the buffer pool.
-See buf_LRU_flush_or_remove_pages(). */
-enum buf_remove_t {
- BUF_REMOVE_ALL_NO_WRITE, /*!< Remove all pages from the buffer
- pool, don't write or sync to disk */
- BUF_REMOVE_FLUSH_NO_WRITE, /*!< Remove only, from the flush list,
- don't write or sync to disk */
- BUF_REMOVE_FLUSH_WRITE /*!< Flush dirty pages to disk only
- don't remove from the buffer pool */
-};
-
/** Flags for io_fix types */
enum buf_io_fix {
BUF_IO_NONE = 0, /**< no pending I/O */
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index 12395a3f060..695c490ea94 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -940,17 +940,12 @@ bool
fil_table_accessible(const dict_table_t* table)
MY_ATTRIBUTE((warn_unused_result, nonnull));
-/** Deletes an IBD tablespace, either general or single-table.
-The tablespace must be cached in the memory cache. This will delete the
-datafile, fil_space_t & fil_node_t entries from the file_system_t cache.
-@param[in] space_id Tablespace id
-@param[in] buf_remove Specify the action to take on the pages
-for this table in the buffer pool.
-@return true if success */
+/** Delete a tablespace and associated .ibd file.
+@param[in] id tablespace identifier
+@param[in] drop_ahi whether to drop the adaptive hash index
+@return DB_SUCCESS or error */
dberr_t
-fil_delete_tablespace(
- ulint id,
- buf_remove_t buf_remove);
+fil_delete_tablespace(ulint id, bool drop_ahi = false);
/** Truncate the tablespace to needed size.
@param[in] space_id id of tablespace to truncate
diff --git a/storage/innobase/include/rem0rec.h b/storage/innobase/include/rem0rec.h
index 58802e23e77..062e4f8d8ab 100644
--- a/storage/innobase/include/rem0rec.h
+++ b/storage/innobase/include/rem0rec.h
@@ -989,29 +989,6 @@ rec_convert_dtuple_to_temp(
rec_comp_status_t status = REC_STATUS_ORDINARY)
MY_ATTRIBUTE((nonnull));
-/** Determine the converted size of virtual column data in a temporary file.
-@see rec_convert_dtuple_to_temp_v()
-@param[in] index clustered index
-@param[in] v clustered index record augmented with the values
- of virtual columns
-@return size in bytes */
-ulint
-rec_get_converted_size_temp_v(const dict_index_t* index, const dtuple_t* v)
- MY_ATTRIBUTE((warn_unused_result, nonnull));
-
-/** Write indexed virtual column data into a temporary file.
-@see rec_get_converted_size_temp_v()
-@param[out] rec serialized record
-@param[in] index clustered index
-@param[in] v_entry clustered index record augmented with the values
- of virtual columns */
-void
-rec_convert_dtuple_to_temp_v(
- byte* rec,
- const dict_index_t* index,
- const dtuple_t* v_entry)
- MY_ATTRIBUTE((nonnull));
-
/**************************************************************//**
Copies the first n fields of a physical record to a new physical record in
a buffer.
diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h
index 11b7b8e9ad3..df9920d9bcc 100644
--- a/storage/innobase/include/row0log.h
+++ b/storage/innobase/include/row0log.h
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 2017, MariaDB Corporation.
This program is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free Software
@@ -132,7 +133,6 @@ row_log_table_delete(
/*=================*/
const rec_t* rec, /*!< in: clustered index leaf page record,
page X-latched */
- const dtuple_t* ventry, /*!< in: dtuple holding virtual column info */
dict_index_t* index, /*!< in/out: clustered index, S-latched
or X-latched */
const ulint* offsets,/*!< in: rec_get_offsets(rec,index) */
@@ -151,12 +151,8 @@ row_log_table_update(
dict_index_t* index, /*!< in/out: clustered index, S-latched
or X-latched */
const ulint* offsets,/*!< in: rec_get_offsets(rec,index) */
- const dtuple_t* old_pk, /*!< in: row_log_table_get_pk()
+ const dtuple_t* old_pk);/*!< in: row_log_table_get_pk()
before the update */
- const dtuple_t* new_v_row,/*!< in: dtuple contains the new virtual
- columns */
- const dtuple_t* old_v_row);/*!< in: dtuple contains the old virtual
- columns */
/******************************************************//**
Constructs the old PRIMARY KEY and DB_TRX_ID,DB_ROLL_PTR
@@ -185,7 +181,6 @@ row_log_table_insert(
/*=================*/
const rec_t* rec, /*!< in: clustered index leaf page record,
page X-latched */
- const dtuple_t* ventry, /*!< in: dtuple holding virtual column info */
dict_index_t* index, /*!< in/out: clustered index, S-latched
or X-latched */
const ulint* offsets);/*!< in: rec_get_offsets(rec,index) */
diff --git a/storage/innobase/include/trx0rec.h b/storage/innobase/include/trx0rec.h
index a6889696036..ed45e1de82e 100644
--- a/storage/innobase/include/trx0rec.h
+++ b/storage/innobase/include/trx0rec.h
@@ -276,15 +276,13 @@ trx_undo_rec_get_col_val(
@param[in] table the table
@param[in] ptr undo log pointer
@param[in,out] row the dtuple to fill
-@param[in] in_purge called by purge thread
-@param[in] col_map online rebuild column map */
+@param[in] in_purge whether this is called by purge */
void
trx_undo_read_v_cols(
const dict_table_t* table,
const byte* ptr,
const dtuple_t* row,
- bool in_purge,
- const ulint* col_map);
+ bool in_purge);
/** Read virtual column index from undo log if the undo log contains such
info, and verify the column is still indexed, and output its position