[MDEV-16211] Contents of transaction_registry should not be replicated by Galera Created: 2018-05-17  Updated: 2018-10-02  Resolved: 2018-10-02

Status: Closed
Project: MariaDB Server
Component/s: Galera, Versioned Tables
Affects Version/s: 10.3
Fix Version/s: 10.3.11

Type: Bug Priority: Major
Reporter: Elena Stepanova Assignee: Jan Lindström (Inactive)
Resolution: Fixed Votes: 0
Labels: None

Issue Links:
Relates
relates to MDEV-15922 system versioning with trx_id breaks ... Stalled

 Description   

test cnf file

!include include/default_mysqld.cnf
 
[mysqld]
log-bin=mysqld-bin
binlog-format=row
innodb-autoinc-lock-mode=2
default-storage-engine=innodb
innodb
log-slave-updates
wsrep-on=1
wsrep-provider=@ENV.WSREP_PROVIDER
wsrep_node_address=127.0.0.1
 
[mysqld.1]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
 
server-id=1
 
wsrep_provider_options='base_port=@mysqld.1.#galera_port;gcache.size=10M'
wsrep_cluster_address=gcomm://
wsrep_sst_receive_address='127.0.0.1:@mysqld.1.#sst_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.1.port
 
[mysqld.2]
#galera_port=@OPT.port
#ist_port=@OPT.port
#sst_port=@OPT.port
 
server-id=2
 
wsrep_provider_options='base_port=@mysqld.2.#galera_port;gcache.size=10M'
wsrep_cluster_address='gcomm://127.0.0.1:@mysqld.1.#galera_port'
wsrep_sst_receive_address='127.0.0.1:@mysqld.2.#sst_port'
wsrep_node_incoming_address=127.0.0.1:@mysqld.2.port
 
[ENV]
NODE_MYPORT_1= @mysqld.1.port
NODE_MYSOCK_1= @mysqld.1.socket
 
NODE_MYPORT_2= @mysqld.2.port
NODE_MYSOCK_2= @mysqld.2.socket
 
NODE_GALERAPORT_1= @mysqld.1.#galera_port
NODE_GALERAPORT_2= @mysqld.2.#galera_port
 
NODE_SSTPORT_1= @mysqld.1.#sst_port
NODE_SSTPORT_2= @mysqld.2.#sst_port

Remember that either the machine needs to have Galera library installed in a default location, or the test case needs to be run with WSREP_PROVIDER in the environment.

Test case

--source include/galera_cluster.inc
 
--connection node_1
 
create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) engine=InnoDB with system versioning;
insert into t1 (a) values (1),(2);
select * from mysql.transaction_registry;
 
--connection node_2
select * from mysql.transaction_registry;
insert into t1 (a) values (3),(4);
select * from mysql.transaction_registry;
 
--connection node_1
select * from mysql.transaction_registry;
 
# Cleanup
drop table t1;
--source include/galera_end.inc

Actual result

connection node_1;
create table t1 (a int, s bigint unsigned as row start, e bigint unsigned as row end, period for system_time(s,e)) engine=InnoDB with system versioning;
insert into t1 (a) values (1),(2);
select * from mysql.transaction_registry;
transaction_id	commit_id	begin_timestamp	commit_timestamp	isolation_level
36	37	2018-05-18 00:03:20.129324	2018-05-18 00:03:20.129324	REPEATABLE-READ
connection node_2;
select * from mysql.transaction_registry;
transaction_id	commit_id	begin_timestamp	commit_timestamp	isolation_level
36	37	0000-00-00 00:00:00.000000	2018-05-18 00:03:20.126456	REPEATABLE-READ
insert into t1 (a) values (3),(4);
select * from mysql.transaction_registry;
transaction_id	commit_id	begin_timestamp	commit_timestamp	isolation_level
36	37	0000-00-00 00:00:00.000000	2018-05-18 00:03:20.126456	REPEATABLE-READ
39	40	2018-05-18 00:03:20.141281	2018-05-18 00:03:20.141281	REPEATABLE-READ
connection node_1;
select * from mysql.transaction_registry;
transaction_id	commit_id	begin_timestamp	commit_timestamp	isolation_level
36	37	2018-05-18 00:03:20.129324	2018-05-18 00:03:20.129324	REPEATABLE-READ
39	40	0000-00-00 00:00:00.000000	2018-05-18 00:03:20.141942	READ-COMMITTED
drop table t1;

Note 0000-00-00 00:00:00.000000 in begin_timestamp, different values of commit_timestamp on the nodes, and sudden READ-COMMITTED in the last result set.



 Comments   
Comment by Eugene Kosov (Inactive) [ 2018-08-03 ]

Another possible bug which I can see in this test is that begin_timestamp equals commit_timestamp.

Generated at Thu Feb 08 08:27:12 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.