#### db_type: tidb #### #### test_type: sda_lost_self_update #### #### isolation: repeatable-read #### current_result: The query result of the current SQL statement. Each row of table is separated by a space, and the fields in each row are separated by commas expected_result: The expected result is the expected query result for each SQL that conforms to the serializability theory set TXN_ISOLATION = repeatable-read for each session ----------rat_sda_lost_self_update test prepare---------- Q0-T1 execute sql: 'DROP TABLE IF EXISTS t1;' Q0-T1 execute sql: 'CREATE TABLE t1 (k INT PRIMARY KEY, v INT);' Q0-T1 execute sql: 'INSERT INTO t1 VALUES (0, 0);' Q0-T1 execute opt: 'COMMIT'; ----------rat_sda_lost_self_update test run---------- Q1-T1 execute sql: 'BEGIN PESSIMISTIC;' Q1 finished at: 2022-4-1 17:18:26:496:957 Q2-T1 execute sql: 'UPDATE t1 SET v=1 WHERE k=0;' Q2 finished at: 2022-4-1 17:18:26:498:608 Q3-T2 execute sql: 'BEGIN PESSIMISTIC;' Q3 finished at: 2022-4-1 17:18:26:597:25 Q4-T2 execute sql: 'UPDATE t1 SET v=2 WHERE k=0;' Q5-T1 execute sql: 'SELECT * FROM t1 WHERE k=0;' current_result: (0,1) *(1) expected_result: (0,1) *(2) expected_result: (0,1) Q5 finished at: 2022-4-1 17:18:26:697:678 Q6-T1 execute opt: 'COMMIT'; Q6 finished at: 2022-4-1 17:18:26:713:125 Q4 finished at: 2022-4-1 17:18:26:747:442 Q7-T2 execute opt: 'COMMIT'; Q7 finished at: 2022-4-1 17:18:26:797:191 Q8-T3 execute sql: 'SELECT * FROM t1;' current_result: (0,2) *(1) expected_result: (0,2) (2) expected_result: (0,1) Q8 finished at: 2022-4-1 17:18:26:799:257 Q9-T3 execute opt: 'COMMIT'; Q9 finished at: 2022-4-1 17:18:26:800:94 The current result is consistent with the [(1) expected_result] of serial scheduling Test Result: Avoid Reason: Data anomaly did not occur and the data is consistent