Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-16211

Contents of transaction_registry should not be replicated by Galera

    XMLWordPrintable

Details

    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.

      Attachments

        Issue Links

          Activity

            People

              jplindst Jan Lindström (Inactive)
              elenst Elena Stepanova
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Git Integration

                  Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.