diff options
24 files changed, 86 insertions, 83 deletions
diff --git a/extra/mariabackup/xtrabackup.cc b/extra/mariabackup/xtrabackup.cc index 016ddb6c60f..338706b3113 100644 --- a/extra/mariabackup/xtrabackup.cc +++ b/extra/mariabackup/xtrabackup.cc @@ -5070,7 +5070,7 @@ handle_options(int argc, char **argv, char ***argv_client, char ***argv_server) setup_error_messages(); sys_var_init(); plugin_mutex_init(); - mysql_rwlock_init(key_rwlock_LOCK_system_variables_hash, &LOCK_system_variables_hash); + mysql_prlock_init(key_rwlock_LOCK_system_variables_hash, &LOCK_system_variables_hash); opt_stack_trace = 1; test_flags |= TEST_SIGINT; init_signals(); diff --git a/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result b/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result index 81fae57d731..cdf330643c2 100644 --- a/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result +++ b/mysql-test/suite/galera/r/galera_gtid_slave_sst_rsync.result @@ -1,6 +1,9 @@ +connect node_2a, 127.0.0.1, root, , test, $NODE_MYPORT_2; #Connection 2 +connection node_2; START SLAVE; #Connection 1 +connection node_1; CREATE TABLE t2 (f1 INTEGER PRIMARY KEY, f2 int unique) ENGINE=InnoDB; INSERT INTO t2 VALUES(1,11); INSERT INTO t2 VALUES(2,22); @@ -10,6 +13,7 @@ SELECT @@global.gtid_binlog_state; 1-1-4 include/save_master_gtid.inc #Connection 2 +connection node_2; include/sync_with_master_gtid.inc SELECT @@global.gtid_binlog_state; @@global.gtid_binlog_state @@ -21,12 +25,14 @@ SELECT @@global.gtid_binlog_state; @@global.gtid_binlog_state 1-1-4,2-2-3 #Connection 3 +connect node_3, 127.0.0.1, root, , test, $NODE_MYPORT_3; INSERT INTO t2 VALUES(7,77); INSERT INTO t2 VALUES(8,88); SELECT @@global.gtid_binlog_state; @@global.gtid_binlog_state 1-1-4,2-2-3,2-3-5 #Connection 1 +connection node_1; CREATE TABLE t1 (f1 CHAR(255)) ENGINE=InnoDB; SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -35,6 +41,7 @@ INSERT INTO t1 VALUES ('node1_committed_before'); COMMIT; include/save_master_gtid.inc #Connection 2 +connection node_2; include/sync_with_master_gtid.inc SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -42,14 +49,19 @@ INSERT INTO t1 VALUES ('node2_committed_before'); INSERT INTO t1 VALUES ('node2_committed_before'); COMMIT; #Connection 3 +connection node_3; +connection node_2; +connection node_3; Shutting down server ... #Connection 2 +connection node_2; SET AUTOCOMMIT=OFF; START TRANSACTION; INSERT INTO t1 VALUES ('node1_committed_during'); INSERT INTO t1 VALUES ('node1_committed_during'); COMMIT; #Connection 3 +connection node_3; Starting server ... SET AUTOCOMMIT=OFF; START TRANSACTION; @@ -57,6 +69,7 @@ INSERT INTO t1 VALUES ('node3_committed_after'); INSERT INTO t1 VALUES ('node3_committed_after'); COMMIT; #Connection 2 +connection node_2; Select * from t1 order by f1; f1 node1_committed_before @@ -68,6 +81,7 @@ node2_committed_before node3_committed_after node3_committed_after #Connection 3 +connection node_3; Select * from t1 order by f1; f1 node1_committed_before @@ -79,26 +93,34 @@ node2_committed_before node3_committed_after node3_committed_after #Connection 2 +connection node_2; SELECT @@global.gtid_binlog_state; @@global.gtid_binlog_state 1-1-6,2-2-7,2-3-8 #Connection 3 +connection node_3; SELECT @@global.gtid_binlog_state; @@global.gtid_binlog_state 1-1-6,2-2-7,2-3-8 #Connection 1 +connection node_1; SET AUTOCOMMIT=ON; #Connection 2 +connection node_2; SET AUTOCOMMIT=ON; #Connection 3 +connection node_3; SET AUTOCOMMIT=ON; #Connection 2 +connection node_2; STOP slave; INSERT INTO t1 VALUES ('node2_slave_stoped'); #Connection 1 +connection node_1; INSERT INTO t1 VALUES ('node1_normal_entry'); include/save_master_gtid.inc #Connection 2 +connection node_2; INSERT INTO t1 VALUES ('node2_slave_stoped_inserted'); start slave; include/sync_with_master_gtid.inc @@ -110,6 +132,7 @@ SELECT @@global.gtid_binlog_state; @@global.gtid_binlog_state 1-1-7,2-3-8,2-2-11 #Connection 3 +connection node_3; SELECT count(*) from t1; count(*) 12 @@ -117,14 +140,20 @@ SELECT @@global.gtid_binlog_state; @@global.gtid_binlog_state 1-1-7,2-3-8,2-2-11 #Connection 1 +connection node_1; DROP TABLE t2,t1; #Connection 2 +connection node_2; #Connection 3 +connection node_3; #Connection 2 +connection node_2; STOP SLAVE; RESET SLAVE ALL; reset master; #Connection 3 +connection node_3; reset master; #Connection 1 +connection node_1; reset master; diff --git a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result index 22f16a29796..827b2aa9dac 100644 --- a/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result +++ b/mysql-test/suite/galera/r/galera_parallel_autoinc_largetrx.result @@ -22,7 +22,7 @@ COUNT(DISTINCT f1) SELECT COUNT(*) FROM INFORMATION_SCHEMA.PROCESSLIST WHERE USER = 'system user' AND STATE NOT LIKE 'InnoDB%'; COUNT(*) -5 +3 connection default; DROP TABLE t1; DROP TABLE ten; diff --git a/mysql-test/suite/innodb_gis/r/rtree_debug.result b/mysql-test/suite/innodb_gis/r/rtree_debug.result index e3877880387..11e2cd40e25 100644 --- a/mysql-test/suite/innodb_gis/r/rtree_debug.result +++ b/mysql-test/suite/innodb_gis/r/rtree_debug.result @@ -38,14 +38,11 @@ t1 CREATE TABLE `t1` ( `c2` geometry NOT NULL, SPATIAL KEY `idx` (`c2`) ) ENGINE=InnoDB DEFAULT CHARSET=latin1 -SET DEBUG='+d,row_merge_ins_spatial_fail'; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET @save_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,row_merge_ins_spatial_fail'; create spatial index idx2 on t1(c2); ERROR HY000: Got error 1000 "Unknown error 1000" from storage engine InnoDB -SET DEBUG='-d,row_merge_ins_spatial_fail'; -Warnings: -Warning 1287 '@@debug' is deprecated and will be removed in a future release. Please use '@@debug_dbug' instead +SET debug_dbug = @save_dbug; show create table t1; Table Create Table t1 CREATE TABLE `t1` ( diff --git a/mysql-test/suite/innodb_gis/t/rtree_debug.test b/mysql-test/suite/innodb_gis/t/rtree_debug.test index 3ba8ecc0655..2f7c2806c68 100644 --- a/mysql-test/suite/innodb_gis/t/rtree_debug.test +++ b/mysql-test/suite/innodb_gis/t/rtree_debug.test @@ -49,10 +49,11 @@ create spatial index idx on t1(c2); show create table t1; -SET DEBUG='+d,row_merge_ins_spatial_fail'; +SET @save_dbug = @@SESSION.debug_dbug; +SET debug_dbug='+d,row_merge_ins_spatial_fail'; --error ER_GET_ERRNO create spatial index idx2 on t1(c2); -SET DEBUG='-d,row_merge_ins_spatial_fail'; +SET debug_dbug = @save_dbug; show create table t1; # Check table. diff --git a/mysql-test/suite/innodb_gis/t/rtree_search.test b/mysql-test/suite/innodb_gis/t/rtree_search.test index 3c591004042..6bbd84a25cf 100644 --- a/mysql-test/suite/innodb_gis/t/rtree_search.test +++ b/mysql-test/suite/innodb_gis/t/rtree_search.test @@ -38,9 +38,10 @@ select count(*) from t1 where MBRWithin(t1.c2, @g1); set @g1 = ST_GeomFromText('Polygon((100 100,100 800,800 800,800 100,100 100))'); select count(*) from t1 where MBRWithin(t1.c2, @g1); -#SET DEBUG='+d, rtr_pessimistic_position'; +#SET @save_dbug= @@session.debug_dbug; +#SET debug_dbug = '+d,rtr_pessimistic_position'; #select count(*) from t1 where MBRWithin(t1.c2, @g1); -#SET DEBUG='-d, rtr_pessimistic_position'; +#SET debug_dbug = @save_dbug; # Equality search set @g1 = ST_GeomFromText('Point(1 1)'); diff --git a/sql/mysqld.cc b/sql/mysqld.cc index 82ca7860195..a53a031eca7 100644 --- a/sql/mysqld.cc +++ b/sql/mysqld.cc @@ -772,7 +772,7 @@ mysql_mutex_t LOCK_prepared_stmt_count; mysql_mutex_t LOCK_des_key_file; #endif mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave; -mysql_rwlock_t LOCK_system_variables_hash; +mysql_prlock_t LOCK_system_variables_hash; mysql_cond_t COND_thread_count, COND_start_thread; pthread_t signal_thread; pthread_attr_t connection_attrib; @@ -2352,7 +2352,7 @@ static void clean_up_mutexes() mysql_rwlock_destroy(&LOCK_sys_init_connect); mysql_rwlock_destroy(&LOCK_sys_init_slave); mysql_mutex_destroy(&LOCK_global_system_variables); - mysql_rwlock_destroy(&LOCK_system_variables_hash); + mysql_prlock_destroy(&LOCK_system_variables_hash); mysql_mutex_destroy(&LOCK_short_uuid_generator); mysql_mutex_destroy(&LOCK_prepared_stmt_count); mysql_mutex_destroy(&LOCK_error_messages); @@ -4690,7 +4690,7 @@ static int init_thread_environment() &LOCK_global_system_variables, MY_MUTEX_INIT_FAST); mysql_mutex_record_order(&LOCK_active_mi, &LOCK_global_system_variables); mysql_mutex_record_order(&LOCK_status, &LOCK_thread_count); - mysql_rwlock_init(key_rwlock_LOCK_system_variables_hash, + mysql_prlock_init(key_rwlock_LOCK_system_variables_hash, &LOCK_system_variables_hash); mysql_mutex_init(key_LOCK_prepared_stmt_count, &LOCK_prepared_stmt_count, MY_MUTEX_INIT_FAST); diff --git a/sql/mysqld.h b/sql/mysqld.h index ed6685828ba..57698dc5d9b 100644 --- a/sql/mysqld.h +++ b/sql/mysqld.h @@ -585,7 +585,7 @@ extern mysql_mutex_t LOCK_des_key_file; extern mysql_mutex_t LOCK_server_started; extern mysql_cond_t COND_server_started; extern mysql_rwlock_t LOCK_grant, LOCK_sys_init_connect, LOCK_sys_init_slave; -extern mysql_rwlock_t LOCK_system_variables_hash; +extern mysql_prlock_t LOCK_system_variables_hash; extern mysql_cond_t COND_thread_count, COND_start_thread; extern mysql_cond_t COND_manager; extern mysql_cond_t COND_slave_background; diff --git a/sql/set_var.cc b/sql/set_var.cc index 15f6bbdafc5..77579146f23 100644 --- a/sql/set_var.cc +++ b/sql/set_var.cc @@ -597,10 +597,10 @@ int mysql_del_sys_var_chain(sys_var *first) { int result= 0; - mysql_rwlock_wrlock(&LOCK_system_variables_hash); + mysql_prlock_wrlock(&LOCK_system_variables_hash); for (sys_var *var= first; var; var= var->next) result|= my_hash_delete(&system_variable_hash, (uchar*) var); - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); return result; } @@ -1082,7 +1082,7 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond) cond= make_cond_for_info_schema(thd, cond, tables); thd->count_cuted_fields= CHECK_FIELD_WARN; - mysql_rwlock_rdlock(&LOCK_system_variables_hash); + mysql_prlock_rdlock(&LOCK_system_variables_hash); for (uint i= 0; i < system_variable_hash.records; i++) { @@ -1244,7 +1244,7 @@ int fill_sysvars(THD *thd, TABLE_LIST *tables, COND *cond) } res= 0; end: - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); thd->count_cuted_fields= save_count_cuted_fields; return res; } diff --git a/sql/sql_plugin.cc b/sql/sql_plugin.cc index 978188199c5..be57c433b65 100644 --- a/sql/sql_plugin.cc +++ b/sql/sql_plugin.cc @@ -1397,10 +1397,10 @@ static int plugin_initialize(MEM_ROOT *tmp_root, struct st_plugin_int *plugin, mysql_mutex_unlock(&LOCK_plugin); - mysql_rwlock_wrlock(&LOCK_system_variables_hash); + mysql_prlock_wrlock(&LOCK_system_variables_hash); if (test_plugin_options(tmp_root, plugin, argc, argv)) state= PLUGIN_IS_DISABLED; - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); if (options_only || state == PLUGIN_IS_DISABLED) { @@ -2803,11 +2803,11 @@ sys_var *find_sys_var_ex(THD *thd, const char *str, size_t length, if (!locked) mysql_mutex_lock(&LOCK_plugin); - mysql_rwlock_rdlock(&LOCK_system_variables_hash); + mysql_prlock_rdlock(&LOCK_system_variables_hash); if ((var= intern_find_sys_var(str, length)) && (pi= var->cast_pluginvar())) { - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); LEX *lex= thd ? thd->lex : 0; if (!(plugin= intern_plugin_lock(lex, plugin_int_to_ref(pi->plugin)))) var= NULL; /* failed to lock it, it must be uninstalling */ @@ -2820,7 +2820,7 @@ sys_var *find_sys_var_ex(THD *thd, const char *str, size_t length, } } else - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); if (!locked) mysql_mutex_unlock(&LOCK_plugin); @@ -3049,9 +3049,9 @@ static uchar *intern_sys_var_ptr(THD* thd, int offset, bool global_lock) if (!thd->variables.dynamic_variables_ptr || (uint)offset > thd->variables.dynamic_variables_head) { - mysql_rwlock_rdlock(&LOCK_system_variables_hash); + mysql_prlock_rdlock(&LOCK_system_variables_hash); sync_dynamic_session_variables(thd, global_lock); - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); } DBUG_RETURN((uchar*)thd->variables.dynamic_variables_ptr + offset); } @@ -3166,7 +3166,7 @@ static void cleanup_variables(struct system_variables *vars) st_bookmark *v; uint idx; - mysql_rwlock_rdlock(&LOCK_system_variables_hash); + mysql_prlock_rdlock(&LOCK_system_variables_hash); for (idx= 0; idx < bookmark_hash.records; idx++) { v= (st_bookmark*) my_hash_element(&bookmark_hash, idx); @@ -3185,7 +3185,7 @@ static void cleanup_variables(struct system_variables *vars) *ptr= NULL; } } - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); DBUG_ASSERT(vars->table_plugin == NULL); DBUG_ASSERT(vars->tmp_table_plugin == NULL); @@ -4240,10 +4240,10 @@ int thd_key_create(MYSQL_THD_KEY_T *key) PLUGIN_VAR_NOSYSVAR | PLUGIN_VAR_NOCMDOPT; char namebuf[256]; snprintf(namebuf, sizeof(namebuf), "%u", thd_key_no++); - mysql_rwlock_wrlock(&LOCK_system_variables_hash); + mysql_prlock_wrlock(&LOCK_system_variables_hash); // non-letters in the name as an extra safety st_bookmark *bookmark= register_var("\a\v\a\t\a\r", namebuf, flags); - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); if (bookmark) { *key= bookmark->offset; diff --git a/sql/sql_show.cc b/sql/sql_show.cc index ae18e1cac04..e29e8658ae4 100644 --- a/sql/sql_show.cc +++ b/sql/sql_show.cc @@ -7521,7 +7521,7 @@ int fill_variables(THD *thd, TABLE_LIST *tables, COND *cond) COND *partial_cond= make_cond_for_info_schema(thd, cond, tables); - mysql_rwlock_rdlock(&LOCK_system_variables_hash); + mysql_prlock_rdlock(&LOCK_system_variables_hash); /* Avoid recursive LOCK_system_variables_hash acquisition in @@ -7536,7 +7536,7 @@ int fill_variables(THD *thd, TABLE_LIST *tables, COND *cond) res= show_status_array(thd, wild, enumerate_sys_vars(thd, sorted_vars, scope), scope, NULL, "", tables->table, upper_case_names, partial_cond); - mysql_rwlock_unlock(&LOCK_system_variables_hash); + mysql_prlock_unlock(&LOCK_system_variables_hash); DBUG_RETURN(res); } diff --git a/sql/wsrep_hton.cc b/sql/wsrep_hton.cc index 42eb92244ff..b0d446ad6ea 100644 --- a/sql/wsrep_hton.cc +++ b/sql/wsrep_hton.cc @@ -121,7 +121,7 @@ void wsrep_post_commit(THD* thd, bool all) case LOCAL_COMMIT: { DBUG_ASSERT(thd->wsrep_trx_meta.gtid.seqno != WSREP_SEQNO_UNDEFINED); - if (wsrep->post_commit(wsrep, &thd->wsrep_ws_handle)) + if (wsrep && wsrep->post_commit(wsrep, &thd->wsrep_ws_handle)) { DBUG_PRINT("wsrep", ("set committed fail")); WSREP_WARN("set committed fail: %llu %d", @@ -253,7 +253,7 @@ static int wsrep_rollback(handlerton *hton, THD *thd, bool all) if ((all || !thd_test_options(thd, OPTION_NOT_AUTOCOMMIT | OPTION_BEGIN)) && (thd->variables.wsrep_on && thd->wsrep_conflict_state != MUST_REPLAY)) { - if (wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle)) + if (wsrep && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle)) { DBUG_PRINT("wsrep", ("setting rollback fail")); WSREP_ERROR("settting rollback fail: thd: %llu, schema: %s, SQL: %s", @@ -295,7 +295,7 @@ int wsrep_commit(handlerton *hton, THD *thd, bool all) possible changes to clean state. */ if (WSREP_PROVIDER_EXISTS) { - if (wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle)) + if (wsrep && wsrep->post_rollback(wsrep, &thd->wsrep_ws_handle)) { DBUG_PRINT("wsrep", ("setting rollback fail")); WSREP_ERROR("settting rollback fail: thd: %llu, schema: %s, SQL: %s", @@ -472,7 +472,7 @@ wsrep_run_wsrep_commit(THD *thd, bool all) } else if (!rcode) { - if (WSREP_OK == rcode) + if (WSREP_OK == rcode && wsrep) rcode = wsrep->pre_commit(wsrep, (wsrep_conn_id_t)thd->thread_id, &thd->wsrep_ws_handle, diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 73d465476cd..e4d9ec8c804 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -622,9 +622,6 @@ static PSI_mutex_info all_innodb_mutexes[] = { PSI_KEY(srv_innodb_monitor_mutex), PSI_KEY(srv_misc_tmpfile_mutex), PSI_KEY(srv_monitor_file_mutex), -# ifdef UNIV_DEBUG - PSI_KEY(sync_thread_mutex), -# endif /* UNIV_DEBUG */ PSI_KEY(buf_dblwr_mutex), PSI_KEY(trx_undo_mutex), PSI_KEY(trx_pool_mutex), diff --git a/storage/innobase/include/mtr0mtr.h b/storage/innobase/include/mtr0mtr.h index 045a14221a3..2c527a0980b 100644 --- a/storage/innobase/include/mtr0mtr.h +++ b/storage/innobase/include/mtr0mtr.h @@ -37,8 +37,6 @@ Created 11/26/1995 Heikki Tuuri /** Start a mini-transaction. */ #define mtr_start(m) (m)->start() -/** Start a mini-transaction. */ -#define mtr_start_trx(m, t) (m)->start((t)) /** Start a synchronous mini-transaction */ #define mtr_start_sync(m) (m)->start(true) @@ -217,9 +215,6 @@ struct mtr_t { /** Owning mini-transaction */ mtr_t* m_mtr; - - /* Transaction handle */ - trx_t* m_trx; }; mtr_t() @@ -239,15 +234,7 @@ struct mtr_t { /** Start a mini-transaction. @param sync true if it is a synchronous mini-transaction @param read_only true if read only mini-transaction */ - void start(bool sync = true, bool read_only = false) - { - start(NULL, sync, read_only); - } - - /** Start a mini-transaction. - @param sync true if it is a synchronous mini-transaction - @param read_only true if read only mini-transaction */ - void start(trx_t* trx, bool sync = true, bool read_only = false); + void start(bool sync = true, bool read_only = false); /** @return whether this is an asynchronous mini-transaction. */ bool is_async() const diff --git a/storage/innobase/include/sync0sync.h b/storage/innobase/include/sync0sync.h index 55aaf5032e8..3c40591e873 100644 --- a/storage/innobase/include/sync0sync.h +++ b/storage/innobase/include/sync0sync.h @@ -94,9 +94,6 @@ extern mysql_pfs_key_t rw_lock_mutex_key; extern mysql_pfs_key_t srv_innodb_monitor_mutex_key; extern mysql_pfs_key_t srv_misc_tmpfile_mutex_key; extern mysql_pfs_key_t srv_monitor_file_mutex_key; -# ifdef UNIV_DEBUG -extern mysql_pfs_key_t sync_thread_mutex_key; -# endif /* UNIV_DEBUG */ extern mysql_pfs_key_t buf_dblwr_mutex_key; extern mysql_pfs_key_t trx_undo_mutex_key; extern mysql_pfs_key_t trx_mutex_key; diff --git a/storage/innobase/include/sync0types.h b/storage/innobase/include/sync0types.h index 711225041bc..d0a6feb877b 100644 --- a/storage/innobase/include/sync0types.h +++ b/storage/innobase/include/sync0types.h @@ -338,7 +338,6 @@ enum latch_id_t { LATCH_ID_SRV_INNODB_MONITOR, LATCH_ID_SRV_MISC_TMPFILE, LATCH_ID_SRV_MONITOR_FILE, - LATCH_ID_SYNC_THREAD, LATCH_ID_BUF_DBLWR, LATCH_ID_TRX_UNDO, LATCH_ID_TRX_POOL, diff --git a/storage/innobase/mtr/mtr0mtr.cc b/storage/innobase/mtr/mtr0mtr.cc index faa00b1518b..72b24b08871 100644 --- a/storage/innobase/mtr/mtr0mtr.cc +++ b/storage/innobase/mtr/mtr0mtr.cc @@ -492,7 +492,7 @@ mtr_write_log( @param sync true if it is a synchronous mini-transaction @param read_only true if read only mini-transaction */ void -mtr_t::start(trx_t* trx, bool sync, bool read_only) +mtr_t::start(bool sync, bool read_only) { UNIV_MEM_INVALID(this, sizeof(*this)); @@ -517,7 +517,6 @@ mtr_t::start(trx_t* trx, bool sync, bool read_only) m_impl.m_undo_space = NULL; m_impl.m_sys_space = NULL; m_impl.m_flush_observer = NULL; - m_impl.m_trx = trx; ut_d(m_impl.m_magic_n = MTR_MAGIC_N); } diff --git a/storage/innobase/row/row0umod.cc b/storage/innobase/row/row0umod.cc index b13b770f0bd..087d922b219 100644 --- a/storage/innobase/row/row0umod.cc +++ b/storage/innobase/row/row0umod.cc @@ -306,7 +306,7 @@ row_undo_mod_clust( /* We may have to modify tree structure: do a pessimistic descent down the index tree */ - mtr_start_trx(&mtr, thr_get_trx(thr)); + mtr.start(); if (index->table->is_temporary()) { mtr.set_log_mode(MTR_LOG_NO_REDO); } else { @@ -366,7 +366,7 @@ row_undo_mod_clust( if (err == DB_SUCCESS && node->rec_type == TRX_UNDO_UPD_DEL_REC) { - mtr_start_trx(&mtr, thr_get_trx(thr)); + mtr.start(); if (index->table->is_temporary()) { mtr.set_log_mode(MTR_LOG_NO_REDO); } else { @@ -384,7 +384,7 @@ row_undo_mod_clust( /* We may have to modify tree structure: do a pessimistic descent down the index tree */ - mtr_start_trx(&mtr, thr_get_trx(thr)); + mtr.start(); if (index->table->is_temporary()) { mtr.set_log_mode(MTR_LOG_NO_REDO); } else { @@ -498,7 +498,7 @@ row_undo_mod_del_mark_or_remove_sec_low( which cannot be purged yet, requires its existence. If some requires, we should delete mark the record. */ - mtr_start_trx(&mtr_vers, thr_get_trx(thr)); + mtr_vers.start(); success = btr_pcur_restore_position(BTR_SEARCH_LEAF, &(node->pcur), &mtr_vers); diff --git a/storage/innobase/row/row0upd.cc b/storage/innobase/row/row0upd.cc index e5a5f5491eb..fd2d09c0a77 100644 --- a/storage/innobase/row/row0upd.cc +++ b/storage/innobase/row/row0upd.cc @@ -248,7 +248,7 @@ row_upd_check_references_constraints( DEBUG_SYNC_C("foreign_constraint_check_for_update"); - mtr_start_trx(mtr, trx); + mtr->start(); if (trx->dict_operation_lock_mode == 0) { got_s_lock = TRUE; @@ -2298,7 +2298,7 @@ row_upd_sec_index_entry( DEBUG_SYNC_C_IF_THD(trx->mysql_thd, "before_row_upd_sec_index_entry"); - mtr_start_trx(&mtr, trx); + mtr.start(); switch (index->space) { case SRV_TMP_SPACE_ID: @@ -2858,7 +2858,7 @@ row_upd_clust_rec( /* We may have to modify the tree structure: do a pessimistic descent down the index tree */ - mtr_start_trx(mtr, thr_get_trx(thr)); + mtr->start(); mtr->set_named_space(index->space); /* Disable REDO logging as lifetime of temp-tables is limited to @@ -3046,7 +3046,7 @@ row_upd_clust_step( /* We have to restore the cursor to its position */ - mtr_start_trx(&mtr, thr_get_trx(thr)); + mtr.start(); mtr.set_named_space(index->space); if (dict_table_is_temporary(node->table)) { @@ -3106,9 +3106,9 @@ row_upd_clust_step( dict_drop_index_tree( btr_pcur_get_rec(pcur), pcur, &mtr); - mtr_commit(&mtr); + mtr.commit(); - mtr_start_trx(&mtr, thr_get_trx(thr)); + mtr.start(); mtr.set_named_space(index->space); success = btr_pcur_restore_position(BTR_MODIFY_LEAF, pcur, @@ -3116,7 +3116,7 @@ row_upd_clust_step( if (!success) { err = DB_ERROR; - mtr_commit(&mtr); + mtr.commit(); return(err); } @@ -3131,7 +3131,7 @@ row_upd_clust_step( 0, btr_pcur_get_block(pcur), rec, index, offsets, thr); if (err != DB_SUCCESS) { - mtr_commit(&mtr); + mtr.commit(); goto exit_func; } } diff --git a/storage/innobase/sync/sync0debug.cc b/storage/innobase/sync/sync0debug.cc index 793c6a59e33..d41d52b2f7d 100644 --- a/storage/innobase/sync/sync0debug.cc +++ b/storage/innobase/sync/sync0debug.cc @@ -1401,11 +1401,6 @@ sync_latch_meta_init() LATCH_ADD_MUTEX(SRV_MONITOR_FILE, SYNC_NO_ORDER_CHECK, srv_monitor_file_mutex_key); -#ifdef UNIV_DEBUG - LATCH_ADD_MUTEX(SYNC_THREAD, SYNC_NO_ORDER_CHECK, - sync_thread_mutex_key); -#endif /* UNIV_DEBUG */ - LATCH_ADD_MUTEX(BUF_DBLWR, SYNC_DOUBLEWRITE, buf_dblwr_mutex_key); LATCH_ADD_MUTEX(TRX_UNDO, SYNC_TRX_UNDO, trx_undo_mutex_key); diff --git a/storage/innobase/sync/sync0sync.cc b/storage/innobase/sync/sync0sync.cc index 16dd90cd879..097f3143524 100644 --- a/storage/innobase/sync/sync0sync.cc +++ b/storage/innobase/sync/sync0sync.cc @@ -69,7 +69,6 @@ mysql_pfs_key_t redo_rseg_mutex_key; mysql_pfs_key_t noredo_rseg_mutex_key; mysql_pfs_key_t page_zip_stat_per_index_mutex_key; # ifdef UNIV_DEBUG -mysql_pfs_key_t sync_thread_mutex_key; mysql_pfs_key_t rw_lock_debug_mutex_key; # endif /* UNIV_DEBUG */ mysql_pfs_key_t rtr_active_mutex_key; diff --git a/storage/innobase/trx/trx0rec.cc b/storage/innobase/trx/trx0rec.cc index ae52fb2cedd..bce46dd99f2 100644 --- a/storage/innobase/trx/trx0rec.cc +++ b/storage/innobase/trx/trx0rec.cc @@ -1947,7 +1947,7 @@ trx_undo_report_rename(trx_t* trx, const dict_table_t* table) ut_ad((err == DB_SUCCESS) == (*pundo != NULL)); if (trx_undo_t* undo = *pundo) { mtr_t mtr; - mtr.start(trx); + mtr.start(); buf_block_t* block = buf_page_get_gen( page_id_t(undo->space, undo->last_page_no), @@ -1976,7 +1976,7 @@ trx_undo_report_rename(trx_t* trx, const dict_table_t* table) break; } else { mtr.commit(); - mtr.start(trx); + mtr.start(); block = trx_undo_add_page(trx, undo, &mtr); if (!block) { err = DB_OUT_OF_FILE_SPACE; @@ -2124,7 +2124,7 @@ trx_undo_report_row_operation( latches, such as SYNC_FSP and SYNC_FSP_PAGE. */ mtr_commit(&mtr); - mtr.start(trx); + mtr.start(); if (is_temp) { mtr.set_log_mode(MTR_LOG_NO_REDO); } @@ -2163,7 +2163,7 @@ trx_undo_report_row_operation( /* We have to extend the undo log by one page */ ut_ad(++loop_count < 2); - mtr.start(trx); + mtr.start(); if (is_temp) { mtr.set_log_mode(MTR_LOG_NO_REDO); diff --git a/storage/innobase/trx/trx0undo.cc b/storage/innobase/trx/trx0undo.cc index 11df7011027..10c4d79209e 100644 --- a/storage/innobase/trx/trx0undo.cc +++ b/storage/innobase/trx/trx0undo.cc @@ -1591,7 +1591,7 @@ trx_undo_assign_undo( || rseg == trx->rsegs.m_noredo.rseg); ut_ad(type == TRX_UNDO_INSERT || type == TRX_UNDO_UPDATE); - mtr.start(trx); + mtr.start(); if (is_temp) { mtr.set_log_mode(MTR_LOG_NO_REDO); diff --git a/storage/tokudb/mysql-test/tokudb/disabled.def b/storage/tokudb/mysql-test/tokudb/disabled.def index ddefceb432e..8893dfabdc6 100644 --- a/storage/tokudb/mysql-test/tokudb/disabled.def +++ b/storage/tokudb/mysql-test/tokudb/disabled.def @@ -29,3 +29,5 @@ cluster_key_part: engine options on partitioned tables i_s_tokudb_lock_waits_released: unstable, race conditions i_s_tokudb_locks_released: unstable, race conditions row_format: n/a +tokudb.change_column_all_1000_1: We are too lazy to fix this properly +tokudb.change_column_all_1000_10: We are too lazy to fix this properly |