From 7bc67357368263a233e4d8553cc0a2a1ad331276 Mon Sep 17 00:00:00 2001 From: Sergei Petrunia Date: Wed, 29 Apr 2020 01:13:52 +0300 Subject: [PATCH 1/7] MDEV-22401: Optimizer trace: multi-component range is not printed correctly KEY_MULTI_RANGE::range_flag does not have correct flag bits for per-endpoint flags (NEAR_MIN, NEAR_MAX, NO_MIN_RANGE, NO_MAX_RANGE). It only has bits for flags that describe both endpoints. So - Document this. - Switch optimizer trace to using {start|end}_key.flag values, instead. This fixes the bug. - Switch records_in_column_ranges() to doing that too. (This used to work, because KEY_MULTI_RANGE::range_flag had correct flag value for the last key component, and EITS only uses one-component pseudo-indexes) --- include/my_base.h | 8 +++++++- mysql-test/main/opt_trace.result | 31 +++++++++++++++++++++++++++++++ mysql-test/main/opt_trace.test | 12 ++++++++++++ sql/opt_range.cc | 31 +++++++++++++++++++++++-------- sql/opt_range_mrr.cc | 2 +- 5 files changed, 74 insertions(+), 10 deletions(-) diff --git a/include/my_base.h b/include/my_base.h index 68b3aaa6a13..44af7b45075 100644 --- a/include/my_base.h +++ b/include/my_base.h @@ -632,7 +632,13 @@ typedef struct st_key_multi_range key_range start_key; key_range end_key; range_id_t ptr; /* Free to use by caller (ptr to row etc) */ - uint range_flag; /* key range flags see above */ + /* + A set of range flags that describe both endpoints: UNIQUE_RANGE, + NULL_RANGE, EQ_RANGE, GEOM_FLAG. + (Flags that describe one endpoint, NO_{MIN|MAX}_RANGE, NEAR_{MIN|MAX} will + not be set here) + */ + uint range_flag; } KEY_MULTI_RANGE; diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result index 08c0895e839..1fd22e52243 100644 --- a/mysql-test/main/opt_trace.result +++ b/mysql-test/main/opt_trace.result @@ -8261,4 +8261,35 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.semijoin_table_pullout')) } ] drop table t1,t2,t3; +# +# MDEV-22401: Optimizer trace: multi-component range is not printed correctly +# +create table t1 (kp1 int, kp2 int, key(kp1, kp2)); +insert into t1 values (1,1),(1,5),(5,1),(5,5); +set optimizer_trace=1; +select * from t1 force index(kp1) where (kp1=2 and kp2 >=4); +kp1 kp2 +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) +[ + + [ + + { + "index": "kp1", + "ranges": + [ + "(2,4) <= (kp1,kp2) <= (2)" + ], + "rowid_ordered": false, + "using_mrr": false, + "index_only": true, + "rows": 1, + "cost": 1.3033, + "chosen": false, + "cause": "cost" + } + ] +] +drop table t1; set optimizer_trace='enabled=off'; diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 51950f00781..09b3de77848 100644 --- a/mysql-test/main/opt_trace.test +++ b/mysql-test/main/opt_trace.test @@ -567,4 +567,16 @@ select * from t3 where (a,a) in (select t1.a, t2.a from t1, t2 where t1.b=t2.b); select JSON_DETAILED(JSON_EXTRACT(trace, '$**.semijoin_table_pullout')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; drop table t1,t2,t3; + +--echo # +--echo # MDEV-22401: Optimizer trace: multi-component range is not printed correctly +--echo # + +create table t1 (kp1 int, kp2 int, key(kp1, kp2)); +insert into t1 values (1,1),(1,5),(5,1),(5,5); +set optimizer_trace=1; +select * from t1 force index(kp1) where (kp1=2 and kp2 >=4); +select JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; +drop table t1; + set optimizer_trace='enabled=off'; diff --git a/sql/opt_range.cc b/sql/opt_range.cc index 312999ddc17..a3c5dbcb199 100644 --- a/sql/opt_range.cc +++ b/sql/opt_range.cc @@ -3206,8 +3206,18 @@ double records_in_column_ranges(PARAM *param, uint idx, key_range *min_endp, *max_endp; min_endp= range.start_key.length? &range.start_key : NULL; max_endp= range.end_key.length? &range.end_key : NULL; - rows= get_column_range_cardinality(field, min_endp, max_endp, - range.range_flag); + int range_flag= range.range_flag; + + if (!range.start_key.length) + range_flag |= NO_MIN_RANGE; + if (!range.end_key.length) + range_flag |= NO_MAX_RANGE; + if (range.start_key.flag == HA_READ_AFTER_KEY) + range_flag |= NEAR_MIN; + if (range.start_key.flag == HA_READ_BEFORE_KEY) + range_flag |= NEAR_MAX; + + rows= get_column_range_cardinality(field, min_endp, max_endp, range_flag); if (DBL_MAX == rows) { total_rows= DBL_MAX; @@ -15814,24 +15824,29 @@ void print_range(String *out, const KEY_PART_INFO *key_part, return; } - if (!(flag & NO_MIN_RANGE)) + if (range->start_key.length) { print_key_value(out, key_part, range->start_key.key, range->start_key.length); - if (flag & NEAR_MIN) + if (range->start_key.flag == HA_READ_AFTER_KEY) out->append(STRING_WITH_LEN(" < ")); - else + else if (range->start_key.flag == HA_READ_KEY_EXACT || + range->start_key.flag == HA_READ_KEY_OR_NEXT) out->append(STRING_WITH_LEN(" <= ")); + else + out->append(STRING_WITH_LEN(" ? ")); } print_keyparts_name(out, key_part, n_key_parts, keypart_map); - if (!(flag & NO_MAX_RANGE)) + if (range->end_key.length) { - if (flag & NEAR_MAX) + if (range->end_key.flag == HA_READ_BEFORE_KEY) out->append(STRING_WITH_LEN(" < ")); - else + else if (range->end_key.flag == HA_READ_AFTER_KEY) out->append(STRING_WITH_LEN(" <= ")); + else + out->append(STRING_WITH_LEN(" ? ")); print_key_value(out, key_part, range->end_key.key, range->end_key.length); } diff --git a/sql/opt_range_mrr.cc b/sql/opt_range_mrr.cc index 4afa06a7ca0..267d764bb3b 100644 --- a/sql/opt_range_mrr.cc +++ b/sql/opt_range_mrr.cc @@ -262,7 +262,6 @@ walk_up_n_right: else { max_key_parts= MY_MAX(cur->min_key_parts, cur->max_key_parts); - range->range_flag= cur->min_key_flag | cur->max_key_flag; range->start_key.key= seq->param->min_key; range->start_key.length= (uint)(cur->min_key - seq->param->min_key); @@ -298,6 +297,7 @@ walk_up_n_right: !memcmp(seq->param->min_key, seq->param->max_key, // (2) range->start_key.length); + range->range_flag= 0; if (is_eq_range_pred) { range->range_flag = EQ_RANGE; From 7f03a93348ebc1b13b444f98533bdf79840d80b8 Mon Sep 17 00:00:00 2001 From: Varun Gupta Date: Wed, 29 Apr 2020 20:22:18 +0530 Subject: [PATCH 2/7] MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT Adding a test case for rowid filter, the crash was fixed by MDEV-22191 --- mysql-test/main/rowid_filter.result | 16 ++++++++++++++++ mysql-test/main/rowid_filter.test | 16 ++++++++++++++++ mysql-test/main/rowid_filter_innodb.result | 16 ++++++++++++++++ 3 files changed, 48 insertions(+) diff --git a/mysql-test/main/rowid_filter.result b/mysql-test/main/rowid_filter.result index eb790c20493..430e4d8f7ea 100644 --- a/mysql-test/main/rowid_filter.result +++ b/mysql-test/main/rowid_filter.result @@ -2104,4 +2104,20 @@ EXPLAIN } } DROP TABLE t1,t2; +# +# MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT +# +set @save_optimizer_switch= @@optimizer_switch; +SET @@optimizer_switch="index_merge_sort_union=OFF"; +CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)); +INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4); +explain +SELECT * FROM t1 WHERE a > 0 AND b=0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref|filter a,b b|a 5|5 const 2 (14%) Using where; Using rowid filter +SELECT * FROM t1 WHERE a > 0 AND b=0; +a b +1 0 +drop table t1; +SET @@optimizer_switch=@save_optimizer_switch; set @@use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/main/rowid_filter.test b/mysql-test/main/rowid_filter.test index 6f26e81db92..9ac9465963b 100644 --- a/mysql-test/main/rowid_filter.test +++ b/mysql-test/main/rowid_filter.test @@ -339,4 +339,20 @@ eval EXPLAIN FORMAT=JSON $q; DROP TABLE t1,t2; + +--echo # +--echo # MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT +--echo # + +set @save_optimizer_switch= @@optimizer_switch; +SET @@optimizer_switch="index_merge_sort_union=OFF"; +CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)); +INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4); +explain +SELECT * FROM t1 WHERE a > 0 AND b=0; +SELECT * FROM t1 WHERE a > 0 AND b=0; +drop table t1; +SET @@optimizer_switch=@save_optimizer_switch; + + set @@use_stat_tables=@save_use_stat_tables; diff --git a/mysql-test/main/rowid_filter_innodb.result b/mysql-test/main/rowid_filter_innodb.result index 9423fb18fd9..515872d8c5b 100644 --- a/mysql-test/main/rowid_filter_innodb.result +++ b/mysql-test/main/rowid_filter_innodb.result @@ -2033,6 +2033,22 @@ EXPLAIN } } DROP TABLE t1,t2; +# +# MDEV-22160: SIGSEGV in st_join_table::save_explain_data on SELECT +# +set @save_optimizer_switch= @@optimizer_switch; +SET @@optimizer_switch="index_merge_sort_union=OFF"; +CREATE TABLE t1 (a INT, b INT, INDEX(a), INDEX(b)); +INSERT INTO t1 VALUES (0,0),(1,0),(-1,1), (-2,1), (-2,3), (-3,4), (-2,4); +explain +SELECT * FROM t1 WHERE a > 0 AND b=0; +id select_type table type possible_keys key key_len ref rows Extra +1 SIMPLE t1 ref|filter a,b b|a 5|5 const 2 (14%) Using where; Using rowid filter +SELECT * FROM t1 WHERE a > 0 AND b=0; +a b +1 0 +drop table t1; +SET @@optimizer_switch=@save_optimizer_switch; set @@use_stat_tables=@save_use_stat_tables; # # MDEV-18755: possible RORI-plan and possible plan with range filter From d002ec2c874bdbc66ec252d5fdaef502c2366f49 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Lindstr=C3=B6m?= Date: Mon, 4 May 2020 11:06:40 +0300 Subject: [PATCH 3/7] MDEV-21489 : wsrep_cluster_conf_id has wrong value Variable was not updated after initialization. --- .../suite/galera/r/galera_var_cluster_conf_id.result | 10 ++++++++++ .../suite/galera/t/galera_var_cluster_conf_id.test | 7 +++++++ sql/wsrep_server_service.cc | 1 + 3 files changed, 18 insertions(+) create mode 100644 mysql-test/suite/galera/r/galera_var_cluster_conf_id.result create mode 100644 mysql-test/suite/galera/t/galera_var_cluster_conf_id.test diff --git a/mysql-test/suite/galera/r/galera_var_cluster_conf_id.result b/mysql-test/suite/galera/r/galera_var_cluster_conf_id.result new file mode 100644 index 00000000000..2507b1f96f2 --- /dev/null +++ b/mysql-test/suite/galera/r/galera_var_cluster_conf_id.result @@ -0,0 +1,10 @@ +connection node_2; +connection node_1; +connection node_1; +show status like 'wsrep_cluster_conf_id'; +Variable_name Value +wsrep_cluster_conf_id 2 +connection node_2; +show status like 'wsrep_cluster_conf_id'; +Variable_name Value +wsrep_cluster_conf_id 2 diff --git a/mysql-test/suite/galera/t/galera_var_cluster_conf_id.test b/mysql-test/suite/galera/t/galera_var_cluster_conf_id.test new file mode 100644 index 00000000000..95ade07f043 --- /dev/null +++ b/mysql-test/suite/galera/t/galera_var_cluster_conf_id.test @@ -0,0 +1,7 @@ +--source include/galera_cluster.inc + +--connection node_1 +show status like 'wsrep_cluster_conf_id'; + +--connection node_2 +show status like 'wsrep_cluster_conf_id'; diff --git a/sql/wsrep_server_service.cc b/sql/wsrep_server_service.cc index d0a9b54ac1b..e6ccaca13b1 100644 --- a/sql/wsrep_server_service.cc +++ b/sql/wsrep_server_service.cc @@ -201,6 +201,7 @@ void Wsrep_server_service::log_view( wsrep_update_cluster_state_uuid(os.str().c_str()); mysql_mutex_unlock(&LOCK_status); wsrep_config_state->set(view); + wsrep_cluster_conf_id= view.view_seqno().get(); if (view.status() == wsrep::view::primary) { From a1eb15132720496bb30c31bc3d158db704b156c9 Mon Sep 17 00:00:00 2001 From: Thirunarayanan Balathandayuthapani Date: Mon, 4 May 2020 19:11:02 +0530 Subject: [PATCH 4/7] MDEV-22410 Change the error when table schema mismatch happens - InnoDB gives "table is marked as crashed and should be repaired" when table schema mismatch. --- storage/innobase/handler/ha_innodb.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index be27bcd43de..26a876c6244 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -6084,7 +6084,6 @@ ha_innobase::open(const char* name, int, uint) sql_print_error("Failed to open table %s.\n", norm_name); } -no_such_table: set_my_errno(ENOENT); DBUG_RETURN(HA_ERR_NO_SUCH_TABLE); @@ -6110,7 +6109,8 @@ no_such_table: ib_table->file_unreadable = true; ib_table->corrupted = true; dict_table_close(ib_table, FALSE, FALSE); - goto no_such_table; + set_my_errno(ENOENT); + DBUG_RETURN(HA_ERR_CRASHED_ON_USAGE); } innobase_copy_frm_flags_from_table_share(ib_table, table->s); From f5cff8980a7f55069b01dcc9e124880c75930c91 Mon Sep 17 00:00:00 2001 From: mkaruza Date: Mon, 4 May 2020 17:21:46 +0200 Subject: [PATCH 5/7] MDEV-22453: Missing suite.pm for galera_3nodes_sr (#1522) --- mysql-test/suite/galera_3nodes_sr/suite.pm | 44 ++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 mysql-test/suite/galera_3nodes_sr/suite.pm diff --git a/mysql-test/suite/galera_3nodes_sr/suite.pm b/mysql-test/suite/galera_3nodes_sr/suite.pm new file mode 100644 index 00000000000..a65c2b5df30 --- /dev/null +++ b/mysql-test/suite/galera_3nodes_sr/suite.pm @@ -0,0 +1,44 @@ +package My::Suite::GALERA_3NODES_SR; + +use lib 'suite'; +use wsrep::common; + +@ISA = qw(My::Suite); + +return wsrep_not_ok() if wsrep_not_ok(); + +push @::global_suppressions, + ( + qr(WSREP: wsrep_sst_receive_address is set to '127.0.0.1), + qr(WSREP: Could not open saved state file for reading: .*), + qr(WSREP: Could not open state file for reading: .*), + qr(WSREP: Gap in state sequence. Need state transfer.), + qr(WSREP: Failed to prepare for incremental state transfer:), + qr(WSREP:.*down context.*), + qr(WSREP: Failed to send state UUID:), + qr(WSREP: last inactive check more than .* skipping check), + qr(WSREP: SQL statement was ineffective), + qr(WSREP: Releasing seqno [0-9]* before [0-9]* was assigned.), + qr|WSREP: access file\(.*gvwstate.dat\) failed\(No such file or directory\)|, + qr(WSREP: Quorum: No node with complete state), + qr(WSREP: Initial position was provided by configuration or SST, avoiding override), + qr|WSREP: discarding established \(time wait\) .*|, + qr(WSREP: There are no nodes in the same segment that will ever be able to become donors, yet there is a suitable donor outside. Will use that one.), + qr(WSREP: evs::proto.*), + qr|WSREP: Ignoring possible split-brain \(allowed by configuration\) from view:.*|, + qr(WSREP: no nodes coming from prim view, prim not possible), + qr(WSREP: Member .* requested state transfer from .* but it is impossible to select State Transfer donor: Resource temporarily unavailable), + qr(WSREP: user message in state LEAVING), + qr(WSREP: .* sending install message failed: Transport endpoint is not connected), + qr(WSREP: .* sending install message failed: Resource temporarily unavailable), + qr(WSREP: Sending JOIN failed: -107 \(Transport endpoint is not connected\). Will retry in new primary component.), + qr(WSREP: Could not find peer:), + qr|WSREP: gcs_caused\(\) returned .*|, + qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(SYNCED\). Message ignored.|, + qr|WSREP: Protocol violation. JOIN message sender .* is not in state transfer \(JOINED\). Message ignored.|, + qr(WSREP: Action message in non-primary configuration from member [0-9]*), + qr(WSREP: --wsrep-causal-reads=ON takes precedence over --wsrep-sync-wait=0. WSREP_SYNC_WAIT_BEFORE_READ is on), + qr(WSREP: JOIN message from member .* in non-primary configuration. Ignored.), + ); + +bless { }; From 5e7e7153b439ea1b12588f5830d66b3a0cf13414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 4 May 2020 18:19:13 +0300 Subject: [PATCH 6/7] MDEV-22452: Missing call to wsrep_commit_ordered in trx_t::commit() This is a follow-up fix to the changes that were made in MDEV-7962. assert_trx_is_free(): Assert !is_wsrep(). trx_init(): Do not initialize trx->wsrep, because it must have been initialized already. trx_t::commit_in_memory(): Invoke wsrep_commit_ordered(). This call was being skipped, because the transaction object had already been freed to the pool. trx_rollback_for_mysql(), innobase_commit_low(), innobase_close_connection(): Always reset trx->wsrep. --- storage/innobase/handler/ha_innodb.cc | 27 +++++++++++++++++++-------- storage/innobase/include/trx0trx.h | 1 + storage/innobase/trx/trx0roll.cc | 3 +++ storage/innobase/trx/trx0trx.cc | 21 +++++++++++---------- 4 files changed, 34 insertions(+), 18 deletions(-) diff --git a/storage/innobase/handler/ha_innodb.cc b/storage/innobase/handler/ha_innodb.cc index 26a876c6244..45682804f50 100644 --- a/storage/innobase/handler/ha_innodb.cc +++ b/storage/innobase/handler/ha_innodb.cc @@ -4356,27 +4356,35 @@ innobase_commit_low( { #ifdef WITH_WSREP const char* tmp = 0; - if (trx->is_wsrep()) { + const bool is_wsrep = trx->is_wsrep(); + THD* thd = trx->mysql_thd; + if (is_wsrep) { #ifdef WSREP_PROC_INFO char info[64]; info[sizeof(info) - 1] = '\0'; snprintf(info, sizeof(info) - 1, "innobase_commit_low():trx_commit_for_mysql(%lld)", - (long long) wsrep_thd_trx_seqno(trx->mysql_thd)); - tmp = thd_proc_info(trx->mysql_thd, info); + (long long) wsrep_thd_trx_seqno(thd)); + tmp = thd_proc_info(thd, info); #else - tmp = thd_proc_info(trx->mysql_thd, "innobase_commit_low()"); + tmp = thd_proc_info(thd, "innobase_commit_low()"); #endif /* WSREP_PROC_INFO */ } #endif /* WITH_WSREP */ if (trx_is_started(trx)) { - trx_commit_for_mysql(trx); - } - trx->will_lock = 0; + } else { + trx->will_lock = 0; #ifdef WITH_WSREP - if (trx->is_wsrep()) { thd_proc_info(trx->mysql_thd, tmp); } + trx->wsrep = false; #endif /* WITH_WSREP */ + } + +#ifdef WITH_WSREP + if (is_wsrep) { + thd_proc_info(thd, tmp); +#endif /* WITH_WSREP */ + } } /*****************************************************************//** @@ -4739,6 +4747,9 @@ innobase_rollback_trx( if (!trx->has_logged()) { trx->will_lock = 0; +#ifdef WITH_WSREP + trx->wsrep = false; +#endif DBUG_RETURN(0); } diff --git a/storage/innobase/include/trx0trx.h b/storage/innobase/include/trx0trx.h index 3856915f8a6..87bf97f00cf 100644 --- a/storage/innobase/include/trx0trx.h +++ b/storage/innobase/include/trx0trx.h @@ -443,6 +443,7 @@ Check transaction state */ ut_ad(!(t)->id); \ ut_ad(!(t)->has_logged()); \ ut_ad(!(t)->is_referenced()); \ + ut_ad(!(t)->is_wsrep()); \ ut_ad(!(t)->read_view.is_open()); \ ut_ad((t)->lock.wait_thr == NULL); \ ut_ad(UT_LIST_GET_LEN((t)->lock.trx_locks) == 0); \ diff --git a/storage/innobase/trx/trx0roll.cc b/storage/innobase/trx/trx0roll.cc index 75bffd91aa7..637f8b709f5 100644 --- a/storage/innobase/trx/trx0roll.cc +++ b/storage/innobase/trx/trx0roll.cc @@ -228,6 +228,9 @@ dberr_t trx_rollback_for_mysql(trx_t* trx) case TRX_STATE_NOT_STARTED: trx->will_lock = 0; ut_ad(trx->mysql_thd); +#ifdef WITH_WSREP + trx->wsrep = false; +#endif return(DB_SUCCESS); case TRX_STATE_ACTIVE: diff --git a/storage/innobase/trx/trx0trx.cc b/storage/innobase/trx/trx0trx.cc index 7c25d5b61c2..b1f88b1226f 100644 --- a/storage/innobase/trx/trx0trx.cc +++ b/storage/innobase/trx/trx0trx.cc @@ -109,9 +109,6 @@ trx_init( trx->state = TRX_STATE_NOT_STARTED; trx->is_recovered = false; -#ifdef WITH_WSREP - trx->wsrep = false; -#endif /* WITH_WSREP */ trx->op_info = ""; @@ -1504,6 +1501,17 @@ inline void trx_t::commit_in_memory(const mtr_t *mtr) DBUG_LOG("trx", "Commit in memory: " << this); state= TRX_STATE_NOT_STARTED; +#ifdef WITH_WSREP + /* Serialization history has been written and the transaction is + committed in memory, which makes this commit ordered. Release commit + order critical section. */ + if (wsrep) + { + wsrep= false; + wsrep_commit_ordered(mysql_thd); + } +#endif /* WITH_WSREP */ + assert_trx_is_free(this); trx_init(this); trx_mutex_exit(this); @@ -1581,13 +1589,6 @@ void trx_t::commit() local_mtr.start(); } commit_low(mtr); -#ifdef WITH_WSREP - /* Serialization history has been written and the transaction is - committed in memory, which makes this commit ordered. Release commit - order critical section. */ - if (mtr && is_wsrep()) - wsrep_commit_ordered(mysql_thd); -#endif /* WITH_WSREP */ } /****************************************************************//** From 50f3a38e89a0f9d72c5a3f3039c39d4d08dfe0e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marko=20M=C3=A4kel=C3=A4?= Date: Mon, 4 May 2020 18:24:01 +0300 Subject: [PATCH 7/7] Add an end marker to a test --- mysql-test/main/opt_trace.result | 1 + mysql-test/main/opt_trace.test | 2 ++ 2 files changed, 3 insertions(+) diff --git a/mysql-test/main/opt_trace.result b/mysql-test/main/opt_trace.result index 1fd22e52243..f43290651f9 100644 --- a/mysql-test/main/opt_trace.result +++ b/mysql-test/main/opt_trace.result @@ -8292,4 +8292,5 @@ JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) ] ] drop table t1; +# End of 10.4 tests set optimizer_trace='enabled=off'; diff --git a/mysql-test/main/opt_trace.test b/mysql-test/main/opt_trace.test index 09b3de77848..712c58dd2d3 100644 --- a/mysql-test/main/opt_trace.test +++ b/mysql-test/main/opt_trace.test @@ -579,4 +579,6 @@ select * from t1 force index(kp1) where (kp1=2 and kp2 >=4); select JSON_DETAILED(JSON_EXTRACT(trace, '$**.range_scan_alternatives')) from INFORMATION_SCHEMA.OPTIMIZER_TRACE; drop table t1; +--echo # End of 10.4 tests + set optimizer_trace='enabled=off';