Skip to content

Commit 8dfd157

Browse files
author
Nirbhay Choubey
committed
Merge branch '5.5-galera' into 10.0-galera
2 parents dad555a + 3f515a0 commit 8dfd157

File tree

4 files changed

+65
-1
lines changed

4 files changed

+65
-1
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
#
2+
# MDEV-9290 : InnoDB: Assertion failure in file trx0sys.cc line 353
3+
# InnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno
4+
#
5+
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
6+
START TRANSACTION;
7+
INSERT INTO t1 VALUES (1);
8+
INSERT INTO t1 VALUES (2);
9+
COMMIT;
10+
SELECT * FROM t1;
11+
i
12+
1
13+
2
14+
DROP TABLE t1;

mysql-test/suite/galera/t/galera_var_dirty_reads.test

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,14 @@
55
--source include/galera_cluster.inc
66
--source include/have_innodb.inc
77

8+
--disable_query_log
9+
# Save original auto_increment_offset values.
10+
--connection node_1
11+
let $auto_increment_offset_node_1 = `SELECT @@global.auto_increment_offset`;
12+
--connection node_2
13+
let $auto_increment_offset_node_2 = `SELECT @@global.auto_increment_offset`;
14+
--enable_query_log
15+
816
--connection node_2
917
--let $wsrep_cluster_address_saved = `SELECT @@global.wsrep_cluster_address`
1018

@@ -41,6 +49,14 @@ SELECT * FROM t1;
4149
# Cleanup
4250
DROP TABLE t1;
4351

52+
--disable_query_log
53+
# Restore original auto_increment_offset values.
54+
--connection node_1
55+
--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_1;
56+
--connection node_2
57+
--eval SET @@global.auto_increment_offset = $auto_increment_offset_node_2;
58+
--enable_query_log
59+
4460
--source include/galera_end.inc
4561
--echo # End of test
4662

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
--source include/galera_cluster.inc
2+
--source include/have_innodb.inc
3+
4+
--echo #
5+
--echo # MDEV-9290 : InnoDB: Assertion failure in file trx0sys.cc line 353
6+
--echo # InnoDB: Failing assertion: xid_seqno > trx_sys_cur_xid_seqno
7+
--echo #
8+
9+
--connection node_1
10+
CREATE TABLE t1 (i INT) ENGINE=InnoDB;
11+
12+
--connection node_2
13+
# Note: a multi-statement transaction should always be the "first" one to execute
14+
# on this node.
15+
START TRANSACTION;
16+
INSERT INTO t1 VALUES (1);
17+
INSERT INTO t1 VALUES (2);
18+
COMMIT;
19+
20+
--connection node_1
21+
SELECT * FROM t1;
22+
DROP TABLE t1;
23+
24+
--source include/galera_end.inc

sql/mysqld.cc

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5140,10 +5140,20 @@ static int init_server_components()
51405140
THD *current_thd_saved= current_thd;
51415141
set_current_thd(tmp);
51425142

5143+
/*
5144+
Also save/restore server_status and variables.option_bits and they
5145+
get altered during init_for_queries().
5146+
*/
5147+
unsigned int server_status_saved= tmp->server_status;
5148+
ulonglong option_bits_saved= tmp->variables.option_bits;
5149+
51435150
tmp->init_for_queries();
51445151

51455152
/* Restore current_thd. */
51465153
set_current_thd(current_thd_saved);
5154+
5155+
tmp->server_status= server_status_saved;
5156+
tmp->variables.option_bits= option_bits_saved;
51475157
}
51485158
}
51495159
mysql_mutex_unlock(&LOCK_thread_count);
@@ -5511,7 +5521,7 @@ pthread_handler_t start_wsrep_THD(void *arg)
55115521
WSREP_ERROR("Failed to create/initialize system thread");
55125522

55135523
/* Abort if its the first applier/rollbacker thread. */
5514-
if (wsrep_creating_startup_threads < 2)
5524+
if (wsrep_creating_startup_threads == 1)
55155525
unireg_abort(1);
55165526
else
55175527
return NULL;

0 commit comments

Comments
 (0)