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

     1  create database if not exists snapshot_read;
     2  use snapshot_read;
     3  create table test_snapshot_read (a int);
     4  INSERT INTO test_snapshot_read (a) VALUES(1), (2), (3), (4), (5),(6), (7), (8), (9), (10), (11), (12),(13), (14), (15), (16), (17), (18), (19), (20),(21), (22), (23), (24), (25), (26), (27), (28), (29), (30),(31), (32), (33), (34), (35), (36), (37), (38), (39), (40),(41), (42), (43), (44), (45), (46), (47), (48), (49), (50),(51), (52), (53), (54), (55), (56), (57), (58), (59), (60),(61), (62), (63), (64), (65), (66), (67), (68), (69), (70),(71), (72), (73), (74), (75), (76), (77), (78), (79), (80), (81), (82), (83), (84), (85), (86), (87), (88), (89), (90),(91), (92), (93), (94), (95), (96), (97), (98), (99), (100);
     5  select count(*) from test_snapshot_read;
     6  create view test_snapshot_read_view as select * from test_snapshot_read;
     7  create snapshot snapshot_01 for account sys;
     8  show tables like'test%';
     9  show create table test_snapshot_read;
    10  show create table test_snapshot_read_view;
    11  drop table test_snapshot_read;
    12  drop view test_snapshot_read_view;
    13  select count(*) from snapshot_read.test_snapshot_read{snapshot = 'snapshot_01'};
    14  show tables like'test%';
    15  show create table test_snapshot_read;
    16  show create table test_snapshot_read_view;
    17  show tables like'test%' {snapshot = 'snapshot_01'};
    18  show create table test_snapshot_read {snapshot = 'snapshot_01'};
    19  show create table test_snapshot_read_view {snapshot = 'snapshot_01'};
    20  drop database if exists snapshot_read;
    21  drop snapshot snapshot_01;
    22  
    23  
    24  create database if not exists snapshot_read;
    25  use snapshot_read;
    26  create table test_snapshot_read (a int);
    27  INSERT INTO test_snapshot_read (a) VALUES(1), (2), (3), (4), (5),(6), (7), (8), (9), (10), (11), (12),(13), (14), (15), (16), (17), (18), (19), (20),(21), (22), (23), (24), (25), (26), (27), (28), (29), (30),(31), (32), (33), (34), (35), (36), (37), (38), (39), (40),(41), (42), (43), (44), (45), (46), (47), (48), (49), (50),(51), (52), (53), (54), (55), (56), (57), (58), (59), (60),(61), (62), (63), (64), (65), (66), (67), (68), (69), (70),(71), (72), (73), (74), (75), (76), (77), (78), (79), (80), (81), (82), (83), (84), (85), (86), (87), (88), (89), (90),(91), (92), (93), (94), (95), (96), (97), (98), (99), (100);
    28  select count(*) from test_snapshot_read;
    29  create view test_snapshot_read_view as select * from test_snapshot_read;
    30  create snapshot snapshot_01 for account sys;
    31  show tables like'test%';
    32  show create table test_snapshot_read;
    33  show create table test_snapshot_read_view;
    34  show databases like 'snapshot_read';
    35  drop table test_snapshot_read;
    36  drop view test_snapshot_read_view;
    37  select count(*) from snapshot_read.test_snapshot_read{snapshot = 'snapshot_01'};
    38  show tables like'test%';
    39  show create table test_snapshot_read;
    40  show create table test_snapshot_read_view;
    41  show tables like'test%' {snapshot = 'snapshot_01'};
    42  show create table test_snapshot_read {snapshot = 'snapshot_01'};
    43  show create table test_snapshot_read_view {snapshot = 'snapshot_01'};
    44  show databases like 'snapshot_read';
    45  drop database if exists snapshot_read;
    46  show tables from snapshot_read like'test%' {snapshot = 'snapshot_01'};
    47  show create table snapshot_read.test_snapshot_read {snapshot = 'snapshot_01'};
    48  show create table snapshot_read.test_snapshot_read_view {snapshot = 'snapshot_01'};
    49  show databases like 'snapshot_read' {snapshot = 'snapshot_01'};
    50  drop snapshot snapshot_01;