Is TiDB's RC isolation level different from MySQL's RC isolation level?

Note:
This topic has been translated from a Chinese forum by GPT and might contain errors.

Original topic: tidb的rc隔离级别与mysql的rc隔离级别不一样?

| username: Hacker_8Yfzq2KF

[TiDB Usage Environment] Production Environment / Testing / PoC
[TiDB Version] 7.1
[Reproduction Path] What operations were performed when the issue occurred
[Encountered Issue: In TiDB, under the RC isolation level, there are two transactions, t1 and t2. t1 starts first and queries data, then t2 modifies the data and commits. When t1 queries the data again, t1 can see the data modified by t2. However, in MySQL, under the RC isolation level, the two queries by t1 are the same? How can this be explained?

| username: Hacker007 | Original post link

TiDB Transaction Isolation Levels | PingCAP Documentation Center

| username: zhanggame1 | Original post link

There is an issue with your MySQL settings, are you sure it’s rc?

| username: hey-hoho | Original post link

It doesn’t quite seem like RC. How about posting some test code?

| username: 春风十里 | Original post link

The default transaction isolation level for MySQL is REPEATABLE-READ, not READ COMMITTED. I guess you remembered it wrong.

| username: tidb菜鸟一只 | Original post link

MySQL defaults to RR, not RC.

| username: tony5413 | Original post link

The default transaction isolation level for MySQL is Repeatable Read, while the default transaction isolation level for Oracle is Read Committed.

| username: dba远航 | Original post link

The default transaction isolation level for MySQL is RR, and for Oracle, it is RC. Make sure to check if it is a configuration issue.

| username: Hacker_8Yfzq2KF | Original post link

Sorry, everyone, I was wrong.

| username: oceanzhang | Original post link

RR stands for Repeatable Read, which is the default level in MySQL. Thank you.

| username: andone | Original post link

In MySQL, it is impossible to achieve consistency if you perform two selects after starting a transaction with RC (Read Committed) isolation level. This is because MySQL’s snapshot read is based on MVCC (Multi-Version Concurrency Control). In RC, each select will update the read view in MVCC, so the results of two reads within the same transaction will definitely not be consistent.

| username: heiwandou | Original post link

Consistency read means that the results read within a transaction are the same. After committing, you can check again. Read Committed (RC) refers to reading the data that was committed before the transaction started, not after the transaction started.