Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove bvt tag of snapshot restore #15870

Merged
merged 15 commits into from
May 11, 2024
2 changes: 0 additions & 2 deletions test/distributed/cases/snapshot/snapshot.sql
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
-- create snapshot success
-- @bvt:issue#14784
create snapshot snapshot_01 for cluster;
create account default_1 ADMIN_NAME admin IDENTIFIED BY '111111';
create snapshot snapshot_02 for account default_1;
Expand Down Expand Up @@ -65,4 +64,3 @@ drop snapshot if exists snapshot_09;
drop snapshot if exists snapshot_10;
drop account default_1;
drop account default_2;
-- @bvt:issue
Original file line number Diff line number Diff line change
Expand Up @@ -573,6 +573,27 @@ count(*)
create snapshot snapshot_01 for account test_account;
drop database test_snapshot_restore;
drop database snapshot_read;
restore account test_account from snapshot snapshot_01 to account test_account;
use test_snapshot_restore;
select count(*) from test_snapshot_restore.test_restore;
count(*)
100
select count(*) from test_snapshot_restore.test_restore_2;
count(*)
50
select count(*) from test_snapshot_restore.factories;
count(*)
100
use snapshot_read;
select count(*) from snapshot_read.test_snapshot_read;
count(*)
100
select count(*) from snapshot_read.users;
count(*)
11
select count(*) from snapshot_read.students;
count(*)
50
create account test_account_01 admin_name = 'test_user' identified by '111';
restore account test_account from snapshot snapshot_01 to account test_account_01 ;
use test_snapshot_restore;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-- @bvt:issue#14784
-- account level
create database if not exists snapshot_read;
use snapshot_read;
Expand Down Expand Up @@ -449,10 +448,8 @@ drop snapshot snapshot_01;


-- sys account restore normal account to newAccount

create account test_account admin_name = 'test_user' identified by '111';
-- @session:id=6&user=test_account:test_user&password=111

create database if not exists snapshot_read;
use snapshot_read;
create table test_snapshot_read (a int);
Expand Down Expand Up @@ -574,7 +571,6 @@ INSERT INTO factories (factory_name, address) VALUES ('Factory UUUU', '1991 Oak
INSERT INTO factories (factory_name, address) VALUES ('Factory WWWW', '2031 Birch St, Springfield, IL 62801'), ('Factory XXXX', '2051 Cedar St, Springfield, IL 62802');

select count(*) from test_snapshot_restore.factories;

-- @session

create snapshot snapshot_01 for account test_account;
Expand All @@ -584,10 +580,24 @@ drop database test_snapshot_restore;
drop database snapshot_read;
-- @session


restore account test_account from snapshot snapshot_01 to account test_account;
-- @session:id=8&user=test_account:test_user&password=111
use test_snapshot_restore;
select count(*) from test_snapshot_restore.test_restore;
select count(*) from test_snapshot_restore.test_restore_2;
select count(*) from test_snapshot_restore.factories;

use snapshot_read;
select count(*) from snapshot_read.test_snapshot_read;
select count(*) from snapshot_read.users;
select count(*) from snapshot_read.students;
-- @session

create account test_account_01 admin_name = 'test_user' identified by '111';
restore account test_account from snapshot snapshot_01 to account test_account_01 ;

-- @session:id=8&user=test_account_01:test_user&password=111
-- @session:id=9&user=test_account_01:test_user&password=111
use test_snapshot_restore;
select count(*) from test_snapshot_restore.test_restore;
select count(*) from test_snapshot_restore.test_restore_2;
Expand All @@ -602,4 +612,3 @@ select count(*) from snapshot_read.students;
drop account test_account;
drop account test_account_01;
drop snapshot snapshot_01;
-- @bvt:issue
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-- @bvt:issue#14784
-- database level update/delete/insert
create database if not exists snapshot_read;
use snapshot_read;
Expand Down Expand Up @@ -289,6 +288,7 @@ drop snapshot sp_01;
drop account test_account;


-- restore to new account
create account test_account admin_name = 'test_user' identified by '111';
-- @session:id=8&user=test_account:test_user&password=111
create database if not exists snapshot_read;
Expand Down Expand Up @@ -344,4 +344,3 @@ select count(*) from snapshot_read.users;
drop snapshot sp_01;
drop account test_account;
drop account test_account_2;
-- @bvt:issue
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
-- @bvt:issue#14784
-- table level noraml
create database if not exists snapshot_read;
use snapshot_read;
Expand Down Expand Up @@ -343,4 +342,3 @@ select count(*) from snapshot_read.users;
drop snapshot sp_01;
drop account test_account;
drop account test_account_2;
-- @bvt:issue