Skip to content

Commit 27eff20

Browse files
authored
rm tag 22350 (#22616)
rm tag 22350 Approved by: @heni02
1 parent 14d5a6f commit 27eff20

File tree

2 files changed

+145
-9
lines changed

2 files changed

+145
-9
lines changed

test/distributed/cases/snapshot/clone/clone_sys_db_table_to_new_db_table.result

Lines changed: 73 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -219,35 +219,100 @@ mo_version
219219
drop database mo_catalog_new_new;
220220
drop database mo_catalog_new;
221221
drop database if exists test100;
222-
223222
create database test100;
224-
225223
use test100;
224+
create table table01(col1 int primary key , col2 decimal, col3 char, col4 varchar(20), col5 text, col6 double);
225+
insert into table01 values (1, 2, 'a', '23eiojf', 'r23v324r23rer', 3923.324);
226+
insert into table01 values (2, 3, 'b', '32r32r', 'database', 1111111);
227+
drop table if exists table02;
228+
create table table02 (col1 int unique key, col2 varchar(20));
229+
insert into table02 (col1, col2) values (133, 'database');
230+
drop snapshot if exists sp07;
231+
create snapshot sp07 for table test100 table01;
232+
create database test_1000 clone test100 {snapshot = 'sp07'};
233+
internal error: the snapshot sp07 doesnot contain the table table02
234+
drop database test100;
235+
drop database test_1000;
236+
Can't drop database 'test_1000'; database doesn't exist
237+
drop snapshot sp07;
238+
drop database if exists test101;
239+
create database test101;
240+
use test101;
241+
create table table01(col1 int primary key , col2 decimal, col3 char, col4 varchar(20), col5 text, col6 double);
242+
insert into table01 values (1, 2, 'a', '23eiojf', 'r23v324r23rer', 3923.324);
243+
insert into table01 values (2, 3, 'b', '32r32r', 'database', 1111111);
244+
drop table if exists table02;
245+
create table table02 (col1 int unique key, col2 varchar(20));
246+
insert into table02 (col1, col2) values (133, 'database');
247+
drop snapshot if exists sp08;
248+
create snapshot sp08 for table test100 table01;
249+
internal error: table test100.table01 does not exist
250+
drop database if exists db08;
251+
create database db08;
252+
create table db08.table01 clone test100.table01 {snapshot = 'sp08'};
253+
internal error: find 0 snapshot records by name(sp08), expect only 1
254+
drop database test101;
255+
drop database db08;
256+
drop snapshot sp08;
257+
internal error: snapshot sp08 does not exist
258+
drop database if exists test102;
259+
260+
create database test102;
261+
262+
use test102;
226263

227264
create table table01(col1 int primary key , col2 decimal, col3 char, col4 varchar(20), col5 text, col6 double);
228265

229266
insert into table01 values (1, 2, 'a', '23eiojf', 'r23v324r23rer', 3923.324);
230267

231268
insert into table01 values (2, 3, 'b', '32r32r', 'database', 1111111);
232269

270+
drop database if exists test103;
271+
272+
create database test103;
273+
274+
use test103;
275+
233276
drop table if exists table02;
234277

235278
create table table02 (col1 int unique key, col2 varchar(20));
236279

237280
insert into table02 (col1, col2) values (133, 'database');
238281

239-
drop snapshot if exists sp07;
282+
drop snapshot if exists sp09;
240283

241-
create snapshot sp07 for table test100 table01;
284+
create snapshot sp09 for database test102;
242285

243-
create database test_1000 clone test100 {snapshot = 'sp07'};
286+
drop database if exists db09;
244287

245-
drop database test100;
288+
create database db09 clone test103 {snapshot = 'sp09'};
289+
internal error: the snapshot sp09 doesnot contain the table table02
290+
drop database test102;
246291

247-
drop database test_1000;
292+
drop database test103;
248293

249-
drop snapshot sp07;
294+
drop snapshot sp09;
250295

296+
drop account if exists acc02;
297+
create account acc02 admin_name = 'test_account' identified by '111';
298+
drop database if exists test102;
299+
create database test102;
300+
use test102;
301+
create table table01(col1 int primary key , col2 decimal, col3 char, col4 varchar(20), col5 text, col6 double);
302+
insert into table01 values (1, 2, 'a', '23eiojf', 'r23v324r23rer', 3923.324);
303+
insert into table01 values (2, 3, 'b', '32r32r', 'database', 1111111);
304+
drop database if exists test103;
305+
create database test103;
306+
use test103;
307+
drop table if exists table02;
308+
create table table02 (col1 int unique key, col2 varchar(20));
309+
insert into table02 (col1, col2) values (133, 'database');
310+
drop snapshot if exists sp10;
311+
create snapshot sp10 for account acc02;
312+
create database db09 clone test102 {snapshot = 'sp10'};
313+
drop account acc02;
314+
drop snapshot sp10;
315+
drop database db09;
251316
drop account if exists acc06;
252317
create account acc06 admin_name = 'test_account' identified by '111';
253318
drop database if exists test10;

test/distributed/cases/snapshot/clone/clone_sys_db_table_to_new_db_table.sql

Lines changed: 72 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,6 @@ drop database mo_catalog_new;
145145

146146

147147
-- table level snapshot, clone db
148-
-- @bvt:issue#22350
149148
drop database if exists test100;
150149
create database test100;
151150
use test100;
@@ -161,10 +160,82 @@ create database test_1000 clone test100 {snapshot = 'sp07'};
161160
drop database test100;
162161
drop database test_1000;
163162
drop snapshot sp07;
163+
164+
165+
166+
-- clone table a where table a does not have snapshot
167+
drop database if exists test101;
168+
create database test101;
169+
use test101;
170+
create table table01(col1 int primary key , col2 decimal, col3 char, col4 varchar(20), col5 text, col6 double);
171+
insert into table01 values (1, 2, 'a', '23eiojf', 'r23v324r23rer', 3923.324);
172+
insert into table01 values (2, 3, 'b', '32r32r', 'database', 1111111);
173+
drop table if exists table02;
174+
create table table02 (col1 int unique key, col2 varchar(20));
175+
insert into table02 (col1, col2) values (133, 'database');
176+
drop snapshot if exists sp08;
177+
create snapshot sp08 for table test100 table01;
178+
drop database if exists db08;
179+
create database db08;
180+
create table db08.table01 clone test100.table01 {snapshot = 'sp08'};
181+
drop database test101;
182+
drop database db08;
183+
drop snapshot sp08;
184+
185+
186+
187+
-- clone database a where database a does not have snapshot
188+
-- @bvt:issue#22615
189+
drop database if exists test102;
190+
create database test102;
191+
use test102;
192+
create table table01(col1 int primary key , col2 decimal, col3 char, col4 varchar(20), col5 text, col6 double);
193+
insert into table01 values (1, 2, 'a', '23eiojf', 'r23v324r23rer', 3923.324);
194+
insert into table01 values (2, 3, 'b', '32r32r', 'database', 1111111);
195+
drop database if exists test103;
196+
create database test103;
197+
use test103;
198+
drop table if exists table02;
199+
create table table02 (col1 int unique key, col2 varchar(20));
200+
insert into table02 (col1, col2) values (133, 'database');
201+
drop snapshot if exists sp09;
202+
create snapshot sp09 for database test102;
203+
drop database if exists db09;
204+
create database db09 clone test103 {snapshot = 'sp09'};
205+
drop database test102;
206+
drop database test103;
207+
drop snapshot sp09;
164208
-- @bvt:issue
165209

166210

167211

212+
-- account level snapshot for account acc01, clone db from snapshot acc02
213+
drop account if exists acc02;
214+
create account acc02 admin_name = 'test_account' identified by '111';
215+
-- @session:id=7&user=acc02:test_account&password=111
216+
drop database if exists test102;
217+
create database test102;
218+
use test102;
219+
create table table01(col1 int primary key , col2 decimal, col3 char, col4 varchar(20), col5 text, col6 double);
220+
insert into table01 values (1, 2, 'a', '23eiojf', 'r23v324r23rer', 3923.324);
221+
insert into table01 values (2, 3, 'b', '32r32r', 'database', 1111111);
222+
drop database if exists test103;
223+
create database test103;
224+
use test103;
225+
drop table if exists table02;
226+
create table table02 (col1 int unique key, col2 varchar(20));
227+
insert into table02 (col1, col2) values (133, 'database');
228+
-- @session
229+
drop snapshot if exists sp10;
230+
create snapshot sp10 for account acc02;
231+
232+
create database db09 clone test102 {snapshot = 'sp10'};
233+
drop account acc02;
234+
drop snapshot sp10;
235+
drop database db09;
236+
237+
238+
168239
drop account if exists acc06;
169240
create account acc06 admin_name = 'test_account' identified by '111';
170241
drop database if exists test10;

0 commit comments

Comments
 (0)