Repository navigation
Description
Is there an existing issue for the same bug?
- I have checked the existing issues.
Environment
- Version or commit-id (e.g. v0.1.0 or 8b23a93):
- Hardware parameters:
- OS type:
- Others:Actual Behavior
terminal 1:
mysql> create database test;use test;
Query OK, 0 rows affected (0.01 sec)
Database changed
mysql> create table t(a int,b int);insert into t values(10,10);
Query OK, 0 rows affected (0.04 sec)
Query OK, 1 row affected (0.04 sec)
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> update t set a = a -1;
Query OK, 1 row affected (0.04 sec)
mysql> update t set b = b + 1;
Query OK, 1 row affected (0.03 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
terminal 2:
mysql> use test;
Database changed
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from t; // select before commit.
+------+------+
| a | b |
+------+------+
| 10 | 10 |
+------+------+
1 row in set (0.03 sec)
mysql> select * from t; // select after commit. obey 'repeatable read'
Empty set (0.04 sec)
Expected Behavior
terminal 1:
mysql> create database test;use test;
Query OK, 0 rows affected (0.01 sec)
Database changed
mysql> create table t(a int,b int);insert into t values(10,10);
Query OK, 0 rows affected (0.04 sec)
Query OK, 1 row affected (0.04 sec)
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> update t set a = a -1;
Query OK, 1 row affected (0.04 sec)
mysql> update t set b = b + 1;
Query OK, 1 row affected (0.03 sec)
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
terminal 2:
mysql> use test;
Database changed
mysql> begin;
Query OK, 0 rows affected (0.00 sec)
mysql> select * from t; // select before commit.
+------+------+
| a | b |
+------+------+
| 10 | 10 |
+------+------+
1 row in set (0.03 sec)
mysql> select * from t; // select after commit.
+------+------+
| a | b |
+------+------+
| 10 | 10 |
+------+------+
1 row in set (0.03 sec)
Steps to Reproduce
No response
Additional information
No response
Activity
fix Repeatable Read Bug,issue matrixorigin#5388
add test for matrixorigin#5388
fix Repeatable Read Bug,issue #5388 (#5390)
domingozhang commentedon Nov 2, 2022
Now all queries are '10 10' now whether before or after commit;
fix Repeatable Read Bug,issue matrixorigin#5388 (matrixorigin#5390)