diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-17 14:54:12 +0200 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2018-02-17 14:54:12 +0200 |
commit | 970ce270c9723478e72246563c3e0ac38a853eeb (patch) | |
tree | 5267bb81d63b86732e69a35b278a4cc6b931fcac /storage | |
parent | 8bf2c08d5493a60f58aff9bd0f91a266dcce3e1d (diff) | |
parent | 9a46d971495e17664082409e7def042f66b5f88b (diff) | |
download | mariadb-git-970ce270c9723478e72246563c3e0ac38a853eeb.tar.gz |
Merge 10.1 into 10.2
Disable the test encryption.innodb_encryption-page-compression
because the wait_condition would seem to time out deterministically.
MDEV-14814 has to be addressed in 10.2 separately.
Datafile::validate_first_page(): Do not invoke
page_size_t::page_size_t(flags) before validating the tablespace flags.
This avoids a crash in MDEV-15333 innodb.restart test case.
FIXME: Reduce the number of error messages. The first one is enough.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/fil/fil0fil.cc | 3 | ||||
-rw-r--r-- | storage/innobase/fsp/fsp0file.cc | 57 | ||||
-rw-r--r-- | storage/mroonga/vendor/groonga/lib/CMakeLists.txt | 5 | ||||
-rw-r--r-- | storage/xtradb/fil/fil0fil.cc | 12 |
4 files changed, 36 insertions, 41 deletions
diff --git a/storage/innobase/fil/fil0fil.cc b/storage/innobase/fil/fil0fil.cc index f3bb127020a..abcdb90c375 100644 --- a/storage/innobase/fil/fil0fil.cc +++ b/storage/innobase/fil/fil0fil.cc @@ -4215,7 +4215,8 @@ skip_validate: err = DB_ERROR; } - if (purpose != FIL_TYPE_IMPORT && !srv_read_only_mode) { + if (err == DB_SUCCESS && validate + && purpose != FIL_TYPE_IMPORT && !srv_read_only_mode) { df_remote.close(); df_dict.close(); df_default.close(); diff --git a/storage/innobase/fsp/fsp0file.cc b/storage/innobase/fsp/fsp0file.cc index eaadaad851d..6e9f307ebc8 100644 --- a/storage/innobase/fsp/fsp0file.cc +++ b/storage/innobase/fsp/fsp0file.cc @@ -516,8 +516,18 @@ Datafile::validate_first_page(lsn_t* flush_lsn) } } + if (error_txt != NULL) { +err_exit: + ib::error() << error_txt << " in datafile: " << m_filepath + << ", Space ID:" << m_space_id << ", Flags: " + << m_flags << ". " << TROUBLESHOOT_DATADICT_MSG; + m_is_valid = false; + free_first_page(); + return(DB_CORRUPTION); + } + /* Check if the whole page is blank. */ - if (error_txt == NULL && !m_space_id && !m_flags) { + if (!m_space_id && !m_flags) { const byte* b = m_first_page; ulint nonzero_bytes = UNIV_PAGE_SIZE; @@ -528,56 +538,45 @@ Datafile::validate_first_page(lsn_t* flush_lsn) if (nonzero_bytes == 0) { error_txt = "Header page consists of zero bytes"; + goto err_exit; } } - const page_size_t page_size(m_flags); - - if (error_txt != NULL) { + if (!fsp_flags_is_valid(m_flags, m_space_id)) { + /* Tablespace flags must be valid. */ + error_txt = "Tablespace flags are invalid"; + goto err_exit; + } - /* skip the next few tests */ - } else if (univ_page_size.logical() != page_size.logical()) { + const page_size_t page_size(m_flags); + if (univ_page_size.logical() != page_size.logical()) { /* Page size must be univ_page_size. */ - ib::error() << "Data file '" << m_filepath << "' uses page size " << page_size.logical() << ", but the innodb_page_size" " start-up parameter is " << univ_page_size.logical(); - free_first_page(); - return(DB_ERROR); - } else if (!fsp_flags_is_valid(m_flags, m_space_id)) { - /* Tablespace flags must be valid. */ - error_txt = "Tablespace flags are invalid"; - } else if (page_get_page_no(m_first_page) != 0) { + } + if (page_get_page_no(m_first_page) != 0) { /* First page must be number 0 */ error_txt = "Header page contains inconsistent data"; + goto err_exit; + } - } else if (m_space_id == ULINT_UNDEFINED) { - + if (m_space_id == ULINT_UNDEFINED) { /* The space_id can be most anything, except -1. */ error_txt = "A bad Space ID was found"; + goto err_exit; + } - } else if (buf_page_is_corrupted(false, m_first_page, page_size)) { - + if (buf_page_is_corrupted(false, m_first_page, page_size)) { /* Look for checksum and other corruptions. */ error_txt = "Checksum mismatch"; - } - - if (error_txt != NULL) { - ib::error() << error_txt << " in datafile: " << m_filepath - << ", Space ID:" << m_space_id << ", Flags: " - << m_flags << ". " << TROUBLESHOOT_DATADICT_MSG; - m_is_valid = false; - - free_first_page(); - - return(DB_CORRUPTION); - + goto err_exit; } if (fil_space_read_name_and_filepath( diff --git a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt index 6765261feb7..2274e95aa24 100644 --- a/storage/mroonga/vendor/groonga/lib/CMakeLists.txt +++ b/storage/mroonga/vendor/groonga/lib/CMakeLists.txt @@ -177,3 +177,8 @@ if(GRN_WITH_MRUBY) FILES ${EXPRESSION_TREE_RUBY_SCRIPTS} DESTINATION "${GRN_RELATIVE_RUBY_SCRIPTS_DIR}/expression_tree") endif() + +# Workaround GCC ICE on ARM64 +IF(CMAKE_COMPILER_IS_GNUCXX AND CMAKE_SYSTEM_PROCESSOR MATCHES "aarch64") + ADD_COMPILE_FLAGS(ts/ts_expr_node.c COMPILE_FLAGS "-fno-tree-loop-vectorize") +ENDIF() diff --git a/storage/xtradb/fil/fil0fil.cc b/storage/xtradb/fil/fil0fil.cc index 54e6a891424..7985700367d 100644 --- a/storage/xtradb/fil/fil0fil.cc +++ b/storage/xtradb/fil/fil0fil.cc @@ -4468,17 +4468,7 @@ cleanup_and_exit: mem_free(def.filepath); - /* We need to check fsp flags when no errors has happened and - server was not started on read only mode and tablespace validation - was requested or flags contain other table options except - low order bits to FSP_FLAGS_POS_PAGE_SSIZE position. - Note that flag comparison is pessimistic. Adjust is required - only when flags contain buggy MariaDB 10.1.0 - - MariaDB 10.1.20 flags. */ - if (err == DB_SUCCESS - && !srv_read_only_mode - && (validate - || flags >= (1U << FSP_FLAGS_POS_PAGE_SSIZE))) { + if (err == DB_SUCCESS && validate && !srv_read_only_mode) { fsp_flags_try_adjust(id, flags & ~FSP_FLAGS_MEM_MASK); } |