diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-12 22:06:47 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-12 22:06:47 +0300 |
commit | 833637144178dcae60e7bb732dd373679f32d853 (patch) | |
tree | e46a595a7a554e7064517d2caae5585f62339eac /storage | |
parent | 6860d6f8be90994ea2956cecffb235754a5821a2 (diff) | |
parent | 899c843f11bc40bf4734b61f18bd1d1e5c8d61e5 (diff) | |
download | mariadb-git-833637144178dcae60e7bb732dd373679f32d853.tar.gz |
Merge 10.4 into 10.5
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/buf/buf0dblwr.cc | 8 | ||||
-rw-r--r-- | storage/innobase/buf/buf0flu.cc | 2 | ||||
-rw-r--r-- | storage/innobase/handler/ha_innodb.cc | 41 | ||||
-rw-r--r-- | storage/innobase/ibuf/ibuf0ibuf.cc | 6 | ||||
-rw-r--r-- | storage/innobase/include/que0que.h | 3 | ||||
-rw-r--r-- | storage/innobase/include/srv0srv.h | 17 | ||||
-rw-r--r-- | storage/innobase/include/trx0purge.h | 7 | ||||
-rw-r--r-- | storage/innobase/rem/rem0rec.cc | 4 | ||||
-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 | 85 | ||||
-rw-r--r-- | storage/innobase/trx/trx0purge.cc | 8 | ||||
-rw-r--r-- | storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result | 168 |
13 files changed, 271 insertions, 100 deletions
diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index acd2a89e57c..791b5614fc2 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -264,6 +264,13 @@ too_small: ut_ad(rw_lock_get_x_lock_count(&new_block->lock) == 1); page_no = new_block->page.id.page_no(); + /* We only do this in the debug build, to ensure that + both the check in buf_flush_init_for_writing() and + recv_parse_or_apply_log_rec_body() will see a valid + page type. The flushes of new_block are actually + unnecessary here. */ + ut_d(mlog_write_ulint(FIL_PAGE_TYPE + new_block->frame, + FIL_PAGE_TYPE_SYS, MLOG_2BYTES, &mtr)); if (i == FSP_EXTENT_SIZE / 2) { ut_a(page_no == FSP_EXTENT_SIZE); @@ -326,6 +333,7 @@ too_small: /* Flush the modified pages to disk and make a checkpoint */ log_make_checkpoint(); + buf_dblwr_being_created = FALSE; /* Remove doublewrite pages from LRU */ buf_pool_invalidate(); diff --git a/storage/innobase/buf/buf0flu.cc b/storage/innobase/buf/buf0flu.cc index 2093f789970..5a589936e5f 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -788,7 +788,9 @@ buf_flush_init_for_writing( ut_ad(block == NULL || block->frame == page); ut_ad(block == NULL || page_zip_ == NULL || &block->page.zip == page_zip_); + ut_ad(!block || newest_lsn); ut_ad(page); + ut_ad(!newest_lsn || fil_page_get_type(page)); if (page_zip_) { page_zip_des_t* page_zip; diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index eb1fcb577cf..617cc72d0f9 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -18241,6 +18241,33 @@ innodb_undo_logs_warn(THD* thd, st_mysql_sys_var*, void*, const void*) innodb_undo_logs_deprecated); } +#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} @@ -18529,7 +18556,8 @@ static MYSQL_SYSVAR_ULONG(purge_threads, srv_n_purge_threads, NULL, NULL, 4, /* Default setting */ 1, /* Minimum value */ - 32, 0); /* Maximum value */ + srv_max_purge_threads,/* Maximum value */ + 0); static MYSQL_SYSVAR_ULONG(sync_array_size, srv_sync_array_size, PLUGIN_VAR_OPCMDARG | PLUGIN_VAR_READONLY, @@ -19566,6 +19594,16 @@ 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, @@ -19772,6 +19810,7 @@ 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/ibuf/ibuf0ibuf.cc b/storage/innobase/ibuf/ibuf0ibuf.cc index f10a27d6683..460359a96b4 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -1920,14 +1920,14 @@ ibuf_add_free_page(void) buf_block_dbg_add_level(block, SYNC_IBUF_TREE_NODE_NEW); page = buf_block_get_frame(block); + mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_IBUF_FREE_LIST, + MLOG_2BYTES, &mtr); + /* Add the page to the free list and update the ibuf size data */ flst_add_last(root + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST, page + PAGE_HEADER + PAGE_BTR_IBUF_FREE_LIST_NODE, &mtr); - mlog_write_ulint(page + FIL_PAGE_TYPE, FIL_PAGE_IBUF_FREE_LIST, - MLOG_2BYTES, &mtr); - ibuf.seg_size++; ibuf.free_list_len++; diff --git a/storage/innobase/include/que0que.h b/storage/innobase/include/que0que.h index 01572e2a026..4b52e55a047 100644 --- a/storage/innobase/include/que0que.h +++ b/storage/innobase/include/que0que.h @@ -378,6 +378,9 @@ struct que_thr_t{ related delete/updates */ row_prebuilt_t* prebuilt; /*!< prebuilt structure processed by the query thread */ + + /** a slot of srv_sys.sys_threads, for DEBUG_SYNC in purge thread */ + ut_d(srv_slot_t* thread_slot;) }; #define QUE_THR_MAGIC_N 8476583 diff --git a/storage/innobase/include/srv0srv.h b/storage/innobase/include/srv0srv.h index 87094785dde..673c5c1091e 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -590,6 +590,8 @@ extern ulong srv_fatal_semaphore_wait_threshold; /** Buffer pool dump status frequence in percentages */ extern ulong srv_buf_dump_status_frequency; +#define srv_max_purge_threads 32 + # ifdef UNIV_PFS_THREAD /* Keys to register InnoDB threads with performance schema */ extern mysql_pfs_key_t buf_dump_thread_key; @@ -1097,8 +1099,23 @@ 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 +typedef void srv_slot_callback_t(srv_slot_t*, const void*); + +void srv_for_each_thread(srv_thread_type type, + srv_slot_callback_t callback, + const void *arg); +#endif + #ifdef WITH_WSREP UNIV_INTERN void diff --git a/storage/innobase/include/trx0purge.h b/storage/innobase/include/trx0purge.h index 0b3cf6bc724..7c3343ce7d2 100644 --- a/storage/innobase/include/trx0purge.h +++ b/storage/innobase/include/trx0purge.h @@ -61,7 +61,12 @@ trx_purge( /*======*/ ulint n_purge_threads, /*!< in: number of purge tasks to submit to task queue. */ - bool truncate); /*!< in: truncate history if true */ + bool truncate /*!< in: truncate history if true */ +#ifdef UNIV_DEBUG + , srv_slot_t *slot /*!< in/out: purge coordinator + thread slot */ +#endif +); /** Rollback segements from a given transaction with trx-no scheduled for purge. */ diff --git a/storage/innobase/rem/rem0rec.cc b/storage/innobase/rem/rem0rec.cc index 043a71733a5..1f0f661448c 100644 --- a/storage/innobase/rem/rem0rec.cc +++ b/storage/innobase/rem/rem0rec.cc @@ -788,7 +788,9 @@ resolved: } if (i < rec_offs_n_fields(offsets)) { - ut_ad(index->is_instant()); + ut_ad(index->is_instant() + || i + (index->id == DICT_INDEXES_ID) + == rec_offs_n_fields(offsets)); offs = (rec_offs_base(offsets)[i] & REC_OFFS_MASK) | REC_OFFS_DEFAULT; diff --git a/storage/innobase/row/row0purge.cc b/storage/innobase/row/row0purge.cc index 04dfcbad0d3..8a6bd674126 100644 --- a/storage/innobase/row/row0purge.cc +++ b/storage/innobase/row/row0purge.cc @@ -46,6 +46,7 @@ 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 @@ -1310,6 +1311,26 @@ 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 04237b8f7a4..b662ce92f28 100644 --- a/storage/innobase/row/row0vers.cc +++ b/storage/innobase/row/row0vers.cc @@ -464,6 +464,7 @@ 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 5638b783224..5da83f51b29 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -577,7 +577,8 @@ struct srv_sys_t{ ulint n_sys_threads; /*!< size of the sys_threads array */ - srv_slot_t sys_threads[32 + 1]; /*!< server thread table; + srv_slot_t + sys_threads[srv_max_purge_threads + 1]; /*!< server thread table; os_event_set() and os_event_reset() on sys_threads[]->event are @@ -626,11 +627,15 @@ and/or load it during startup. */ char srv_buffer_pool_dump_at_shutdown = TRUE; char srv_buffer_pool_load_at_startup = TRUE; +/** Slot index in the srv_sys.sys_threads array for the master thread. */ +#define SRV_MASTER_SLOT 0 + /** Slot index in the srv_sys.sys_threads array for the purge thread. */ -static const ulint SRV_PURGE_SLOT = 1; +#define SRV_PURGE_SLOT 1 -/** Slot index in the srv_sys.sys_threads array for the master thread. */ -static const ulint SRV_MASTER_SLOT = 0; +/** Slot index in the srv_sys.sys_threads array from which purge workers start. + */ +#define SRV_WORKER_SLOTS_START 2 #ifdef HAVE_PSI_STAGE_INTERFACE /** Performance schema stage event for monitoring ALTER TABLE progress @@ -778,7 +783,7 @@ srv_reserve_slot( case SRV_WORKER: /* Find an empty slot, skip the master and purge slots. */ - for (slot = &srv_sys.sys_threads[2]; + for (slot = &srv_sys.sys_threads[SRV_WORKER_SLOTS_START]; slot->in_use; ++slot) { @@ -2461,8 +2466,9 @@ static bool srv_purge_should_exit() /*********************************************************************//** Fetch and execute a task from the work queue. +@param [in,out] slot purge worker thread slot @return true if a task was executed */ -static bool srv_task_execute() +static bool srv_task_execute(ut_d(srv_slot_t *slot)) { ut_ad(!srv_read_only_mode); ut_ad(srv_force_recovery < SRV_FORCE_NO_BACKGROUND); @@ -2473,6 +2479,7 @@ static bool srv_task_execute() ut_a(que_node_get_type(thr->child) == QUE_NODE_PURGE); UT_LIST_REMOVE(srv_sys.tasks, thr); mutex_exit(&srv_sys.tasks_mutex); + ut_d(thr->thread_slot = slot); que_run_threads(thr); purge_sys.n_tasks.fetch_sub(1, std::memory_order_release); return true; @@ -2509,6 +2516,13 @@ 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(srv_sys.n_threads_active[SRV_WORKER]) < srv_n_purge_threads); @@ -2521,7 +2535,7 @@ DECLARE_THREAD(srv_worker_thread)( srv_suspend_thread(slot); srv_resume_thread(slot); - if (srv_task_execute()) { + if (srv_task_execute(ut_d(slot))) { /* If there are tasks in the queue, wakeup the purge coordinator thread. */ @@ -2551,9 +2565,11 @@ DECLARE_THREAD(srv_worker_thread)( /** Do the actual purge operation. @param[in,out] n_total_purged total number of purged pages @return length of history list before the last purge batch. */ -static -uint32_t -srv_do_purge(ulint* n_total_purged) +static uint32_t srv_do_purge(ulint* n_total_purged +#ifdef UNIV_DEBUG + , srv_slot_t* slot /*!< purge coordinator */ +#endif + ) { ulint n_pages_purged; @@ -2613,7 +2629,11 @@ srv_do_purge(ulint* n_total_purged) n_pages_purged = trx_purge( n_use_threads, !(++count % srv_purge_rseg_truncate_frequency) - || purge_sys.truncate.current); + || purge_sys.truncate.current +#ifdef UNIV_DEBUG + , slot +#endif + ); *n_total_purged += n_pages_purged; } while (n_pages_purged > 0 && !purge_sys.paused() @@ -2621,6 +2641,9 @@ srv_do_purge(ulint* n_total_purged) return(rseg_history_len); } +#ifndef UNIV_DEBUG +# define srv_do_purge(n_total_purged, slot) srv_do_purge(n_total_purged) +#endif /*********************************************************************//** Suspend the purge coordinator thread. */ @@ -2715,7 +2738,13 @@ DECLARE_THREAD(srv_purge_coordinator_thread)( slot = srv_reserve_slot(SRV_PURGE); - uint32_t rseg_history_len = trx_sys.rseg_history_len; +#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 + uint32_t rseg_history_len = trx_sys.rseg_history_len; do { /* If there are no records to purge or the last @@ -2736,7 +2765,7 @@ DECLARE_THREAD(srv_purge_coordinator_thread)( n_total_purged = 0; - rseg_history_len = srv_do_purge(&n_total_purged); + rseg_history_len = srv_do_purge(&n_total_purged, slot); } while (!srv_purge_should_exit()); /* The task queue should always be empty, independent of fast @@ -2852,3 +2881,33 @@ void srv_purge_shutdown() srv_purge_wakeup(); } while (srv_sys.sys_threads[SRV_PURGE_SLOT].in_use); } + +#ifdef UNIV_DEBUG +static ulint get_first_slot(srv_thread_type type) +{ + switch (type) { + case SRV_MASTER: + return SRV_MASTER_SLOT; + case SRV_PURGE: + return SRV_PURGE_SLOT; + case SRV_WORKER: + /* Find an empty slot, skip the master and purge slots. */ + return SRV_WORKER_SLOTS_START; + default: + ut_error; + } +} + +void srv_for_each_thread(srv_thread_type type, + srv_slot_callback_t callback, + const void *arg) +{ + for (ulint slot_idx= get_first_slot(type); + slot_idx < srv_sys.n_sys_threads + && srv_sys.sys_threads[slot_idx].in_use + && srv_sys.sys_threads[slot_idx].type == type; + slot_idx++) { + callback(&srv_sys.sys_threads[slot_idx], arg); + } +} +#endif diff --git a/storage/innobase/trx/trx0purge.cc b/storage/innobase/trx/trx0purge.cc index d7efb4c7033..8dd17ce4509 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -1278,7 +1278,12 @@ trx_purge( /*======*/ ulint n_purge_threads, /*!< in: number of purge tasks to submit to the work queue */ - bool truncate) /*!< in: truncate history if true */ + bool truncate /*!< in: truncate history if true */ +#ifdef UNIV_DEBUG + , srv_slot_t *slot /*!< in/out: purge coordinator + thread slot */ +#endif +) { que_thr_t* thr = NULL; ulint n_pages_handled; @@ -1313,6 +1318,7 @@ trx_purge( thr = que_fork_scheduler_round_robin(purge_sys.query, thr); + ut_d(thr->thread_slot = slot); que_run_threads(thr); trx_purge_wait_for_workers_to_complete(); diff --git a/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result b/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result index 125155bad9f..ae95fc691a4 100644 --- a/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result +++ b/storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result @@ -12,6 +12,7 @@ call mtr.add_suppression("TokuDB: Warning: MySQL is trying to drop table "); call mtr.add_suppression("Attempting backtrace. You can use the following information to find out"); flush tables; # Crash testing ADD PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_add_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -73,7 +74,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -137,7 +138,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -201,7 +202,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -265,7 +266,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -329,7 +330,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -393,7 +394,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -457,7 +458,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -522,7 +523,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -585,7 +586,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_add_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -648,8 +649,9 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_add_partition_10"; +SET SESSION debug_dbug=@save_dbug; # Error recovery testing ADD PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_add_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -766,7 +768,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -883,7 +885,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1000,7 +1002,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1117,7 +1119,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1234,7 +1236,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1351,7 +1353,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1468,7 +1470,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1587,7 +1589,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1706,7 +1708,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_add_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1825,8 +1827,9 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_add_partition_10"; +SET SESSION debug_dbug=@save_dbug; # Test DROP PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1887,7 +1890,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -1950,7 +1953,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2013,7 +2016,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2071,7 +2074,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2129,7 +2132,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2187,7 +2190,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2243,7 +2246,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2299,7 +2302,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_drop_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2355,8 +2358,9 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_drop_partition_9"; +SET SESSION debug_dbug=@save_dbug; # Error recovery DROP PARTITION +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2471,7 +2475,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2586,7 +2590,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2701,7 +2705,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2806,7 +2810,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -2911,7 +2915,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3016,7 +3020,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3121,7 +3125,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3226,7 +3230,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_drop_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3331,9 +3335,10 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_drop_partition_9"; +SET SESSION debug_dbug=@save_dbug; # Test change partition (REORGANIZE/REBUILD/COALESCE # or ADD HASH PARTITION). +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,crash_change_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3396,7 +3401,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3461,7 +3466,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3526,7 +3531,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3591,7 +3596,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3656,7 +3661,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3721,7 +3726,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3787,7 +3792,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3853,7 +3858,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3917,7 +3922,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -3981,7 +3986,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_10"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_11"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4045,7 +4050,7 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_11"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,crash_change_partition_12"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4109,9 +4114,10 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t1; -SET SESSION debug_dbug="-d,crash_change_partition_12"; +SET SESSION debug_dbug=@save_dbug; # Error recovery change partition (REORGANIZE/REBUILD/COALESCE # or ADD HASH PARTITION). +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,fail_change_partition_1"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4230,7 +4236,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_2"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4349,7 +4355,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_3"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4468,7 +4474,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_4"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4587,7 +4593,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_5"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4706,7 +4712,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_6"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4825,7 +4831,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_7"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -4946,7 +4952,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_8"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -5067,7 +5073,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_9"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -5188,7 +5194,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_9"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_10"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -5309,7 +5315,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_10"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_11"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -5430,7 +5436,7 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_11"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,fail_change_partition_12"; CREATE TABLE t1 (a INT, b VARCHAR(64)) ENGINE = 'TokuDB' @@ -5551,13 +5557,14 @@ a b 4 Original from partition p0 UNLOCK TABLES; DROP TABLE t1; -SET SESSION debug_dbug="-d,fail_change_partition_12"; +SET SESSION debug_dbug=@save_dbug; # # WL#4445: EXCHANGE PARTITION WITH TABLE # Verify ddl_log and TokuDB in case of crashing. call mtr.add_suppression("TokuDB: Warning: allocated tablespace .*, old maximum was "); call mtr.add_suppression("Attempting backtrace. You can use the following information to find out"); call mtr.add_suppression("table .* does not exist in the TokuDB internal"); +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_1"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -5656,7 +5663,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_2"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -5755,7 +5762,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_3"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -5854,7 +5861,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_4"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -5953,7 +5960,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_5"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6052,7 +6059,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_6"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6151,7 +6158,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_7"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6250,7 +6257,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_8"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6349,7 +6356,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_abort_9"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6448,7 +6455,8 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_abort_9"; +SET SESSION debug_dbug=@save_dbug; +SET @save_dbug=@@debug_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_1"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6542,7 +6550,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_1"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_2"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6636,7 +6644,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_2"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_3"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6730,7 +6738,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_3"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_4"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6824,7 +6832,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_4"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_5"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -6918,7 +6926,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_5"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_6"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7012,7 +7020,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_6"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_7"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7106,7 +7114,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_7"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_8"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7200,7 +7208,7 @@ a b 7 Original from table t2 8 Original from table t2 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_8"; +SET SESSION debug_dbug=@save_dbug; SET SESSION debug_dbug="+d,exchange_partition_fail_9"; CREATE TABLE t2 (a INT, b VARCHAR(64)) ENGINE = TokuDB; INSERT INTO t2 VALUES (5, "Original from table t2"), (6, "Original from table t2"), (7, "Original from table t2"), (8, "Original from table t2"); @@ -7294,4 +7302,4 @@ a b 3 Original from partition p0 4 Original from partition p0 DROP TABLE t2; -SET SESSION debug_dbug="-d,exchange_partition_fail_9"; +SET SESSION debug_dbug=@save_dbug; |