summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2019-04-08 08:22:34 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2019-04-08 08:22:34 +0300
commitd8303c3ee7750f4003e3561c3e60ee6e636bf9ad (patch)
treee4e8bb9a850836859974be09bf8cf524ea21491c /storage/innobase/include
parenta2afba8b01c249971f600a82f1a9b0a119374b9a (diff)
parentcc492bfd4ff2d15cc5803a7d80f1559ceeb003c1 (diff)
downloadmariadb-git-d8303c3ee7750f4003e3561c3e60ee6e636bf9ad.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/dict0types.h5
-rw-r--r--storage/innobase/include/fil0fil.h17
-rw-r--r--storage/innobase/include/fsp0fsp.h13
-rw-r--r--storage/innobase/include/log0recv.h13
-rw-r--r--storage/innobase/include/page0zip.h18
-rw-r--r--storage/innobase/include/row0merge.h8
6 files changed, 31 insertions, 43 deletions
diff --git a/storage/innobase/include/dict0types.h b/storage/innobase/include/dict0types.h
index e3b536b83ee..80b918b2df0 100644
--- a/storage/innobase/include/dict0types.h
+++ b/storage/innobase/include/dict0types.h
@@ -78,7 +78,10 @@ enum dict_err_ignore_t {
Silently load a missing
tablespace, and do not load
incomplete index definitions. */
- DICT_ERR_IGNORE_ALL = 0xFFFF /*!< ignore all errors */
+ /** ignore all errors above */
+ DICT_ERR_IGNORE_ALL = 15,
+ /** prepare to drop the table; do not attempt to load tablespace */
+ DICT_ERR_IGNORE_DROP = 31
};
/** Quiescing states for flushing tables to disk. */
diff --git a/storage/innobase/include/fil0fil.h b/storage/innobase/include/fil0fil.h
index 18449785e61..12a48e0b9a2 100644
--- a/storage/innobase/include/fil0fil.h
+++ b/storage/innobase/include/fil0fil.h
@@ -1338,9 +1338,6 @@ memory cache. Note that if we have not done a crash recovery at the database
startup, there may be many tablespaces which are not yet in the memory cache.
@param[in] id Tablespace ID
@param[in] name Tablespace name used in fil_space_create().
-@param[in] print_error_if_does_not_exist
- Print detailed error information to the
-error log if a matching tablespace is not found from memory.
@param[in] table_flags table flags
@return the tablespace
@retval NULL if no matching tablespace exists in the memory cache */
@@ -1348,7 +1345,6 @@ fil_space_t*
fil_space_for_table_exists_in_mem(
ulint id,
const char* name,
- bool print_error_if_does_not_exist,
ulint table_flags);
/** Try to extend a tablespace if it is smaller than the specified size.
@@ -1554,16 +1550,12 @@ fil_names_write_if_was_clean(
return(was_clean);
}
-extern volatile bool recv_recovery_on;
-
/** During crash recovery, open a tablespace if it had not been opened
yet, to get valid size and flags.
@param[in,out] space tablespace */
-inline
-void
-fil_space_open_if_needed(
- fil_space_t* space)
+inline void fil_space_open_if_needed(fil_space_t* space)
{
+ ut_d(extern volatile bool recv_recovery_on);
ut_ad(recv_recovery_on);
if (space->size == 0) {
@@ -1571,10 +1563,7 @@ fil_space_open_if_needed(
until the files are opened for the first time.
fil_space_get_size() will open the file
and adjust the size and flags. */
-#ifdef UNIV_DEBUG
- ulint size =
-#endif /* UNIV_DEBUG */
- fil_space_get_size(space->id);
+ ut_d(ulint size =) fil_space_get_size(space->id);
ut_ad(size == space->size);
}
}
diff --git a/storage/innobase/include/fsp0fsp.h b/storage/innobase/include/fsp0fsp.h
index 9a89971bb0d..651d1c1ef72 100644
--- a/storage/innobase/include/fsp0fsp.h
+++ b/storage/innobase/include/fsp0fsp.h
@@ -602,15 +602,10 @@ inline bool fsp_descr_page(const page_id_t page_id, ulint physical_size)
return (page_id.page_no() & (physical_size - 1)) == FSP_XDES_OFFSET;
}
-/***********************************************************//**
-Parses a redo log record of a file page init.
-@return end of log record or NULL */
-byte*
-fsp_parse_init_file_page(
-/*=====================*/
- byte* ptr, /*!< in: buffer */
- byte* end_ptr, /*!< in: buffer end */
- buf_block_t* block); /*!< in: block or NULL */
+/** Initialize a file page whose prior contents should be ignored.
+@param[in,out] block buffer pool block */
+void fsp_apply_init_file_page(buf_block_t* block);
+
#ifdef UNIV_BTR_PRINT
/*******************************************************************//**
Writes info of a segment. */
diff --git a/storage/innobase/include/log0recv.h b/storage/innobase/include/log0recv.h
index 5fe00d65f2c..5d5ccac885a 100644
--- a/storage/innobase/include/log0recv.h
+++ b/storage/innobase/include/log0recv.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1997, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, 2018, MariaDB Corporation.
+Copyright (c) 2017, 2019, 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
@@ -40,7 +40,7 @@ Created 9/20/1997 Heikki Tuuri
extern bool recv_writer_thread_active;
/** @return whether recovery is currently running. */
-#define recv_recovery_is_on() recv_recovery_on
+#define recv_recovery_is_on() UNIV_UNLIKELY(recv_recovery_on)
/** Find the latest checkpoint in the log header.
@param[out] max_field LOG_CHECKPOINT_1 or LOG_CHECKPOINT_2
@@ -49,12 +49,9 @@ dberr_t
recv_find_max_checkpoint(ulint* max_field)
MY_ATTRIBUTE((nonnull, warn_unused_result));
-/** Apply the hashed log records to the page, if the page lsn is less than the
-lsn of a log record.
-@param just_read_in whether the page recently arrived to the I/O handler
-@param block the page in the buffer pool */
-void
-recv_recover_page(bool just_read_in, buf_block_t* block);
+/** Apply any buffered redo log to a page that was just read from a data file.
+@param[in,out] bpage buffer pool page */
+ATTRIBUTE_COLD void recv_recover_page(buf_page_t* bpage);
/** Start recovering from a redo log checkpoint.
@see recv_recovery_from_checkpoint_finish
diff --git a/storage/innobase/include/page0zip.h b/storage/innobase/include/page0zip.h
index c5376967bd8..b462833e4c7 100644
--- a/storage/innobase/include/page0zip.h
+++ b/storage/innobase/include/page0zip.h
@@ -471,16 +471,14 @@ page_zip_copy_recs(
dict_index_t* index, /*!< in: index of the B-tree */
mtr_t* mtr); /*!< in: mini-transaction */
-/**********************************************************************//**
-Parses a log record of compressing an index page.
-@return end of log record or NULL */
-byte*
-page_zip_parse_compress(
-/*====================*/
- byte* ptr, /*!< in: buffer */
- byte* end_ptr, /*!< in: buffer end */
- page_t* page, /*!< out: uncompressed page */
- page_zip_des_t* page_zip); /*!< out: compressed page */
+/** Parse and optionally apply MLOG_ZIP_PAGE_COMPRESS.
+@param[in] ptr log record
+@param[in] end_ptr end of log
+@param[in,out] block ROW_FORMAT=COMPRESSED block, or NULL for parsing only
+@return end of log record
+@retval NULL if the log record is incomplete */
+byte* page_zip_parse_compress(const byte* ptr, const byte* end_ptr,
+ buf_block_t* block);
#endif /* !UNIV_INNOCHECKSUM */
diff --git a/storage/innobase/include/row0merge.h b/storage/innobase/include/row0merge.h
index 7d49f0ee346..1bc3bc060dc 100644
--- a/storage/innobase/include/row0merge.h
+++ b/storage/innobase/include/row0merge.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2005, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2015, 2017, MariaDB Corporation.
+Copyright (c) 2015, 2019, 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
@@ -292,6 +292,12 @@ row_merge_drop_table(
dict_table_t* table) /*!< in: table instance to drop */
MY_ATTRIBUTE((nonnull, warn_unused_result));
+/** Write an MLOG_INDEX_LOAD record to indicate in the redo-log
+that redo-logging of individual index pages was disabled, and
+the flushing of such pages to the data files was completed.
+@param[in] index an index tree on which redo logging was disabled */
+void row_merge_write_redo(const dict_index_t* index);
+
/** Build indexes on a table by reading a clustered index, creating a temporary
file containing index entries, merge sorting these index entries and inserting
sorted index entries to indexes.