Commit e5d56bc2 authored by Sergei Golubchik's avatar Sergei Golubchik

make rename test to work with InnoDB too

parent 943f008d
......@@ -30,3 +30,45 @@
select * from t1;
id v
show create table t1;
@@ -321,26 +343,32 @@ db.opt
# Test RENAME TABLE with vector index
create table t1 (id int auto_increment primary key, v blob not null, vector index (v));
db.opt
-t1#i#01.ibd
+t1#i#01.MYD
+t1#i#01.MYI
+t1.MYD
+t1.MYI
t1.frm
-t1.ibd
rename table t1 to t2;
db.opt
-t2#i#01.ibd
+t2#i#01.MYD
+t2#i#01.MYI
+t2.MYD
+t2.MYI
t2.frm
-t2.ibd
create database test1;
rename table test.t2 to test1.t1;
db.opt
-t1#i#01.ibd
+t1#i#01.MYD
+t1#i#01.MYI
+t1.MYD
+t1.MYI
t1.frm
-t1.ibd
-call mtr.add_suppression('InnoDB: Cannot rename.*because the source file does not exist');
-call mtr.add_suppression('InnoDB: File ./test1/t1#i#01.ibd was not found');
rename table test1.t1 to test1.t2;
Got one of the listed errors
db.opt
+t1#i#01.MYI
+t1.MYD
+t1.MYI
t1.frm
-t1.ibd
drop database test1;
db.opt
......@@ -319,34 +319,28 @@ t1 CREATE TABLE `t1` (
drop table t1;
db.opt
# Test RENAME TABLE with vector index
create table t1 (id int auto_increment primary key, v blob not null, vector index (v)) engine=MyISAM;
create table t1 (id int auto_increment primary key, v blob not null, vector index (v));
db.opt
t1#i#01.MYD
t1#i#01.MYI
t1.MYD
t1.MYI
t1#i#01.ibd
t1.frm
t1.ibd
rename table t1 to t2;
db.opt
t2#i#01.MYD
t2#i#01.MYI
t2.MYD
t2.MYI
t2#i#01.ibd
t2.frm
t2.ibd
create database test1;
rename table test.t2 to test1.t1;
db.opt
t1#i#01.MYD
t1#i#01.MYI
t1.MYD
t1.MYI
t1#i#01.ibd
t1.frm
t1.ibd
call mtr.add_suppression('InnoDB: Cannot rename.*because the source file does not exist');
call mtr.add_suppression('InnoDB: File ./test1/t1#i#01.ibd was not found');
rename table test1.t1 to test1.t2;
ERROR HY000: Error on rename of './test1/t1#i#01.MYD' to './test1/t2#i#01.MYD' (Errcode: 2 "No such file or directory")
Got one of the listed errors
db.opt
t1#i#01.MYI
t1.MYD
t1.MYI
t1.frm
t1.ibd
drop database test1;
db.opt
......@@ -121,7 +121,7 @@ drop table t1;
list_files $datadir/test;
--echo # Test RENAME TABLE with vector index
create table t1 (id int auto_increment primary key, v blob not null, vector index (v)) engine=MyISAM;
create table t1 (id int auto_increment primary key, v blob not null, vector index (v));
list_files $datadir/test;
rename table t1 to t2;
list_files $datadir/test;
......@@ -129,8 +129,15 @@ create database test1;
rename table test.t2 to test1.t1;
list_files $datadir/test1;
if ($MTR_COMBINATION_MYISAM) {
remove_file $datadir/test1/t1#i#01.MYD;
--error 7
}
if ($MTR_COMBINATION_INNODB) {
call mtr.add_suppression('InnoDB: Cannot rename.*because the source file does not exist');
call mtr.add_suppression('InnoDB: File ./test1/t1#i#01.ibd was not found');
remove_file $datadir/test1/t1#i#01.ibd;
}
--error 7,ER_ERROR_ON_RENAME
rename table test1.t1 to test1.t2;
list_files $datadir/test1;
drop database test1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment