diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-18 16:47:03 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2021-08-18 16:47:03 +0300 |
commit | e4901d9523ab838ea13bb0278980f8707aa2c581 (patch) | |
tree | 745b7d89c28d3b34eed4adfd84a126b114ed74d8 | |
parent | 1b45e05ccefc6a00513516b8bc0fb41a42d1b695 (diff) | |
parent | da6f4d5164aae2642b1763577e1997d0098cc947 (diff) | |
download | mariadb-git-e4901d9523ab838ea13bb0278980f8707aa2c581.tar.gz |
Merge 10.2 into 10.3
-rw-r--r-- | mysql-test/suite/innodb/t/import_corrupted.test | 1 | ||||
-rw-r--r-- | sql/sql_lex.cc | 5 | ||||
-rw-r--r-- | storage/innobase/row/row0import.cc | 11 |
3 files changed, 10 insertions, 7 deletions
diff --git a/mysql-test/suite/innodb/t/import_corrupted.test b/mysql-test/suite/innodb/t/import_corrupted.test index b4701949f33..22b4bbbdc8b 100644 --- a/mysql-test/suite/innodb/t/import_corrupted.test +++ b/mysql-test/suite/innodb/t/import_corrupted.test @@ -65,3 +65,4 @@ ALTER TABLE t2 IMPORT TABLESPACE; DROP TABLE t2; --remove_file $MYSQLD_DATADIR/test/tmp.ibd +--remove_file $MYSQLD_DATADIR/test/tmp.cfg diff --git a/sql/sql_lex.cc b/sql/sql_lex.cc index 8de645a7197..8ee2afc3e00 100644 --- a/sql/sql_lex.cc +++ b/sql/sql_lex.cc @@ -2913,7 +2913,7 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num) prepared statement */ Query_arena *arena= thd->stmt_arena; - const uint n_elems= (n_sum_items + + const size_t n_elems= (n_sum_items + n_child_sum_items + item_list.elements + select_n_reserved + @@ -2921,7 +2921,8 @@ bool st_select_lex::setup_ref_array(THD *thd, uint order_group_num) select_n_where_fields + order_group_num + hidden_bit_fields + - fields_in_window_functions) * 5; + fields_in_window_functions) * (size_t) 5; + DBUG_ASSERT(n_elems % 5 == 0); if (!ref_pointer_array.is_null()) { /* diff --git a/storage/innobase/row/row0import.cc b/storage/innobase/row/row0import.cc index 1652f162e23..7751ac12dd8 100644 --- a/storage/innobase/row/row0import.cc +++ b/storage/innobase/row/row0import.cc @@ -689,9 +689,7 @@ dberr_t FetchIndexRootPages::operator()(buf_block_t* block) UNIV_NOTHROW const page_t* page = get_frame(block); - index_id_t id = btr_page_get_index_id(page); - - m_index.m_id = id; + m_index.m_id = btr_page_get_index_id(page); m_index.m_page_no = block->page.id.page_no(); /* Check that the tablespace flags match the table flags. */ @@ -1886,11 +1884,14 @@ PageConverter::update_index_page( if (is_free(block->page.id.page_no())) { return(DB_SUCCESS); - } else if ((id = btr_page_get_index_id(page)) != m_index->m_id && !m_cfg->m_missing) { - + } else if ((id = btr_page_get_index_id(page)) != m_index->m_id) { row_index_t* index = find_index(id); if (UNIV_UNLIKELY(!index)) { + if (m_cfg->m_missing) { + return DB_SUCCESS; + } + ib::error() << "Page for tablespace " << m_space << " is index page with id " << id << " but that index is not found from" |