summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarko Mäkelä <marko.makela@mariadb.com>2022-10-13 08:27:23 +0300
committerMarko Mäkelä <marko.makela@mariadb.com>2022-10-13 08:27:23 +0300
commit4142a73822aa61baa37bd14fa157447b4f02da10 (patch)
treedf9dc61923db5e5d47dfed4b4c2141c80c06faff
parenta992c615a66341ec4c86d0f97fcdb36e3b837a54 (diff)
parent5fffdbc8d5cbae5b63513d5e3d023bb4c928ec90 (diff)
downloadmariadb-git-4142a73822aa61baa37bd14fa157447b4f02da10.tar.gz
Merge 10.5 into 10.6
-rw-r--r--mysql-test/suite/galera/disabled.def6
-rw-r--r--mysql-test/suite/galera/r/MDEV-29142.result2
-rw-r--r--mysql-test/suite/galera/t/MDEV-29142.test2
-rw-r--r--mysql-test/suite/galera_3nodes/disabled.def1
-rw-r--r--mysql-test/suite/galera_sr/disabled.def3
-rw-r--r--sql/wsrep_mysqld.cc19
-rw-r--r--sql/wsrep_thd.h1
7 files changed, 20 insertions, 14 deletions
diff --git a/mysql-test/suite/galera/disabled.def b/mysql-test/suite/galera/disabled.def
index a796e5a35d7..e518dca5a84 100644
--- a/mysql-test/suite/galera/disabled.def
+++ b/mysql-test/suite/galera/disabled.def
@@ -36,9 +36,5 @@ pxc-421: wsrep_provider is read-only for security reasons
query_cache: MDEV-15805 Test failure on galera.query_cache
versioning_trx_id: MDEV-18590: galera.versioning_trx_id: Test failure: mysqltest: Result content mismatch
galera_bf_abort_at_after_statement : Unstable
+galera_bf_abort_shutdown : MDEV-29773 Assertion failure on sql/wsrep_mysqld.cc:2893 in wsrep_bf_abort_shutdown
-# Recent trouble
-MDEV-26597 : crashes on 10.5
-MDEV-27615 : crashes on 10.5 after MDEV-26597 fix
-MDEV-29142 : fails on 10.5 with WSREP: Inconsistency detected
-galera_bf_abort_shutdown : MDEV-29368 shutdown hang
diff --git a/mysql-test/suite/galera/r/MDEV-29142.result b/mysql-test/suite/galera/r/MDEV-29142.result
index 3816ca19867..2528520e236 100644
--- a/mysql-test/suite/galera/r/MDEV-29142.result
+++ b/mysql-test/suite/galera/r/MDEV-29142.result
@@ -5,10 +5,12 @@ connection node_2;
connection node_1;
call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*");
call mtr.add_suppression("WSREP: Failed to apply write set:.*");
+call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*");
connection node_2;
call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing");
call mtr.add_suppression("WSREP: Failed to open SR table for write");
call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0");
+call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*");
SET @@global.tx_read_only = ON;
SET default_storage_engine = SEQUENCE;
create table t1 (c1 int);
diff --git a/mysql-test/suite/galera/t/MDEV-29142.test b/mysql-test/suite/galera/t/MDEV-29142.test
index 7f68e91859c..7e9776b005b 100644
--- a/mysql-test/suite/galera/t/MDEV-29142.test
+++ b/mysql-test/suite/galera/t/MDEV-29142.test
@@ -10,11 +10,13 @@
--connection node_1
call mtr.add_suppression("WSREP: Event .* Write_rows_v1 apply failed:.*");
call mtr.add_suppression("WSREP: Failed to apply write set:.*");
+call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*");
--connection node_2
call mtr.add_suppression("WSREP: Failed to open table mysql.wsrep_streaming_log for writing");
call mtr.add_suppression("WSREP: Failed to open SR table for write");
call mtr.add_suppression("WSREP: Failed to recover SR transactions from schema: wsrep_on : 0");
+call mtr.add_suppression("WSREP: Inconsistency detected: Inconsistent by consensus on.*");
SET @@global.tx_read_only = ON;
--error 0,1286
diff --git a/mysql-test/suite/galera_3nodes/disabled.def b/mysql-test/suite/galera_3nodes/disabled.def
index e3d73500699..3eacc7d3344 100644
--- a/mysql-test/suite/galera_3nodes/disabled.def
+++ b/mysql-test/suite/galera_3nodes/disabled.def
@@ -32,3 +32,4 @@ galera_ipv6_rsync_section : MDEV-24097 MTR sporadaically fails: Failed to start
galera_ssl_reload : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
galera_toi_vote : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
galera_wsrep_schema_init : MDEV-24097 MTR sporadaically fails: Failed to start mysqld or mysql_shutdown failed
+galera_parallel_apply_3nodes : MDEV-29774 Galera test galera_parallel_apply_3nodes is unstable
diff --git a/mysql-test/suite/galera_sr/disabled.def b/mysql-test/suite/galera_sr/disabled.def
index 8d13198cd0c..54701b1eb11 100644
--- a/mysql-test/suite/galera_sr/disabled.def
+++ b/mysql-test/suite/galera_sr/disabled.def
@@ -12,6 +12,3 @@
GCF-1060 : MDEV-26528 wrong usage of mutex LOCK_thd_kill and LOCK_thd_kill
-galera_sr_ws_size2 : MDEV-29773 assertion failure
-galera-features#56 : MDEV-29773 assertion failure
-MDEV-27615 : MDEV-29773 assertion failure
diff --git a/sql/wsrep_mysqld.cc b/sql/wsrep_mysqld.cc
index 958ef0ea3e5..f1494773ffc 100644
--- a/sql/wsrep_mysqld.cc
+++ b/sql/wsrep_mysqld.cc
@@ -3676,19 +3676,28 @@ bool wsrep_consistency_check(THD *thd)
void wsrep_commit_empty(THD* thd, bool all)
{
DBUG_ENTER("wsrep_commit_empty");
- WSREP_DEBUG("wsrep_commit_empty(%llu)", thd->thread_id);
+ WSREP_DEBUG("wsrep_commit_empty for %llu client_state %s client_mode"
+ " %s trans_state %s sql %s",
+ thd_get_thread_id(thd),
+ wsrep::to_c_string(thd->wsrep_cs().state()),
+ wsrep::to_c_string(thd->wsrep_cs().mode()),
+ wsrep::to_c_string(thd->wsrep_cs().transaction().state()),
+ wsrep_thd_query(thd));
+
if (wsrep_is_real(thd, all) &&
wsrep_thd_is_local(thd) &&
thd->wsrep_trx().active() &&
!thd->internal_transaction() &&
thd->wsrep_trx().state() != wsrep::transaction::s_committed)
{
- /* @todo CTAS with STATEMENT binlog format and empty result set
- seems to be committing empty. Figure out why and try to fix
- elsewhere. */
+ /* Here transaction is either empty (i.e. no changes) or
+ it was CREATE TABLE with no row binlog format or
+ we have already aborted transaction e.g. because max writeset size
+ has been reached. */
DBUG_ASSERT(!wsrep_has_changes(thd) ||
(thd->lex->sql_command == SQLCOM_CREATE_TABLE &&
- !thd->is_current_stmt_binlog_format_row()));
+ !thd->is_current_stmt_binlog_format_row()) ||
+ thd->wsrep_cs().transaction().state() == wsrep::transaction::s_aborted);
bool have_error= wsrep_current_error(thd);
int ret= wsrep_before_rollback(thd, all) ||
wsrep_after_rollback(thd, all) ||
diff --git a/sql/wsrep_thd.h b/sql/wsrep_thd.h
index e55895ffbe8..fd48df1494f 100644
--- a/sql/wsrep_thd.h
+++ b/sql/wsrep_thd.h
@@ -184,7 +184,6 @@ void wsrep_reset_threadvars(THD *);
static inline void wsrep_override_error(THD *thd, uint error, const char *format= 0, ...)
{
- DBUG_ASSERT(error != ER_ERROR_DURING_COMMIT);
Diagnostics_area *da= thd->get_stmt_da();
if (da->is_ok() ||
da->is_eof() ||