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

     1  drop table if exists t1;
     2  create table t1(a int);
     3  insert into t1 values(1),(2),(3),(4);
     4  select count(*) from t1;
     5  count(*)
     6  4
     7  begin;
     8  select count(*) from t1;
     9  count(*)
    10  4
    11  truncate t1;
    12  select count(*) from t1;
    13  count(*)
    14  0
    15  show columns from t1;
    16  Field    Type    Null    Key    Default    Extra    Comment
    17  a    INT(32)    YES        null        
    18  create table t2(a int,b int);
    19  show tables;
    20  Tables_in_truncate_table_3
    21  t2
    22  t1
    23  insert into t2 values (1,2),(2,3);
    24  rollback;
    25  show tables;
    26  Tables_in_truncate_table_3
    27  t1
    28  select count(*) from t1;
    29  count(*)
    30  4
    31  begin;
    32  truncate t1;
    33  select count(*) from t1;
    34  count(*)
    35  0
    36  show columns from t1;
    37  Field    Type    Null    Key    Default    Extra    Comment
    38  a    INT(32)    YES        null        
    39  create table t2(a int,b int);
    40  show tables;
    41  Tables_in_truncate_table_3
    42  t2
    43  t1
    44  insert into t2 values (1,2),(2,3);
    45  rollback;
    46  show tables;
    47  Tables_in_truncate_table_3
    48  t1
    49  select count(*) from t1;
    50  count(*)
    51  4
    52  begin;
    53  truncate t1;
    54  select count(*) from t1;
    55  count(*)
    56  0
    57  show columns from t1;
    58  Field    Type    Null    Key    Default    Extra    Comment
    59  a    INT(32)    YES        null        
    60  create table t2(a int,b int);
    61  show tables;
    62  Tables_in_truncate_table_3
    63  t2
    64  t1
    65  insert into t2 values (1,2),(2,3);
    66  truncate t1;
    67  truncate t1;
    68  commit;
    69  show tables;
    70  Tables_in_truncate_table_3
    71  t1
    72  t2
    73  select count(*) from t1;
    74  count(*)
    75  0
    76  select count(*) from t2;
    77  count(*)
    78  2