github.com/matrixorigin/matrixone@v0.7.0/test/distributed/cases/transaction/atomicity.sql (about)

     1  drop table if exists test_11;
     2  create table test_11 (c int primary key,d int);
     3  
     4  begin;
     5  Insert into test_11 values(1,1);
     6  Insert into test_11 values(2,2);
     7  Rollback;
     8  select * from test_11 ;
     9  
    10  begin;
    11  Insert into test_11 values(1,1);
    12  Insert into test_11 values(2,2);
    13  commit;
    14  select * from test_11 ;
    15  
    16  drop table if exists test_11;
    17  create table test_11 (c int primary key,d int);
    18  Insert into test_11 values(1,1);
    19  Insert into test_11 values(2,2);
    20  Insert into test_11 values(3,1);
    21  Insert into test_11 values(4,2);
    22  begin;
    23  delete from test_11 where c < 3;
    24  update test_11 set d = c + 1 where c >= 3;
    25  rollback;
    26  select * from test_11 ;
    27  
    28  begin;
    29  delete from test_11 where c <3;
    30  update test_11 set d = c + 1 where c >= 3;
    31  commit;
    32  select * from test_11 ;
    33  
    34  drop table if exists test_11;
    35  begin;
    36  create table test_11 (c int primary key,d int);
    37  Insert into test_11 values(1,1);
    38  Insert into test_11 values(2,2);
    39  Insert into test_11 values(3,1);
    40  Insert into test_11 values(4,2);
    41  rollback;
    42  select * from test_11 ;
    43  
    44  begin;
    45  create table test_11 (c int primary key,d int);
    46  Insert into test_11 values(1,1);
    47  Insert into test_11 values(2,2);
    48  Insert into test_11 values(3,1);
    49  Insert into test_11 values(4,2);
    50  delete from test_11 where c <3;
    51  update test_11 set d = c + 1 where c >= 3;
    52  commit;
    53  select * from test_11;
    54  
    55  drop table if exists test_11;
    56  create table test_11 (c int primary key,d int);
    57  Insert into test_11 values(1,1);
    58  Insert into test_11 values(2,2);
    59  begin;
    60  Insert into test_11 values(3,1);
    61  Insert into test_11 values(4,2);
    62  rollback;
    63  select * from test_11;
    64  
    65  drop table if exists test_11;
    66  create table test_11 (c int primary key,d int);
    67  Insert into test_11 values(1,1);
    68  Insert into test_11 values(2,2);
    69  begin;
    70  Insert into test_11 values(3,1);
    71  Insert into test_11 values(4,2);
    72  commit;
    73  drop table if exists test_11;
    74  select * from test_11 ;
    75  
    76