github.com/matrixorigin/matrixone@v1.2.0/test/distributed/cases/snapshot/snapshot_restore_database_level.result (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 CREATE TABLE users ( 6 id INT AUTO_INCREMENT PRIMARY KEY, 7 username VARCHAR(255) NOT NULL, 8 email VARCHAR(255) NOT NULL UNIQUE, 9 password VARCHAR(255) NOT NULL, 10 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 11 ); 12 INSERT INTO users (username, email, password) VALUES ('john_doe', 'john@example.com', 'securepassword123'); 13 INSERT INTO users (username, email, password) VALUES ('jane_smith', 'jane.smith@example.com', 'password123'),('alice_jones', 'alice.jones@gmail.com', 'ilovecats'),('bob_brown', 'bob.brown@yahoo.com', 'mysecretpassword'),('charlie_lee', 'charlie.lee@protonmail.ch', 'secure123'),('diana_wilson', 'diana.wilson@outlook.com', 'D1anaPass'); 14 INSERT INTO users (username, email, password) VALUES ('emily_adams', 'emily.adams@icloud.com', 'Em1Ly123'), ('francis_nguyen', 'francis.nguyen@domain.com', 'fNguyenPass'), ('grace_parker', 'grace.parker@server.com', 'G1race123'), ('henry_miller', 'henry.miller@company.org', 'hMillerSecret'), ('isabella_grant', 'isabella.grant@university.edu', 'iGrantPass'); 15 select count(*) from snapshot_read.test_snapshot_read; 16 count(*) 17 100 18 select count(*) from snapshot_read.users; 19 count(*) 20 11 21 create snapshot sp_01 for account sys; 22 delete from test_snapshot_read where a <= 50; 23 DELETE FROM users where email = 'john@example.com'; 24 UPDATE users SET password = 'newsecurepassword123' WHERE email = 'alice.jones@gmail.com'; 25 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); 26 select count(*) from snapshot_read.test_snapshot_read; 27 count(*) 28 90 29 select count(*) from snapshot_read.users; 30 count(*) 31 10 32 restore account sys database snapshot_read from snapshot sp_01; 33 select count(*) from snapshot_read.test_snapshot_read; 34 count(*) 35 100 36 select count(*) from snapshot_read.users; 37 count(*) 38 11 39 drop database snapshot_read; 40 drop snapshot sp_01; 41 create database if not exists snapshot_read; 42 use snapshot_read; 43 create table test_snapshot_read (a int); 44 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); 45 CREATE TABLE users ( 46 id INT AUTO_INCREMENT PRIMARY KEY, 47 username VARCHAR(255) NOT NULL, 48 email VARCHAR(255) NOT NULL UNIQUE, 49 password VARCHAR(255) NOT NULL, 50 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 51 ); 52 INSERT INTO users (username, email, password) VALUES ('john_doe', 'john@example.com', 'securepassword123'); 53 INSERT INTO users (username, email, password) VALUES ('jane_smith', 'jane.smith@example.com', 'password123'),('alice_jones', 'alice.jones@gmail.com', 'ilovecats'),('bob_brown', 'bob.brown@yahoo.com', 'mysecretpassword'),('charlie_lee', 'charlie.lee@protonmail.ch', 'secure123'),('diana_wilson', 'diana.wilson@outlook.com', 'D1anaPass'); 54 INSERT INTO users (username, email, password) VALUES ('emily_adams', 'emily.adams@icloud.com', 'Em1Ly123'), ('francis_nguyen', 'francis.nguyen@domain.com', 'fNguyenPass'), ('grace_parker', 'grace.parker@server.com', 'G1race123'), ('henry_miller', 'henry.miller@company.org', 'hMillerSecret'), ('isabella_grant', 'isabella.grant@university.edu', 'iGrantPass'); 55 select count(*) from snapshot_read.test_snapshot_read; 56 count(*) 57 100 58 select count(*) from snapshot_read.users; 59 count(*) 60 11 61 create snapshot sp_01 for account sys; 62 drop table users; 63 drop table test_snapshot_read; 64 select count(*) from snapshot_read.test_snapshot_read; 65 SQL parser error: table "test_snapshot_read" does not exist 66 select count(*) from snapshot_read.users; 67 SQL parser error: table "users" does not exist 68 restore account sys database snapshot_read from snapshot sp_01; 69 select count(*) from snapshot_read.test_snapshot_read; 70 count(*) 71 100 72 select count(*) from snapshot_read.users; 73 count(*) 74 11 75 drop database snapshot_read; 76 drop snapshot sp_01; 77 create database if not exists snapshot_read; 78 use snapshot_read; 79 create table test_snapshot_read (a int); 80 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); 81 CREATE TABLE users ( 82 id INT AUTO_INCREMENT PRIMARY KEY, 83 username VARCHAR(255) NOT NULL, 84 email VARCHAR(255) NOT NULL UNIQUE, 85 password VARCHAR(255) NOT NULL, 86 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 87 ); 88 INSERT INTO users (username, email, password) VALUES ('john_doe', 'john@example.com', 'securepassword123'); 89 INSERT INTO users (username, email, password) VALUES ('jane_smith', 'jane.smith@example.com', 'password123'),('alice_jones', 'alice.jones@gmail.com', 'ilovecats'),('bob_brown', 'bob.brown@yahoo.com', 'mysecretpassword'),('charlie_lee', 'charlie.lee@protonmail.ch', 'secure123'),('diana_wilson', 'diana.wilson@outlook.com', 'D1anaPass'); 90 INSERT INTO users (username, email, password) VALUES ('emily_adams', 'emily.adams@icloud.com', 'Em1Ly123'), ('francis_nguyen', 'francis.nguyen@domain.com', 'fNguyenPass'), ('grace_parker', 'grace.parker@server.com', 'G1race123'), ('henry_miller', 'henry.miller@company.org', 'hMillerSecret'), ('isabella_grant', 'isabella.grant@university.edu', 'iGrantPass'); 91 select count(*) from snapshot_read.test_snapshot_read; 92 count(*) 93 100 94 select count(*) from snapshot_read.users; 95 count(*) 96 11 97 create snapshot sp_01 for account sys; 98 drop database snapshot_read; 99 select count(*) from snapshot_read.test_snapshot_read; 100 invalid database snapshot_read 101 select count(*) from snapshot_read.users; 102 invalid database snapshot_read 103 restore account sys database snapshot_read from snapshot sp_01; 104 select count(*) from snapshot_read.test_snapshot_read; 105 count(*) 106 100 107 select count(*) from snapshot_read.users; 108 count(*) 109 11 110 drop snapshot sp_01; 111 drop database if exists snapshot_read; 112 create account test_account admin_name = 'test_user' identified by '111'; 113 create database if not exists snapshot_read; 114 use snapshot_read; 115 create table test_snapshot_read (a int); 116 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); 117 CREATE TABLE users ( 118 id INT AUTO_INCREMENT PRIMARY KEY, 119 username VARCHAR(255) NOT NULL, 120 email VARCHAR(255) NOT NULL UNIQUE, 121 password VARCHAR(255) NOT NULL, 122 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 123 ); 124 INSERT INTO users (username, email, password) VALUES ('john_doe', 'john@example.com', 'securepassword123'); 125 INSERT INTO users (username, email, password) VALUES ('jane_smith', 'jane.smith@example.com', 'password123'),('alice_jones', 'alice.jones@gmail.com', 'ilovecats'),('bob_brown', 'bob.brown@yahoo.com', 'mysecretpassword'),('charlie_lee', 'charlie.lee@protonmail.ch', 'secure123'),('diana_wilson', 'diana.wilson@outlook.com', 'D1anaPass'); 126 INSERT INTO users (username, email, password) VALUES ('emily_adams', 'emily.adams@icloud.com', 'Em1Ly123'), ('francis_nguyen', 'francis.nguyen@domain.com', 'fNguyenPass'), ('grace_parker', 'grace.parker@server.com', 'G1race123'), ('henry_miller', 'henry.miller@company.org', 'hMillerSecret'), ('isabella_grant', 'isabella.grant@university.edu', 'iGrantPass'); 127 select count(*) from snapshot_read.test_snapshot_read; 128 count(*) 129 100 130 select count(*) from snapshot_read.users; 131 count(*) 132 11 133 create snapshot sp_01 for account test_account; 134 delete from test_snapshot_read where a <= 50; 135 DELETE FROM users where email = 'john@example.com'; 136 UPDATE users SET password = 'newsecurepassword123' WHERE email = 'alice.jones@gmail.com'; 137 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); 138 select count(*) from snapshot_read.test_snapshot_read; 139 count(*) 140 90 141 select count(*) from snapshot_read.users; 142 count(*) 143 10 144 restore account test_account database snapshot_read from snapshot sp_01; 145 select count(*) from snapshot_read.test_snapshot_read; 146 count(*) 147 100 148 select count(*) from snapshot_read.users; 149 count(*) 150 11 151 drop database snapshot_read; 152 drop snapshot sp_01; 153 create database if not exists snapshot_read; 154 use snapshot_read; 155 create table test_snapshot_read (a int); 156 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); 157 CREATE TABLE users ( 158 id INT AUTO_INCREMENT PRIMARY KEY, 159 username VARCHAR(255) NOT NULL, 160 email VARCHAR(255) NOT NULL UNIQUE, 161 password VARCHAR(255) NOT NULL, 162 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 163 ); 164 INSERT INTO users (username, email, password) VALUES ('john_doe', 'john@example.com', 'securepassword123'); 165 INSERT INTO users (username, email, password) VALUES ('jane_smith', 'jane.smith@example.com', 'password123'),('alice_jones', 'alice.jones@gmail.com', 'ilovecats'),('bob_brown', 'bob.brown@yahoo.com', 'mysecretpassword'),('charlie_lee', 'charlie.lee@protonmail.ch', 'secure123'),('diana_wilson', 'diana.wilson@outlook.com', 'D1anaPass'); 166 INSERT INTO users (username, email, password) VALUES ('emily_adams', 'emily.adams@icloud.com', 'Em1Ly123'), ('francis_nguyen', 'francis.nguyen@domain.com', 'fNguyenPass'), ('grace_parker', 'grace.parker@server.com', 'G1race123'), ('henry_miller', 'henry.miller@company.org', 'hMillerSecret'), ('isabella_grant', 'isabella.grant@university.edu', 'iGrantPass'); 167 select count(*) from snapshot_read.test_snapshot_read; 168 count(*) 169 100 170 select count(*) from snapshot_read.users; 171 count(*) 172 11 173 create snapshot sp_01 for account test_account; 174 drop table users; 175 drop table test_snapshot_read; 176 select count(*) from snapshot_read.test_snapshot_read; 177 SQL parser error: table "test_snapshot_read" does not exist 178 select count(*) from snapshot_read.users; 179 SQL parser error: table "users" does not exist 180 restore account test_account database snapshot_read from snapshot sp_01; 181 select count(*) from snapshot_read.test_snapshot_read; 182 count(*) 183 100 184 select count(*) from snapshot_read.users; 185 count(*) 186 11 187 drop database snapshot_read; 188 drop snapshot sp_01; 189 create database if not exists snapshot_read; 190 use snapshot_read; 191 create table test_snapshot_read (a int); 192 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); 193 CREATE TABLE users ( 194 id INT AUTO_INCREMENT PRIMARY KEY, 195 username VARCHAR(255) NOT NULL, 196 email VARCHAR(255) NOT NULL UNIQUE, 197 password VARCHAR(255) NOT NULL, 198 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 199 ); 200 INSERT INTO users (username, email, password) VALUES ('john_doe', 'john@example.com', 'securepassword123'); 201 INSERT INTO users (username, email, password) VALUES ('jane_smith', 'jane.smith@example.com', 'password123'),('alice_jones', 'alice.jones@gmail.com', 'ilovecats'),('bob_brown', 'bob.brown@yahoo.com', 'mysecretpassword'),('charlie_lee', 'charlie.lee@protonmail.ch', 'secure123'),('diana_wilson', 'diana.wilson@outlook.com', 'D1anaPass'); 202 INSERT INTO users (username, email, password) VALUES ('emily_adams', 'emily.adams@icloud.com', 'Em1Ly123'), ('francis_nguyen', 'francis.nguyen@domain.com', 'fNguyenPass'), ('grace_parker', 'grace.parker@server.com', 'G1race123'), ('henry_miller', 'henry.miller@company.org', 'hMillerSecret'), ('isabella_grant', 'isabella.grant@university.edu', 'iGrantPass'); 203 select count(*) from snapshot_read.test_snapshot_read; 204 count(*) 205 100 206 select count(*) from snapshot_read.users; 207 count(*) 208 11 209 create snapshot sp_01 for account test_account; 210 drop database snapshot_read; 211 select count(*) from snapshot_read.test_snapshot_read; 212 invalid database snapshot_read 213 select count(*) from snapshot_read.users; 214 invalid database snapshot_read 215 restore account test_account database snapshot_read from snapshot sp_01; 216 select count(*) from snapshot_read.test_snapshot_read; 217 count(*) 218 100 219 drop snapshot sp_01; 220 drop database if exists snapshot_read; 221 drop account test_account; 222 create account test_account admin_name = 'test_user' identified by '111'; 223 create database if not exists snapshot_read; 224 use snapshot_read; 225 create table test_snapshot_read (a int); 226 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); 227 select count(*) from snapshot_read.test_snapshot_read; 228 count(*) 229 100 230 CREATE TABLE users ( 231 id INT AUTO_INCREMENT PRIMARY KEY, 232 username VARCHAR(255) NOT NULL, 233 email VARCHAR(255) NOT NULL UNIQUE, 234 password VARCHAR(255) NOT NULL, 235 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 236 ); 237 INSERT INTO users (username, email, password) VALUES ('john_doe', 'john@example.com', 'securepassword123'); 238 INSERT INTO users (username, email, password) VALUES ('jane_smith', 'jane.smith@example.com', 'password123'),('alice_jones', 'alice.jones@gmail.com', 'ilovecats'),('bob_brown', 'bob.brown@yahoo.com', 'mysecretpassword'),('charlie_lee', 'charlie.lee@protonmail.ch', 'secure123'),('diana_wilson', 'diana.wilson@outlook.com', 'D1anaPass'); 239 INSERT INTO users (username, email, password) VALUES ('emily_adams', 'emily.adams@icloud.com', 'Em1Ly123'), ('francis_nguyen', 'francis.nguyen@domain.com', 'fNguyenPass'), ('grace_parker', 'grace.parker@server.com', 'G1race123'), ('henry_miller', 'henry.miller@company.org', 'hMillerSecret'), ('isabella_grant', 'isabella.grant@university.edu', 'iGrantPass'); 240 select count(*) from snapshot_read.users; 241 count(*) 242 11 243 CREATE TABLE students ( 244 student_id INT PRIMARY KEY AUTO_INCREMENT, 245 name VARCHAR(100) NOT NULL, 246 age INT NOT NULL 247 ); 248 INSERT INTO students (name, age) VALUES ('Alice', 20), ('Bob', 21), ('Charlie', 22), ('Diana', 23), ('Emily', 24); 249 INSERT INTO students (name, age) VALUES ('Francis', 25), ('Grace', 26), ('Henry', 27), ('Isabella', 28), ('Jack', 29); 250 INSERT INTO students (name, age) VALUES ('Katherine', 30), ('Liam', 31), ('Mia', 32), ('Noah', 33), ('Olivia', 34); 251 INSERT INTO students (name, age) VALUES ('Penelope', 35), ('Quinn', 36), ('Ryan', 37), ('Sophia', 38), ('Thomas', 39); 252 INSERT INTO students (name, age) VALUES ('Ursula', 40), ('Victor', 41), ('Wendy', 42), ('Xander', 43), ('Yvonne', 44); 253 INSERT INTO students (name, age) VALUES ('Zachary', 45), ('Ava', 46), ('Benjamin', 47), ('Charlotte', 48), ('Daniel', 49); 254 INSERT INTO students (name, age) VALUES ('Ella', 50), ('Finn', 51), ('Gabriella', 52), ('Henry', 53), ('Isabella', 54); 255 INSERT INTO students (name, age) VALUES ('Jack', 55), ('Katherine', 56), ('Liam', 57), ('Mia', 58), ('Noah', 59); 256 INSERT INTO students (name, age) VALUES ('Olivia', 60), ('Penelope', 61), ('Quinn', 62), ('Ryan', 63), ('Sophia', 64); 257 INSERT INTO students (name, age) VALUES ('Thomas', 65), ('Ursula', 66), ('Victor', 67), ('Wendy', 68), ('Xander', 69); 258 select count(*) from snapshot_read.students; 259 count(*) 260 50 261 create snapshot sp_01 for account test_account; 262 use snapshot_read; 263 drop table students; 264 drop table users; 265 restore account test_account database snapshot_read from snapshot sp_01; 266 select count(*) from snapshot_read.students; 267 count(*) 268 50 269 select count(*) from snapshot_read.users; 270 count(*) 271 11 272 drop database snapshot_read; 273 restore account test_account database snapshot_read from snapshot sp_01; 274 select count(*) from snapshot_read.students; 275 count(*) 276 50 277 select count(*) from snapshot_read.users; 278 count(*) 279 11 280 drop snapshot sp_01; 281 drop account test_account; 282 create account test_account admin_name = 'test_user' identified by '111'; 283 create database if not exists snapshot_read; 284 use snapshot_read; 285 create table test_snapshot_read (a int); 286 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); 287 select count(*) from snapshot_read.test_snapshot_read; 288 count(*) 289 100 290 CREATE TABLE users ( 291 id INT AUTO_INCREMENT PRIMARY KEY, 292 username VARCHAR(255) NOT NULL, 293 email VARCHAR(255) NOT NULL UNIQUE, 294 password VARCHAR(255) NOT NULL, 295 created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP 296 ); 297 INSERT INTO users (username, email, password) VALUES ('john_doe', 'john@example.com', 'securepassword123'); 298 INSERT INTO users (username, email, password) VALUES ('jane_smith', 'jane.smith@example.com', 'password123'),('alice_jones', 'alice.jones@gmail.com', 'ilovecats'),('bob_brown', 'bob.brown@yahoo.com', 'mysecretpassword'),('charlie_lee', 'charlie.lee@protonmail.ch', 'secure123'),('diana_wilson', 'diana.wilson@outlook.com', 'D1anaPass'); 299 INSERT INTO users (username, email, password) VALUES ('emily_adams', 'emily.adams@icloud.com', 'Em1Ly123'), ('francis_nguyen', 'francis.nguyen@domain.com', 'fNguyenPass'), ('grace_parker', 'grace.parker@server.com', 'G1race123'), ('henry_miller', 'henry.miller@company.org', 'hMillerSecret'), ('isabella_grant', 'isabella.grant@university.edu', 'iGrantPass'); 300 select count(*) from snapshot_read.users; 301 count(*) 302 11 303 CREATE TABLE students ( 304 student_id INT PRIMARY KEY AUTO_INCREMENT, 305 name VARCHAR(100) NOT NULL, 306 age INT NOT NULL 307 ); 308 INSERT INTO students (name, age) VALUES ('Alice', 20), ('Bob', 21), ('Charlie', 22), ('Diana', 23), ('Emily', 24); 309 INSERT INTO students (name, age) VALUES ('Francis', 25), ('Grace', 26), ('Henry', 27), ('Isabella', 28), ('Jack', 29); 310 INSERT INTO students (name, age) VALUES ('Katherine', 30), ('Liam', 31), ('Mia', 32), ('Noah', 33), ('Olivia', 34); 311 INSERT INTO students (name, age) VALUES ('Penelope', 35), ('Quinn', 36), ('Ryan', 37), ('Sophia', 38), ('Thomas', 39); 312 INSERT INTO students (name, age) VALUES ('Ursula', 40), ('Victor', 41), ('Wendy', 42), ('Xander', 43), ('Yvonne', 44); 313 INSERT INTO students (name, age) VALUES ('Zachary', 45), ('Ava', 46), ('Benjamin', 47), ('Charlotte', 48), ('Daniel', 49); 314 INSERT INTO students (name, age) VALUES ('Ella', 50), ('Finn', 51), ('Gabriella', 52), ('Henry', 53), ('Isabella', 54); 315 INSERT INTO students (name, age) VALUES ('Jack', 55), ('Katherine', 56), ('Liam', 57), ('Mia', 58), ('Noah', 59); 316 INSERT INTO students (name, age) VALUES ('Olivia', 60), ('Penelope', 61), ('Quinn', 62), ('Ryan', 63), ('Sophia', 64); 317 INSERT INTO students (name, age) VALUES ('Thomas', 65), ('Ursula', 66), ('Victor', 67), ('Wendy', 68), ('Xander', 69); 318 select count(*) from snapshot_read.students; 319 count(*) 320 50 321 create snapshot sp_01 for account test_account; 322 create account test_account_2 admin_name = 'test_user_2' identified by '111'; 323 restore account test_account database snapshot_read from snapshot sp_01 to account test_account_2; 324 select count(*) from snapshot_read.students; 325 count(*) 326 50 327 select count(*) from snapshot_read.users; 328 count(*) 329 11 330 drop snapshot sp_01; 331 drop account test_account; 332 drop account test_account_2;