Commit 9a5c75a0 authored by Nirbhay Choubey's avatar Nirbhay Choubey

MDEV-9853: WSREP says it cannot get fake InnoDB transaction ID followed by segmentation fault

Ha_trx_info should not be reset in ha_fake_trx_id() as it is
later used during commit.
parent 9b2151f6
...@@ -58,4 +58,14 @@ t2 CREATE TABLE `t2` ( ...@@ -58,4 +58,14 @@ t2 CREATE TABLE `t2` (
KEY `idx` (`i`) KEY `idx` (`i`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 ) ENGINE=InnoDB DEFAULT CHARSET=latin1
DROP TABLE t1, t2; DROP TABLE t1, t2;
#
# MDEV-9853: WSREP says it cannot get fake InnoDB transaction ID
# followed by segmentation fault
#
CREATE TABLE `t1`(`c1` INT) ENGINE=INNODB;
SET autocommit=0;
CREATE TABLE `t2` (`c1` INT) ENGINE=INNODB SELECT * FROM t1;
COMMIT;
SET autocommit=1;
DROP TABLE t1, t2;
# End of tests # End of tests
...@@ -67,6 +67,7 @@ push @::global_suppressions, ...@@ -67,6 +67,7 @@ push @::global_suppressions,
qr|WSREP: gcs_caused\(\) returned .*|, 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 \(SYNCED\). Message ignored.|,
qr(WSREP: Action message in non-primary configuration from member [0-9]*), qr(WSREP: Action message in non-primary configuration from member [0-9]*),
qr(WSREP: cannot get fake InnoDB transaction ID),
); );
......
...@@ -54,5 +54,20 @@ SHOW CREATE TABLE t2; ...@@ -54,5 +54,20 @@ SHOW CREATE TABLE t2;
# Cleanup # Cleanup
DROP TABLE t1, t2; DROP TABLE t1, t2;
--echo #
--echo # MDEV-9853: WSREP says it cannot get fake InnoDB transaction ID
--echo # followed by segmentation fault
--echo #
CREATE TABLE `t1`(`c1` INT) ENGINE=INNODB;
SET autocommit=0;
CREATE TABLE `t2` (`c1` INT) ENGINE=INNODB SELECT * FROM t1;
COMMIT;
SET autocommit=1;
# Cleanup
DROP TABLE t1, t2;
--source include/galera_end.inc
--echo # End of tests --echo # End of tests
...@@ -6122,7 +6122,6 @@ void ha_fake_trx_id(THD *thd) ...@@ -6122,7 +6122,6 @@ void ha_fake_trx_id(THD *thd)
else else
hton->fake_trx_id(hton, thd); hton->fake_trx_id(hton, thd);
ha_info_next= ha_info->next(); ha_info_next= ha_info->next();
ha_info->reset(); /* keep it conveniently zero-filled */
} }
DBUG_VOID_RETURN; DBUG_VOID_RETURN;
} }
......
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