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

     1  drop database if exists db1;
     2  create database db1;
     3  use db1;
     4  drop table if exists t;
     5  create table t (a int);
     6  insert into t values (1), (2), (3), (4), (5);
     7  select mo_ctl('dn', 'flush', 'db1.t');
     8  mo_ctl(dn, flush, db1.t)
     9  {\n  "method": "Flush",\n  "result": [\n    {\n      "returnStr": "OK"\n    }\n  ]\n}\n
    10  select * from t;
    11  a
    12  1
    13  2
    14  3
    15  4
    16  5
    17  delete from t where a in (1, 2, 3);
    18  begin;
    19  select mo_ctl('dn', 'flush', 'db1.t');
    20  mo_ctl(dn, flush, db1.t)
    21  {\n  "method": "Flush",\n  "result": [\n    {\n      "returnStr": "OK"\n    }\n  ]\n}\n
    22  select * from t;
    23  a
    24  4
    25  5
    26  commit;
    27  drop table if exists t;
    28  create table t (a int);
    29  insert into t values (1), (2), (3), (4), (5);
    30  delete from t where a = 2;
    31  insert into t values (6);
    32  delete from t where a = 3;
    33  begin;
    34  insert into db1.t values (100); -- this row is invisible for begin
    35  select mo_ctl('dn', 'flush', 'db1.t'); -- flush
    36  mo_ctl(dn, flush, db1.t)
    37  {\n  "method": "Flush",\n  "result": [\n    {\n      "returnStr": "OK"\n    }\n  ]\n}\n
    38  select a from db1.t where a = 1; -- pull
    39  a
    40  1
    41  select * from t;
    42  a
    43  1
    44  4
    45  5
    46  6
    47  commit;
    48  drop table if exists t;
    49  create table t (a int);
    50  insert into t values (1), (2), (3);
    51  begin;
    52  select * from t;
    53  a
    54  1
    55  2
    56  3
    57  select mo_ctl('dn', 'flush', 'db1.t');
    58  mo_ctl(dn, flush, db1.t)
    59  {\n  "method": "Flush",\n  "result": [\n    {\n      "returnStr": "OK"\n    }\n  ]\n}\n
    60  select a from db1.t where a = 1;
    61  a
    62  1
    63  select * from t;
    64  a
    65  1
    66  2
    67  3
    68  commit;
    69  drop database if exists db1;