diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2020-05-15 17:55:01 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2020-05-15 17:55:01 +0300 |
commit | 6a6bcc53b8767dfbb4dc86bad3e90a276c55f605 (patch) | |
tree | 04116d0e438cfcf3a3b6a7557d5ec8c570255db6 /storage/innobase | |
parent | 3eadb135fd7b7e2d40fd6b9a819ac3245043f781 (diff) | |
parent | ff66d65a096ec02dda1ab449d84a40361551085c (diff) | |
download | mariadb-git-6a6bcc53b8767dfbb4dc86bad3e90a276c55f605.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'storage/innobase')
-rw-r--r-- | storage/innobase/btr/btr0cur.cc | 2 | ||||
-rw-r--r-- | storage/innobase/buf/buf0buf.cc | 8 | ||||
-rw-r--r-- | storage/innobase/fil/fil0pagecompress.cc | 1 | ||||
-rw-r--r-- | storage/innobase/fsp/fsp0fsp.cc | 7 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 38 | ||||
-rw-r--r-- | storage/innobase/include/srv0srv.h | 7 | ||||
-rw-r--r-- | storage/innobase/row/row0purge.cc | 21 | ||||
-rw-r--r-- | storage/innobase/row/row0vers.cc | 1 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 13 |
9 files changed, 11 insertions, 87 deletions
diff --git a/storage/innobase/btr/btr0cur.cc b/storage/innobase/btr/btr0cur.cc index 782d0334c7b..a2364299135 100644 --- a/storage/innobase/btr/btr0cur.cc +++ b/storage/innobase/btr/btr0cur.cc @@ -3273,7 +3273,7 @@ btr_cur_optimistic_insert( page_t* page; rec_t* dummy; bool leaf; - bool reorg; + bool reorg __attribute__((unused)); bool inherit = true; ulint rec_size; dberr_t err; diff --git a/storage/innobase/buf/buf0buf.cc b/storage/innobase/buf/buf0buf.cc index 162f297de5f..3a0162a395a 100644 --- a/storage/innobase/buf/buf0buf.cc +++ b/storage/innobase/buf/buf0buf.cc @@ -6109,9 +6109,8 @@ buf_page_io_complete(buf_page_t* bpage, bool dblwr, bool evict) err = buf_page_check_corrupt(bpage, space); -database_corrupted: - if (err != DB_SUCCESS) { +database_corrupted: /* Not a real corruption if it was triggered by error injection */ DBUG_EXECUTE_IF( @@ -6128,6 +6127,11 @@ database_corrupted: goto page_not_corrupt; ); + if (uncompressed && bpage->zip.data) { + memset(reinterpret_cast<buf_block_t*>(bpage) + ->frame, 0, srv_page_size); + } + if (err == DB_PAGE_CORRUPTED) { ib::error() << "Database page corruption on disk" diff --git a/storage/innobase/fil/fil0pagecompress.cc b/storage/innobase/fil/fil0pagecompress.cc index 3c24f1c6886..7ded1a226f3 100644 --- a/storage/innobase/fil/fil0pagecompress.cc +++ b/storage/innobase/fil/fil0pagecompress.cc @@ -27,7 +27,6 @@ Updated 14/02/2015 #include "fil0fil.h" #include "fil0pagecompress.h" -#include <debug_sync.h> #include <my_dbug.h> #include "mem0mem.h" diff --git a/storage/innobase/fsp/fsp0fsp.cc b/storage/innobase/fsp/fsp0fsp.cc index 6942b1f4730..bdea6b78bc4 100644 --- a/storage/innobase/fsp/fsp0fsp.cc +++ b/storage/innobase/fsp/fsp0fsp.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2016, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2017, 2019, 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 @@ -3007,7 +3007,6 @@ fseg_free_extent( #endif /* BTR_CUR_HASH_ADAPT */ mtr_t* mtr) { - ulint first_page_in_extent; xdes_t* descr; ulint not_full_n_used; ulint descr_n_used; @@ -3022,7 +3021,9 @@ fseg_free_extent( == FSEG_MAGIC_N_VALUE); ut_d(space->modify_check(*mtr)); - first_page_in_extent = page - (page % FSP_EXTENT_SIZE); +#if defined BTR_CUR_HASH_ADAPT || defined UNIV_DEBUG + const ulint first_page_in_extent = page - (page % FSP_EXTENT_SIZE); +#endif /* BTR_CUR_HASH_ADAPT || UNIV_DEBUG */ #ifdef BTR_CUR_HASH_ADAPT if (ahi) { diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 3785e4eb299..b4204764c55 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -18746,33 +18746,6 @@ innodb_log_checksums_update(THD* thd, st_mysql_sys_var*, void* var_ptr, thd, *static_cast<const my_bool*>(save)); } -#ifdef UNIV_DEBUG -static -void -innobase_debug_sync_callback(srv_slot_t *slot, const void *value) -{ - const char *value_str = *static_cast<const char* const*>(value); - size_t len = strlen(value_str) + 1; - - - // One allocatoin for list node object and value. - void *buf = ut_malloc_nokey(sizeof(srv_slot_t::debug_sync_t) + len); - srv_slot_t::debug_sync_t *sync = new(buf) srv_slot_t::debug_sync_t(); - strcpy(reinterpret_cast<char*>(&sync[1]), value_str); - - rw_lock_x_lock(&slot->debug_sync_lock); - UT_LIST_ADD_LAST(slot->debug_sync, sync); - rw_lock_x_unlock(&slot->debug_sync_lock); -} -static -void -innobase_debug_sync_set(THD *thd, st_mysql_sys_var*, void *, const void *value) -{ - srv_for_each_thread(SRV_WORKER, innobase_debug_sync_callback, value); - srv_for_each_thread(SRV_PURGE, innobase_debug_sync_callback, value); -} -#endif - static SHOW_VAR innodb_status_variables_export[]= { {"Innodb", (char*) &show_innodb_vars, SHOW_FUNC}, {NullS, NullS, SHOW_LONG} @@ -20305,16 +20278,6 @@ static MYSQL_SYSVAR_BOOL(debug_force_scrubbing, 0, "Perform extra scrubbing to increase test exposure", NULL, NULL, FALSE); - -char *innobase_debug_sync; -static MYSQL_SYSVAR_STR(debug_sync, innobase_debug_sync, - PLUGIN_VAR_NOCMDARG, - "debug_sync for innodb purge threads. " - "Use it to set up sync points for all purge threads " - "at once. The commands will be applied sequentially at " - "the beginning of purging the next undo record.", - NULL, - innobase_debug_sync_set, NULL); #endif /* UNIV_DEBUG */ static MYSQL_SYSVAR_BOOL(encrypt_temporary_tables, innodb_encrypt_temporary_tables, @@ -20528,7 +20491,6 @@ static struct st_mysql_sys_var* innobase_system_variables[]= { MYSQL_SYSVAR(background_scrub_data_check_interval), #ifdef UNIV_DEBUG MYSQL_SYSVAR(debug_force_scrubbing), - MYSQL_SYSVAR(debug_sync), #endif MYSQL_SYSVAR(buf_dump_status_frequency), MYSQL_SYSVAR(background_thread), diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 76a44838f77..6c575733710 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -1124,13 +1124,6 @@ struct srv_slot_t{ to do */ que_thr_t* thr; /*!< suspended query thread (only used for user threads) */ -#ifdef UNIV_DEBUG - struct debug_sync_t { - UT_LIST_NODE_T(debug_sync_t) debug_sync_list; - }; - UT_LIST_BASE_NODE_T(debug_sync_t) debug_sync; - rw_lock_t debug_sync_lock; -#endif }; #ifdef UNIV_DEBUG diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index ab88e2ed6bb..56253b73006 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -46,7 +46,6 @@ Created 3/14/1997 Heikki Tuuri #include "handler.h" #include "ha_innodb.h" #include "fil0fil.h" -#include "debug_sync.h" /************************************************************************* IMPORTANT NOTE: Any operation that generates redo MUST check that there @@ -1306,26 +1305,6 @@ row_purge_step( node->start(); -#ifdef UNIV_DEBUG - srv_slot_t *slot = thr->thread_slot; - ut_ad(slot); - - rw_lock_x_lock(&slot->debug_sync_lock); - while (UT_LIST_GET_LEN(slot->debug_sync)) { - srv_slot_t::debug_sync_t *sync = - UT_LIST_GET_FIRST(slot->debug_sync); - const char* sync_str = reinterpret_cast<char*>(&sync[1]); - bool result = debug_sync_set_action(current_thd, - sync_str, - strlen(sync_str)); - ut_a(!result); - - UT_LIST_REMOVE(slot->debug_sync, sync); - ut_free(sync); - } - rw_lock_x_unlock(&slot->debug_sync_lock); -#endif - if (!(node->undo_recs == NULL || ib_vector_is_empty(node->undo_recs))) { trx_purge_rec_t*purge_rec; diff --git a/storage/innobase/row/row0vers.cc b/storage/innobase/row/row0vers.cc index 5ebc25863ff..4bbe0c8d717 100644 --- a/storage/innobase/row/row0vers.cc +++ b/storage/innobase/row/row0vers.cc @@ -465,7 +465,6 @@ row_vers_build_clust_v_col( vcol_info->set_used(); maria_table = vcol_info->table(); } - DEBUG_SYNC(current_thd, "ib_clust_v_col_before_row_allocated"); innobase_allocate_row_for_vcol(thd, index, &local_heap, diff --git a/storage/innobase/srv/srv0srv.cc b/storage/innobase/srv/srv0srv.cc index 6e7b3e5939f..5a38ce4908e 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -2515,13 +2515,6 @@ DECLARE_THREAD(srv_worker_thread)( slot = srv_reserve_slot(SRV_WORKER); -#ifdef UNIV_DEBUG - UT_LIST_INIT(slot->debug_sync, - &srv_slot_t::debug_sync_t::debug_sync_list); - rw_lock_create(PFS_NOT_INSTRUMENTED, &slot->debug_sync_lock, - SYNC_NO_ORDER_CHECK); -#endif - ut_a(srv_n_purge_threads > 1); ut_a(ulong(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER])) < srv_n_purge_threads); @@ -2743,12 +2736,6 @@ DECLARE_THREAD(srv_purge_coordinator_thread)( slot = srv_reserve_slot(SRV_PURGE); -#ifdef UNIV_DEBUG - UT_LIST_INIT(slot->debug_sync, - &srv_slot_t::debug_sync_t::debug_sync_list); - rw_lock_create(PFS_NOT_INSTRUMENTED, &slot->debug_sync_lock, - SYNC_NO_ORDER_CHECK); -#endif ulint rseg_history_len = trx_sys.history_size(); do { |