Commit 1d15300b authored by Oleksandr Byelkin's avatar Oleksandr Byelkin

Merge branch '10.4' into bb-10.4-release

parents edd0b03e c6ef9b1c
...@@ -20,17 +20,25 @@ DROP TABLE t1; ...@@ -20,17 +20,25 @@ DROP TABLE t1;
connection node_1; connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1; SET SESSION wsrep_retry_autocommit = 1;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue'; SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
INSERT INTO t1 (f1) VALUES (3); INSERT INTO t1 (f1) VALUES (3);
connection node_1a; connection node_1a;
SET DEBUG_SYNC = 'now WAIT_FOR before_cert'; SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
connection node_2; connection node_2;
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
connection node_1; connection node_1a;
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
0 0
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';
connection node_1;
SELECT COUNT(*) FROM t1;
COUNT(*)
1
SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
DROP TABLE t1; DROP TABLE t1;
connection node_1; connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
...@@ -64,6 +72,8 @@ SET SESSION wsrep_retry_autocommit = 64; ...@@ -64,6 +72,8 @@ SET SESSION wsrep_retry_autocommit = 64;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit'; SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64'; SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue EXECUTE 64';
INSERT INTO t1 VALUES (5); INSERT INTO t1 VALUES (5);
connection node_2;
connection node_1;
connection node_1; connection node_1;
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
COUNT(*) COUNT(*)
......
...@@ -25,6 +25,8 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu ...@@ -25,6 +25,8 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu
SET DEBUG_SYNC = 'now WAIT_FOR before_cert'; SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2 --connection node_2
--let $wait_condition = SELECT count(*)=1 FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
--source include/wait_condition.inc
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
--connection node_1 --connection node_1
...@@ -44,6 +46,7 @@ DROP TABLE t1; ...@@ -44,6 +46,7 @@ DROP TABLE t1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB; CREATE TABLE t1 (f1 INTEGER PRIMARY KEY) ENGINE=InnoDB;
SET SESSION wsrep_retry_autocommit = 1; SET SESSION wsrep_retry_autocommit = 1;
SET GLOBAL debug_dbug = '+d,sync.wsrep_retry_autocommit';
SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue'; SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continue';
--send INSERT INTO t1 (f1) VALUES (3) --send INSERT INTO t1 (f1) VALUES (3)
...@@ -51,14 +54,21 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu ...@@ -51,14 +54,21 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu
SET DEBUG_SYNC = 'now WAIT_FOR before_cert'; SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2 --connection node_2
--let $wait_condition = SELECT count(*)=1 FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
--source include/wait_condition.inc
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
--connection node_1a
SET DEBUG_SYNC = 'now WAIT_FOR wsrep_retry_autocommit_reached';
SELECT COUNT(*) FROM t1;
SET DEBUG_SYNC = 'now SIGNAL wsrep_retry_autocommit_continue';
--connection node_1 --connection node_1
--error 0,ER_LOCK_DEADLOCK
--reap --reap
SELECT COUNT(*) FROM t1; SELECT COUNT(*) FROM t1;
SET DEBUG_SYNC = 'RESET'; SET DEBUG_SYNC = 'RESET';
SET GLOBAL debug_dbug = NULL;
DROP TABLE t1; DROP TABLE t1;
...@@ -79,6 +89,8 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu ...@@ -79,6 +89,8 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu
SET DEBUG_SYNC = 'now WAIT_FOR before_cert'; SET DEBUG_SYNC = 'now WAIT_FOR before_cert';
--connection node_2 --connection node_2
--let $wait_condition = SELECT count(*)=1 FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
--source include/wait_condition.inc
TRUNCATE TABLE t1; TRUNCATE TABLE t1;
--connection node_1a --connection node_1a
...@@ -114,6 +126,11 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu ...@@ -114,6 +126,11 @@ SET DEBUG_SYNC = 'wsrep_before_certification SIGNAL before_cert WAIT_FOR continu
--send INSERT INTO t1 VALUES (5) --send INSERT INTO t1 VALUES (5)
--connection node_2
--let $wait_condition = SELECT count(*)=1 FROM information_schema.TABLES WHERE TABLE_SCHEMA='test' AND TABLE_NAME='t1'
--source include/wait_condition.inc
--connection node_1
--disable_query_log --disable_query_log
--disable_result_log --disable_result_log
--let $count = 64 --let $count = 64
......
connection node_2;
connection node_1;
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
SET SESSION wsrep_trx_fragment_size=1;
START TRANSACTION;
INSERT INTO t1 VALUES(1);
SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
INSERT INTO t1 VALUES(2);
ERROR HY000: Error while appending streaming replication fragment
COMMIT;
SELECT * FROM t1;
f1
SET debug_dbug='-d,ib_create_table_fail_too_many_trx';
DROP TABLE t1;
CALL mtr.add_suppression("Error writing into mysql.wsrep_streaming_log: 177");
#
# MDEV-30838 - Assertion `m_thd == _current_thd()' failed in
# virtual int Wsrep_client_service::bf_rollback()
#
--source include/galera_cluster.inc
--source include/have_debug_sync.inc
CREATE TABLE t1 (f1 INTEGER PRIMARY KEY);
SET SESSION wsrep_trx_fragment_size=1;
START TRANSACTION;
INSERT INTO t1 VALUES(1);
SET debug_dbug='+d,ib_create_table_fail_too_many_trx';
--error ER_ERROR_DURING_COMMIT
INSERT INTO t1 VALUES(2);
COMMIT;
SELECT * FROM t1;
SET debug_dbug='-d,ib_create_table_fail_too_many_trx';
DROP TABLE t1;
CALL mtr.add_suppression("Error writing into mysql.wsrep_streaming_log: 177");
...@@ -991,10 +991,9 @@ int Wsrep_schema::append_fragment(THD* thd, ...@@ -991,10 +991,9 @@ int Wsrep_schema::append_fragment(THD* thd,
Wsrep_schema_impl::store(frag_table, 3, flags); Wsrep_schema_impl::store(frag_table, 3, flags);
Wsrep_schema_impl::store(frag_table, 4, data.data(), data.size()); Wsrep_schema_impl::store(frag_table, 4, data.data(), data.size());
int error; if (Wsrep_schema_impl::insert(frag_table)) {
if ((error= Wsrep_schema_impl::insert(frag_table))) {
WSREP_ERROR("Failed to write to frag table: %d", error);
trans_rollback_stmt(thd); trans_rollback_stmt(thd);
close_thread_tables(thd);
thd->lex->restore_backup_query_tables_list(&query_tables_list_backup); thd->lex->restore_backup_query_tables_list(&query_tables_list_backup);
DBUG_RETURN(1); DBUG_RETURN(1);
} }
......
...@@ -228,7 +228,14 @@ static inline void wsrep_override_error(THD* thd, ...@@ -228,7 +228,14 @@ static inline void wsrep_override_error(THD* thd,
break; break;
case wsrep::e_append_fragment_error: case wsrep::e_append_fragment_error:
/* TODO: Figure out better error number */ /* TODO: Figure out better error number */
wsrep_override_error(thd, ER_ERROR_DURING_COMMIT, 0, status); if (status)
wsrep_override_error(thd, ER_ERROR_DURING_COMMIT,
"Error while appending streaming replication fragment"
"(provider status: %s)",
wsrep::provider::to_string(status).c_str());
else
wsrep_override_error(thd, ER_ERROR_DURING_COMMIT,
"Error while appending streaming replication fragment");
break; break;
case wsrep::e_not_supported_error: case wsrep::e_not_supported_error:
wsrep_override_error(thd, ER_NOT_SUPPORTED_YET); wsrep_override_error(thd, ER_NOT_SUPPORTED_YET);
......
Subproject commit 275a0af8c5b92f0ee33cfe9e23f3db5f59b56e9d Subproject commit 4951c38357737d568b554402bc5b6abe88a38fe1
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment