github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/optimistic/rollback_stmt4.result (about)

     1  drop database if exists rollbacktest;
     2  create database rollbacktest;
     3  use rollbacktest;
     4  create table if not exists t2( id int primary key );
     5  insert into t2 values(1);
     6  select * from t2;
     7  id
     8  1
     9  begin;
    10  insert into t2 values(2);
    11  select * from t2;
    12  id
    13  2
    14  1
    15  insert into t2 values(1);
    16  select * from t2;
    17  id
    18  2
    19  1
    20  1
    21  commit;
    22  Duplicate entry '1' for key 'id'
    23  select * from t2;
    24  id
    25  1
    26  begin;
    27  insert into t2 values(2);
    28  insert into t2 values(2);
    29  select * from t2;
    30  id
    31  2
    32  2
    33  1
    34  commit;
    35  select * from t2;
    36  id
    37  1
    38  2
    39  2
    40  begin;
    41  insert into t2 values(2);
    42  insert into t2 values(2);
    43  select * from t2;
    44  id
    45  2
    46  2
    47  1
    48  2
    49  2
    50  commit;
    51  Duplicate entry '2' for key 'id'
    52  select * from t2;
    53  id
    54  1
    55  2
    56  2
    57  create table t1(a int primary key );
    58  insert into t1 values(1);
    59  insert into t1 values(1);
    60  Duplicate entry '1' for key 'a'
    61  select * from t1;
    62  a
    63  1
    64  begin;
    65  delete from t1 where a = 1;
    66  insert into t1 values(1);
    67  insert into t1 values(1);
    68  select * from t1;
    69  a
    70  1
    71  1
    72  insert into t1 values(2);
    73  insert into t1 values(2);
    74  select * from t1;
    75  a
    76  1
    77  1
    78  2
    79  2
    80  insert into t1 values(3);
    81  delete from t1 where a = 3;
    82  delete from t1 where b = 3;
    83  invalid input: column b does not exist
    84  insert into t1 values(3);
    85  update t1 set a = 2;
    86  Duplicate entry '2' for key 'a'
    87  commit ;
    88  select * from t1;
    89  a
    90  1
    91  1
    92  2
    93  2
    94  3
    95  drop database if exists rollbacktest;