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

     1  set autocommit=1;
     2  drop table if exists t1;
     3  create table t1(a int);
     4  start transaction;
     5  insert into t1 values(1);
     6  start transaction;
     7  select * from t1;
     8  insert into t1 values(2);
     9  select * from t1;
    10  rollback;
    11  select * from t1;
    12  start transaction;
    13  create table t2(a int);
    14  insert into t2 values (1);
    15  rollback;
    16  select * from t2;
    17  start transaction;
    18  use autocommit;
    19  start transaction;
    20  drop table t1;
    21  commit;
    22  start transaction;
    23  set autocommit=1;
    24  commit;
    25  start transaction;
    26  show tables;
    27  commit;
    28  set autocommit=0;
    29  drop table if exists t1;
    30  create table t1(a int);
    31  insert into t1 values(1);
    32  rollback;
    33  create table t1(a int);
    34  select * from t1;
    35  insert into t1 values(1);
    36  insert into t1 values(2);
    37  set autocommit=1;
    38  commit;
    39  set autocommit=1;
    40  set autocommit=0;
    41  select * from t1;
    42  insert into t1 values(3);
    43  create table t2 (a int);
    44  rollback;
    45  select * from t2;
    46  insert into t1 values(3);
    47  use autocommit;
    48  show tables;
    49  commit;
    50  set autocommit = 1;