github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/snapshot/snapshot.sql (about)

     1  -- create snapshot success
     2  create snapshot snapshot_01 for cluster;
     3  create account default_1 ADMIN_NAME admin IDENTIFIED BY '111111';
     4  create snapshot snapshot_02 for account default_1;
     5  select sleep(1);
     6  create snapshot snapshot_03 for account default_1;
     7  select sleep(1);
     8  create snapshot snapshot_04 for account default_1;
     9  -- @ignore:1
    10  show snapshots;
    11  -- @ignore:1
    12  show snapshots where SNAPSHOT_NAME = 'snapshot_01';
    13  -- @ignore:1
    14  show snapshots where SNAPSHOT_LEVEL = 'cluster';
    15  -- @ignore:1
    16  show snapshots where ACCOUNT_NAME = 'default_1';
    17  DROP SNAPSHOT snapshot_01;
    18  DROP SNAPSHOT snapshot_02;
    19  DROP SNAPSHOT snapshot_03;
    20  DROP SNAPSHOT snapshot_04;
    21  
    22  -- @session:id=1&user=default_1:admin&password=111111
    23  create snapshot snapshot_05 for account default_1;
    24  select sleep(1);
    25  create snapshot snapshot_06 for account default_1;
    26  select sleep(1);
    27  create snapshot snapshot_07 for account default_1;
    28  -- @ignore:1
    29  show snapshots;
    30  -- @ignore:1
    31  show snapshots where SNAPSHOT_NAME = 'snapshot_07';
    32  -- @ignore:1
    33  show snapshots where SNAPSHOT_LEVEL = 'account';
    34  -- @ignore:1
    35  show snapshots where ACCOUNT_NAME = 'default_1';
    36  -- @session
    37  drop account default_1;
    38  
    39  -- create snapshot failed
    40  create snapshot snapshot_08 for account default_1;
    41  create account default_1 ADMIN_NAME admin IDENTIFIED BY '111111';
    42  create snapshot snapshot_09 for account default_1;
    43  select sleep(1);
    44  create snapshot snapshot_09 for account default_1;
    45  create account default_2 ADMIN_NAME admin IDENTIFIED BY '111111';
    46  create snapshot snapshot_10 for account default_2;
    47  -- @ignore:1
    48  show snapshots;
    49  
    50  -- @session:id=2&user=default_1:admin&password=111111
    51  create snapshot snapshot_11 for account default_1;
    52  create snapshot snapshot_12 for account default_2;
    53  create snapshot snapshot_13 for cluster;
    54  -- @ignore:1
    55  show snapshots;
    56  create user  efg identified by '111';
    57  -- @session
    58  
    59  -- @session:id=4&user=default_1:efg&password=111
    60  create snapshot snapshot_14 for account default_1;
    61  create snapshot snapshot_15 for account default_2;
    62  -- @session
    63  drop snapshot if exists snapshot_09;
    64  drop snapshot if exists snapshot_10;
    65  drop account default_1;
    66  drop account default_2;