[MDEV-16485] Insert rows unable to execute correctly on slave's System-Versioned Tables Created: 2018-06-14  Updated: 2018-08-06  Resolved: 2018-08-06

Status: Closed
Project: MariaDB Server
Component/s: Replication, Versioned Tables
Affects Version/s: 10.3.7
Fix Version/s: 10.3.8

Type: Bug Priority: Major
Reporter: shi wei hong Assignee: Sergei Golubchik
Resolution: Fixed Votes: 1
Labels: replication
Environment:

operating system : CentOS release 6.9 (Final)
jemalloc : 4.5.0



 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 |
+------+----------------------------+----------------------------+


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