summaryrefslogtreecommitdiff
path: root/storage/innobase/include
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-06-05 18:05:22 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2020-06-05 18:05:22 +0300
commit68d9d512e933a1d40670add50f205e5266bc5507 (patch)
tree24f483a40449b28b4414360fbdd03646315ac1ec /storage/innobase/include
parent6404645980db51fdc1e5dae2ac94eca57804284b (diff)
parent286e52e948eee9e5f908c5944467149df35d25e7 (diff)
downloadmariadb-git-68d9d512e933a1d40670add50f205e5266bc5507.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'storage/innobase/include')
-rw-r--r--storage/innobase/include/btr0pcur.ic8
-rw-r--r--storage/innobase/include/btr0sea.h16
-rw-r--r--storage/innobase/include/lock0lock.h1
-rw-r--r--storage/innobase/include/srv0start.h2
-rw-r--r--storage/innobase/include/ut0ut.h77
5 files changed, 48 insertions, 56 deletions
diff --git a/storage/innobase/include/btr0pcur.ic b/storage/innobase/include/btr0pcur.ic
index 9c99da42b97..d93da475a1f 100644
--- a/storage/innobase/include/btr0pcur.ic
+++ b/storage/innobase/include/btr0pcur.ic
@@ -445,14 +445,14 @@ btr_pcur_open_low(
#endif /* BTR_CUR_HASH_ADAPT */
file, line, mtr, autoinc);
- if (err != DB_SUCCESS) {
- ib::warn() << " Error code: " << err
- << " btr_pcur_open_low "
+ if (UNIV_UNLIKELY(err != DB_SUCCESS)) {
+ ib::warn() << "btr_pcur_open_low"
<< " level: " << level
<< " called from file: "
<< file << " line: " << line
<< " table: " << index->table->name
- << " index: " << index->name;
+ << " index: " << index->name
+ << " error: " << err;
}
cursor->pos_state = BTR_PCUR_IS_POSITIONED;
diff --git a/storage/innobase/include/btr0sea.h b/storage/innobase/include/btr0sea.h
index b1ba5f6a31b..2fa9aaa38fe 100644
--- a/storage/innobase/include/btr0sea.h
+++ b/storage/innobase/include/btr0sea.h
@@ -35,18 +35,15 @@ Created 2/17/1996 Heikki Tuuri
@param[in] hash_size hash table size. */
void btr_search_sys_create(ulint hash_size);
-/** Resize hash index hash table.
-@param[in] hash_size hash index hash table size */
-void btr_search_sys_resize(ulint hash_size);
-
/** Frees the adaptive search system at a database shutdown. */
void btr_search_sys_free();
-/** Disable the adaptive hash search system and empty the index.
-@param need_mutex need to acquire dict_sys.mutex */
-void btr_search_disable(bool need_mutex);
-/** Enable the adaptive hash search system. */
-void btr_search_enable();
+/** Disable the adaptive hash search system and empty the index. */
+void btr_search_disable();
+
+/** Enable the adaptive hash search system.
+@param resize whether buf_pool_resize() is the caller */
+void btr_search_enable(bool resize= false);
/*********************************************************************//**
Updates the search info. */
@@ -186,7 +183,6 @@ static inline hash_table_t* btr_get_search_table(const dict_index_t* index);
# define btr_search_move_or_delete_hash_entries(new_block, block)
# define btr_search_update_hash_on_insert(cursor, ahi_latch)
# define btr_search_update_hash_on_delete(cursor)
-# define btr_search_sys_resize(hash_size)
#endif /* BTR_CUR_HASH_ADAPT */
#ifdef BTR_CUR_ADAPT
diff --git a/storage/innobase/include/lock0lock.h b/storage/innobase/include/lock0lock.h
index 8dc90b63caf..53e8761971d 100644
--- a/storage/innobase/include/lock0lock.h
+++ b/storage/innobase/include/lock0lock.h
@@ -541,6 +541,7 @@ lock_has_to_wait(
locks are record locks */
/*********************************************************************//**
Reports that a transaction id is insensible, i.e., in the future. */
+ATTRIBUTE_COLD
void
lock_report_trx_id_insanity(
/*========================*/
diff --git a/storage/innobase/include/srv0start.h b/storage/innobase/include/srv0start.h
index 580c48bd02c..c1be0016bb3 100644
--- a/storage/innobase/include/srv0start.h
+++ b/storage/innobase/include/srv0start.h
@@ -109,6 +109,8 @@ extern ibool srv_start_raw_disk_in_use;
/** Shutdown state */
enum srv_shutdown_t {
SRV_SHUTDOWN_NONE = 0, /*!< Database running normally */
+ /** Shutdown initiated in srv_shutdown_bg_undo_sources() */
+ SRV_SHUTDOWN_INITIATED,
SRV_SHUTDOWN_CLEANUP, /*!< Cleaning up in
logs_empty_and_mark_files_at_shutdown() */
SRV_SHUTDOWN_FLUSH_PHASE,/*!< At this phase the master and the
diff --git a/storage/innobase/include/ut0ut.h b/storage/innobase/include/ut0ut.h
index 6b99bae6b7b..430b99d7667 100644
--- a/storage/innobase/include/ut0ut.h
+++ b/storage/innobase/include/ut0ut.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 1994, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2019, MariaDB Corporation.
+Copyright (c) 2019, 2020, 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
@@ -336,48 +336,41 @@ operator<<(
It contains a std::ostringstream object. The main purpose of this class is
to forward operator<< to the underlying std::ostringstream object. Do not
use this class directly, instead use one of the derived classes. */
-class logger {
-public:
- template<typename T>
- ATTRIBUTE_COLD
- logger& operator<<(const T& rhs)
- {
- m_oss << rhs;
- return(*this);
- }
-
- /** Write the given buffer to the internal string stream object.
- @param[in] buf the buffer whose contents will be logged.
- @param[in] count the length of the buffer buf.
- @return the output stream into which buffer was written. */
- ATTRIBUTE_COLD
- std::ostream&
- write(
- const char* buf,
- std::streamsize count)
- {
- return(m_oss.write(buf, count));
- }
-
- /** Write the given buffer to the internal string stream object.
- @param[in] buf the buffer whose contents will be logged.
- @param[in] count the length of the buffer buf.
- @return the output stream into which buffer was written. */
- ATTRIBUTE_COLD
- std::ostream&
- write(
- const byte* buf,
- std::streamsize count)
- {
- return(m_oss.write(reinterpret_cast<const char*>(buf), count));
- }
-
- std::ostringstream m_oss;
+class logger
+{
protected:
- /* This class must not be used directly, hence making the default
- constructor protected. */
- ATTRIBUTE_COLD
- logger() {}
+ /* This class must not be used directly */
+ ATTRIBUTE_COLD ATTRIBUTE_NOINLINE logger() {}
+public:
+ template<typename T> ATTRIBUTE_COLD ATTRIBUTE_NOINLINE
+ logger& operator<<(const T& rhs)
+ {
+ m_oss << rhs;
+ return *this;
+ }
+
+ /** Handle a fixed character string in the same way as a pointer to
+ an unknown-length character string, to reduce object code bloat. */
+ template<size_t N> logger& operator<<(const char (&rhs)[N])
+ { return *this << static_cast<const char*>(rhs); }
+
+ /** Output an error code name */
+ ATTRIBUTE_COLD logger& operator<<(dberr_t err);
+
+ /** Append a string.
+ @param buf string buffer
+ @param size buffer size
+ @return the output stream */
+ ATTRIBUTE_COLD __attribute__((noinline))
+ std::ostream &write(const char *buf, std::streamsize size)
+ {
+ return m_oss.write(buf, size);
+ }
+
+ std::ostream &write(const byte *buf, std::streamsize size)
+ { return write(reinterpret_cast<const char*>(buf), size); }
+
+ std::ostringstream m_oss;
};
/** The class info is used to emit informational log messages. It is to be