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

Insert rows unable to execute correctly on slave's System-Versioned Tables

    XMLWordPrintable

Details

    Description

      I want to use the System-Versioned Tables on slave.

      I tested 2 MySQL versions (5.6.25,5.7.16),and the master binlog format is ROW,the slave version is 10.3.7-MariaDB.

      When I insert rows into the master,the result on master is

      mysql> select * from t;
      +------+
      | x    |
      +------+
      |    1 |
      |    2 |
      |    3 |
      +------+
      3 rows in set (0.00 sec).
      

      But on slave:

      MariaDB [test]> select * from t;
      Empty set (0.001 sec)
       
      MariaDB [test]> select *,row_start,row_end from t for system_time all;
      +------+----------------------------+----------------------------+
      | x    | row_start                  | row_end                    |
      +------+----------------------------+----------------------------+
      |    1 | 0000-00-00 00:00:00.000000 | 0000-00-00 00:00:00.000000 |
      |    2 | 0000-00-00 00:00:00.000000 | 0000-00-00 00:00:00.000000 |
      |    3 | 0000-00-00 00:00:00.000000 | 0000-00-00 00:00:00.000000 |
      +------+----------------------------+----------------------------+
      3 rows in set (0.000 sec).
      

      the row_start and row_end be set to '0000-00-00 00:00:00.000000'.

      When I insert rows into the slave, it work normally:

      MariaDB [test]> insert into t values (4);
      Query OK, 1 row affected (0.009 sec)
       
      MariaDB [test]> select * from t;
      +------+
      | x    |
      +------+
      |    4 |
      +------+
      1 row in set (0.000 sec)
       
      MariaDB [test]> select *,row_start,row_end from t for system_time all;
      +------+----------------------------+----------------------------+
      | x    | row_start                  | row_end                    |
      +------+----------------------------+----------------------------+
      |    1 | 0000-00-00 00:00:00.000000 | 0000-00-00 00:00:00.000000 |
      |    2 | 0000-00-00 00:00:00.000000 | 0000-00-00 00:00:00.000000 |
      |    3 | 0000-00-00 00:00:00.000000 | 0000-00-00 00:00:00.000000 |
      |    4 | 2018-06-13 16:01:52.073203 | 2038-01-19 11:14:07.999999 |
      +------+----------------------------+----------------------------+
      

      Attachments

        Activity

          People

            serg Sergei Golubchik
            swhphq shi wei hong
            Votes:
            1 Vote for this issue
            Watchers:
            5 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.