summaryrefslogtreecommitdiff
path: root/storage
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2020-12-01 19:51:14 +0200
committerMarko Mäkelä <marko.makela@mariadb.com>2020-12-01 19:51:14 +0200
commit589cf8dbf3accf57673d7e2f7a4435f7eaf33565 (patch)
treeaa38a67d10f71fc781188341857e34d437fa9199 /storage
parenta3531775b1efe06e2439a0c8ab668a2b69c859eb (diff)
parente30a05f4540b581df2e7d98bd7e812aeff603744 (diff)
downloadmariadb-git-589cf8dbf3accf57673d7e2f7a4435f7eaf33565.tar.gz
Merge 10.3 into 10.4
Diffstat (limited to 'storage')
-rw-r--r--storage/innobase/dict/dict0dict.cc1
-rw-r--r--storage/innobase/dict/dict0stats.cc2
-rw-r--r--storage/innobase/handler/handler0alter.cc2
-rw-r--r--storage/innobase/include/row0log.h4
-rw-r--r--storage/innobase/include/row0log.ic2
-rw-r--r--storage/innobase/mtr/mtr0mtr.cc4
-rw-r--r--storage/innobase/row/row0log.cc5
-rw-r--r--storage/innobase/row/row0uins.cc7
-rw-r--r--storage/innobase/row/row0umod.cc2
-rw-r--r--storage/mroonga/ha_mroonga.hpp5
-rw-r--r--storage/oqgraph/CMakeLists.txt4
-rw-r--r--storage/rocksdb/mysql-test/rocksdb/t/checkpoint.test2
12 files changed, 25 insertions, 15 deletions
diff --git a/storage/innobase/dict/dict0dict.cc b/storage/innobase/dict/dict0dict.cc
index 980f4c12e66..ea551adea41 100644
--- a/storage/innobase/dict/dict0dict.cc
+++ b/storage/innobase/dict/dict0dict.cc
@@ -1986,6 +1986,7 @@ dict_index_remove_from_cache_low(
if (index->online_log) {
ut_ad(index->online_status == ONLINE_INDEX_CREATION);
row_log_free(index->online_log);
+ index->online_log = NULL;
}
/* Remove the index from the list of indexes of the table */
diff --git a/storage/innobase/dict/dict0stats.cc b/storage/innobase/dict/dict0stats.cc
index ba724703221..dbb70ec1c6d 100644
--- a/storage/innobase/dict/dict0stats.cc
+++ b/storage/innobase/dict/dict0stats.cc
@@ -1980,7 +1980,7 @@ static index_stats_t dict_stats_analyze_index(dict_index_t* index)
since it will be faster and will give better results. */
if (root_level == 0
- || N_SAMPLE_PAGES(index) * n_uniq > index->stat_n_leaf_pages) {
+ || N_SAMPLE_PAGES(index) * n_uniq > result.n_leaf_pages) {
if (root_level == 0) {
DEBUG_PRINTF(" %s(): just one page,"
diff --git a/storage/innobase/handler/handler0alter.cc b/storage/innobase/handler/handler0alter.cc
index 58a3c5994c0..d473f9dec8f 100644
--- a/storage/innobase/handler/handler0alter.cc
+++ b/storage/innobase/handler/handler0alter.cc
@@ -7047,6 +7047,7 @@ error_handling_drop_uncached:
if (ok && a == 1) {
row_log_free(
index->online_log);
+ index->online_log = NULL;
ok = false;
});
@@ -8619,6 +8620,7 @@ innobase_online_rebuild_log_free(
== ONLINE_INDEX_CREATION);
clust_index->online_status = ONLINE_INDEX_COMPLETE;
row_log_free(clust_index->online_log);
+ clust_index->online_log = NULL;
DEBUG_SYNC_C("innodb_online_rebuild_log_free_aborted");
}
diff --git a/storage/innobase/include/row0log.h b/storage/innobase/include/row0log.h
index 63fd877691c..5ec4b9c1103 100644
--- a/storage/innobase/include/row0log.h
+++ b/storage/innobase/include/row0log.h
@@ -1,7 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2016, Oracle and/or its affiliates. All Rights Reserved.
-Copyright (c) 2017, MariaDB Corporation.
+Copyright (c) 2017, 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
@@ -69,7 +69,7 @@ Free the row log for an index that was being created online. */
void
row_log_free(
/*=========*/
- row_log_t*& log) /*!< in,own: row log */
+ row_log_t* log) /*!< in,own: row log */
MY_ATTRIBUTE((nonnull));
/******************************************************//**
diff --git a/storage/innobase/include/row0log.ic b/storage/innobase/include/row0log.ic
index ba7eb7b025c..44d17bbcdf1 100644
--- a/storage/innobase/include/row0log.ic
+++ b/storage/innobase/include/row0log.ic
@@ -1,6 +1,7 @@
/*****************************************************************************
Copyright (c) 2011, 2015, Oracle and/or its affiliates. All Rights Reserved.
+Copyright (c) 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
@@ -38,6 +39,7 @@ row_log_abort_sec(
ut_ad(!dict_index_is_clust(index));
dict_index_set_online_status(index, ONLINE_INDEX_ABORTED);
row_log_free(index->online_log);
+ index->online_log = NULL;
}
/******************************************************//**
diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc
index 3ed9856a58a..4d2deb49d46 100644
--- a/storage/innobase/mtr/mtr0mtr.cc
+++ b/storage/innobase/mtr/mtr0mtr.cc
@@ -735,7 +735,7 @@ inline lsn_t mtr_t::finish_write(ulint len)
return start_lsn;
}
-/** Find out whether a block was X-latched by the mini-transaction */
+/** Find out whether a block was not X-latched by the mini-transaction */
struct FindBlockX
{
const buf_block_t &block;
@@ -745,7 +745,7 @@ struct FindBlockX
/** @return whether the block was not found x-latched */
bool operator()(const mtr_memo_slot_t *slot) const
{
- return slot->object != &block || slot->type == MTR_MEMO_PAGE_X_FIX;
+ return slot->object != &block || slot->type != MTR_MEMO_PAGE_X_FIX;
}
};
diff --git a/storage/innobase/row/row0log.cc b/storage/innobase/row/row0log.cc
index afbfcd11823..45ec027beb5 100644
--- a/storage/innobase/row/row0log.cc
+++ b/storage/innobase/row/row0log.cc
@@ -3240,7 +3240,6 @@ row_log_allocate(
}
dict_index_set_online_status(index, ONLINE_INDEX_CREATION);
- index->online_log = log;
if (log_tmp_is_encrypted()) {
ulint size = srv_sort_buf_size;
@@ -3253,6 +3252,7 @@ row_log_allocate(
}
}
+ index->online_log = log;
/* While we might be holding an exclusive data dictionary lock
here, in row_log_abort_sec() we will not always be holding it. Use
atomic operations in both cases. */
@@ -3266,7 +3266,7 @@ Free the row log for an index that was being created online. */
void
row_log_free(
/*=========*/
- row_log_t*& log) /*!< in,own: row log */
+ row_log_t* log) /*!< in,own: row log */
{
MONITOR_ATOMIC_DEC(MONITOR_ONLINE_CREATE_INDEX);
@@ -3286,7 +3286,6 @@ row_log_free(
mutex_free(&log->mutex);
ut_free(log);
- log = NULL;
}
/******************************************************//**
diff --git a/storage/innobase/row/row0uins.cc b/storage/innobase/row/row0uins.cc
index b199469e5d5..160de0b88a5 100644
--- a/storage/innobase/row/row0uins.cc
+++ b/storage/innobase/row/row0uins.cc
@@ -448,6 +448,13 @@ close_table:
node->heap);
} else {
node->ref = &trx_undo_metadata;
+ if (!row_undo_search_clust_to_pcur(node)) {
+ /* An error probably occurred during
+ an insert into the clustered index,
+ after we wrote the undo log record. */
+ goto close_table;
+ }
+ return true;
}
if (!row_undo_search_clust_to_pcur(node)) {
diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc
index 1d728df9a96..3b72f173862 100644
--- a/storage/innobase/row/row0umod.cc
+++ b/storage/innobase/row/row0umod.cc
@@ -1337,7 +1337,7 @@ close_table:
}
/* Extract indexed virtual columns from undo log */
- if (node->table->n_v_cols) {
+ if (node->ref != &trx_undo_metadata && node->table->n_v_cols) {
row_upd_replace_vcol(node->row, node->table,
node->update, false, node->undo_row,
(node->cmpl_info & UPD_NODE_NO_ORD_CHANGE)
diff --git a/storage/mroonga/ha_mroonga.hpp b/storage/mroonga/ha_mroonga.hpp
index 20626742bb7..7736ac52dba 100644
--- a/storage/mroonga/ha_mroonga.hpp
+++ b/storage/mroonga/ha_mroonga.hpp
@@ -571,11 +571,6 @@ public:
void set_next_insert_id(ulonglong id);
void get_auto_increment(ulonglong offset, ulonglong increment, ulonglong nb_desired_values,
ulonglong *first_value, ulonglong *nb_reserved_values) mrn_override;
- /** Fix spurious -Werror=overloaded-virtual in GCC 9 */
- void restore_auto_increment() mrn_override
- {
- handler::restore_auto_increment();
- }
void restore_auto_increment(ulonglong prev_insert_id) mrn_override;
void release_auto_increment() mrn_override;
int check_for_upgrade(HA_CHECK_OPT *check_opt) mrn_override;
diff --git a/storage/oqgraph/CMakeLists.txt b/storage/oqgraph/CMakeLists.txt
index 68582e2802d..901acc6a8ca 100644
--- a/storage/oqgraph/CMakeLists.txt
+++ b/storage/oqgraph/CMakeLists.txt
@@ -20,6 +20,10 @@ INCLUDE_DIRECTORIES(${Judy_INCLUDE_DIR})
SET(OQGRAPH_OK 1)
ENDMACRO()
+IF(PLUGIN_OQGRAPH STREQUAL "NO")
+ RETURN()
+ENDIF()
+
IF(NOT DEFINED OQGRAPH_OK)
CHECK_OQGRAPH()
IF (NOT OQGRAPH_OK)
diff --git a/storage/rocksdb/mysql-test/rocksdb/t/checkpoint.test b/storage/rocksdb/mysql-test/rocksdb/t/checkpoint.test
index e5de6246f60..68fe02bbd86 100644
--- a/storage/rocksdb/mysql-test/rocksdb/t/checkpoint.test
+++ b/storage/rocksdb/mysql-test/rocksdb/t/checkpoint.test
@@ -87,7 +87,7 @@ let $checkpoint = $MYSQL_TMP_DIR/already-existing-directory;
--mkdir $checkpoint
let $succeeds = 0;
--source set_checkpoint.inc
---exec rm -rf $checkpoint
+rmdir $checkpoint;
--disable_result_log
truncate table t1;