github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/snapshot/snapshot_read_1.sql (about) 1 create snapshot snapshot_01 for account sys; 2 create database if not exists snapshot_read; 3 use snapshot_read; 4 create snapshot snapshot_02 for account sys; 5 create table test_snapshot_read (a int); 6 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); 7 select count(*) from snapshot_read.test_snapshot_read; 8 select count(*) from snapshot_read.test_snapshot_read{snapshot = 'snapshot_01'}; 9 select count(*) from snapshot_read.test_snapshot_read{snapshot = 'snapshot_02'}; 10 drop snapshot snapshot_01; 11 drop snapshot snapshot_02; 12 drop database snapshot_read; 13 14 drop account if exists test_account; 15 create account test_account admin_name = 'test_user' identified by '111'; 16 -- @session:id=2&user=test_account:test_user&password=111 17 create snapshot snapshot_01 for account test_account; 18 create database if not exists snapshot_read; 19 use snapshot_read; 20 create snapshot snapshot_02 for account test_account; 21 create table test_snapshot_read (a int); 22 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); 23 select count(*) from snapshot_read.test_snapshot_read; 24 select count(*) from snapshot_read.test_snapshot_read{snapshot = 'snapshot_01'}; 25 select count(*) from snapshot_read.test_snapshot_read{snapshot = 'snapshot_02'}; 26 drop snapshot snapshot_01; 27 drop snapshot snapshot_02; 28 drop database snapshot_read; 29 -- @session 30 drop account if exists test_account; 31 32 33 34 create database if not exists snapshot_read; 35 use snapshot_read; 36 create table test_snapshot_read (a int); 37 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); 38 select count(*) from test_snapshot_read; 39 create snapshot snapshot_01 for account sys; 40 drop table test_snapshot_read; 41 select count(*) from snapshot_read.test_snapshot_read{snapshot = 'snapshot_01'}; 42 drop database if exists snapshot_read; 43 drop snapshot snapshot_01; 44 45 46 create database if not exists snapshot_read; 47 use snapshot_read; 48 create table test_snapshot_read (a int); 49 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); 50 select count(*) from test_snapshot_read; 51 create snapshot snapshot_01 for account sys; 52 drop database snapshot_read; 53 select count(*) from snapshot_read.test_snapshot_read{snapshot = 'snapshot_01'}; 54 drop database if exists snapshot_read; 55 drop snapshot snapshot_01;