diff options
author | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-12 06:34:09 +0300 |
---|---|---|
committer | Marko Mäkelä <marko.makela@mariadb.com> | 2019-10-12 06:34:09 +0300 |
commit | 8e3d85e112964c4f7c2d07710a3c8ee9d5041685 (patch) | |
tree | 163e1563442a228221a810093656d4d3844063b2 /storage | |
parent | 0ecc85c5d972590628d76594c805c13a5f9d3a88 (diff) | |
parent | 2227dec45e68b57f3d7759c977e16bea1533e810 (diff) | |
download | mariadb-git-8e3d85e112964c4f7c2d07710a3c8ee9d5041685.tar.gz |
Merge 10.2 into 10.3
Diffstat (limited to 'storage')
-rw-r--r-- | storage/innobase/buf/buf0dblwr.cc | 10 | ||||
-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/row/row0purge.cc | 21 | ||||
-rw-r--r-- | storage/innobase/row/row0vers.cc | 1 | ||||
-rw-r--r-- | storage/innobase/srv/srv0srv.cc | 83 | ||||
-rw-r--r-- | storage/innobase/trx/trx0purge.cc | 8 | ||||
-rw-r--r-- | storage/tokudb/mysql-test/tokudb_parts/r/partition_debug_tokudb.result | 168 |
12 files changed, 268 insertions, 99 deletions
diff --git a/storage/innobase/buf/buf0dblwr.cc b/storage/innobase/buf/buf0dblwr.cc index 6e5dee67714..3f998165ccc 100644 --- a/storage/innobase/buf/buf0dblwr.cc +++ b/storage/innobase/buf/buf0dblwr.cc @@ -1,7 +1,7 @@ /***************************************************************************** Copyright (c) 1995, 2017, Oracle and/or its affiliates. All Rights Reserved. -Copyright (c) 2013, 2018, MariaDB Corporation. +Copyright (c) 2013, 2019, 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 @@ -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 fffeafbdf8c..ae56fdae9ab 100644 --- a/storage/innobase/buf/buf0flu.cc +++ b/storage/innobase/buf/buf0flu.cc @@ -855,7 +855,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 d254da182ff..6dc01f9297b 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -18573,6 +18573,33 @@ 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} @@ -19025,7 +19052,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, @@ -20092,6 +20120,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, @@ -20303,6 +20341,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 4dbd9f8ff1a..62aabe895b7 100644 --- a/storage/innobase/ibuf/ibuf0ibuf.cc +++ b/storage/innobase/ibuf/ibuf0ibuf.cc @@ -1987,14 +1987,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 b7d2aae2c1b..66dc00f5d10 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 e35aa90331b..4644c1b8a0b 100644 --- a/storage/innobase/include/srv0srv.h +++ b/storage/innobase/include/srv0srv.h @@ -592,6 +592,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; @@ -1105,8 +1107,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 71e0b78a105..4bc5aded341 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/row/row0purge.cc b/storage/innobase/row/row0purge.cc index 89e336e1724..8c83482f53e 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 @@ -1306,6 +1307,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 d130054b86a..556329e138e 100644 --- a/storage/innobase/srv/srv0srv.cc +++ b/storage/innobase/srv/srv0srv.cc @@ -594,7 +594,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 @@ -642,11 +643,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 @@ -794,7 +799,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) { @@ -2458,8 +2463,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); @@ -2470,6 +2476,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); my_atomic_addlint(&purge_sys.n_completed, 1); return true; @@ -2506,6 +2513,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(my_atomic_loadlint(&srv_sys.n_threads_active[SRV_WORKER])) < srv_n_purge_threads); @@ -2518,7 +2532,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. */ @@ -2548,9 +2562,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 -ulint -srv_do_purge(ulint* n_total_purged) +static ulint srv_do_purge(ulint* n_total_purged +#ifdef UNIV_DEBUG + , srv_slot_t* slot /*!< purge coordinator */ +#endif + ) { ulint n_pages_purged; @@ -2616,7 +2632,11 @@ srv_do_purge(ulint* n_total_purged) n_pages_purged = trx_purge( n_use_threads, - (++count % rseg_truncate_frequency) == 0); + (++count % rseg_truncate_frequency) == 0 +#ifdef UNIV_DEBUG + , slot +#endif + ); *n_total_purged += n_pages_purged; } while (n_pages_purged > 0 && !purge_sys.paused() @@ -2624,6 +2644,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. */ @@ -2718,6 +2741,12 @@ 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 { @@ -2739,7 +2768,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 @@ -2897,3 +2926,33 @@ srv_was_tablespace_truncated(const fil_space_t* space) return (!is_system_tablespace(space->id) && truncate_t::was_tablespace_truncated(space->id)); } + +#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 475babb6195..3ae8db63121 100644 --- a/storage/innobase/trx/trx0purge.cc +++ b/storage/innobase/trx/trx0purge.cc @@ -1561,7 +1561,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; @@ -1597,6 +1602,7 @@ trx_purge( thr = que_fork_scheduler_round_robin(purge_sys.query, thr); + ut_d(thr->thread_slot = slot); que_run_threads(thr); my_atomic_addlint(&purge_sys.n_completed, 1); 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; |