mirror of
https://github.com/MariaDB/server.git
synced 2026-05-06 23:25:34 +02:00
make rename test to work with InnoDB too
This commit is contained in:
parent
445198c10e
commit
8087cefc07
3 changed files with 62 additions and 19 deletions
|
|
@ -31,3 +31,45 @@
|
||||||
insert t1 (id, v) values (1, x'e360d63ebe554f3fcdbc523f4522193f5236083d');
|
insert t1 (id, v) values (1, x'e360d63ebe554f3fcdbc523f4522193f5236083d');
|
||||||
select id, hex(v) from t1;
|
select id, hex(v) from t1;
|
||||||
id hex(v)
|
id hex(v)
|
||||||
|
@@ -324,26 +346,32 @@
|
||||||
|
# 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
|
||||||
|
|
|
||||||
|
|
@ -322,34 +322,28 @@ t1 CREATE TABLE `t1` (
|
||||||
drop table t1;
|
drop table t1;
|
||||||
db.opt
|
db.opt
|
||||||
# Test RENAME TABLE with vector index
|
# 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
|
db.opt
|
||||||
t1#i#01.MYD
|
t1#i#01.ibd
|
||||||
t1#i#01.MYI
|
|
||||||
t1.MYD
|
|
||||||
t1.MYI
|
|
||||||
t1.frm
|
t1.frm
|
||||||
|
t1.ibd
|
||||||
rename table t1 to t2;
|
rename table t1 to t2;
|
||||||
db.opt
|
db.opt
|
||||||
t2#i#01.MYD
|
t2#i#01.ibd
|
||||||
t2#i#01.MYI
|
|
||||||
t2.MYD
|
|
||||||
t2.MYI
|
|
||||||
t2.frm
|
t2.frm
|
||||||
|
t2.ibd
|
||||||
create database test1;
|
create database test1;
|
||||||
rename table test.t2 to test1.t1;
|
rename table test.t2 to test1.t1;
|
||||||
db.opt
|
db.opt
|
||||||
t1#i#01.MYD
|
t1#i#01.ibd
|
||||||
t1#i#01.MYI
|
|
||||||
t1.MYD
|
|
||||||
t1.MYI
|
|
||||||
t1.frm
|
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;
|
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
|
db.opt
|
||||||
t1#i#01.MYI
|
|
||||||
t1.MYD
|
|
||||||
t1.MYI
|
|
||||||
t1.frm
|
t1.frm
|
||||||
|
t1.ibd
|
||||||
drop database test1;
|
drop database test1;
|
||||||
db.opt
|
db.opt
|
||||||
|
|
|
||||||
|
|
@ -123,7 +123,7 @@ drop table t1;
|
||||||
list_files $datadir/test;
|
list_files $datadir/test;
|
||||||
|
|
||||||
--echo # Test RENAME TABLE with vector index
|
--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;
|
list_files $datadir/test;
|
||||||
rename table t1 to t2;
|
rename table t1 to t2;
|
||||||
list_files $datadir/test;
|
list_files $datadir/test;
|
||||||
|
|
@ -131,8 +131,15 @@ create database test1;
|
||||||
rename table test.t2 to test1.t1;
|
rename table test.t2 to test1.t1;
|
||||||
list_files $datadir/test1;
|
list_files $datadir/test1;
|
||||||
|
|
||||||
|
if ($MTR_COMBINATION_MYISAM) {
|
||||||
remove_file $datadir/test1/t1#i#01.MYD;
|
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;
|
rename table test1.t1 to test1.t2;
|
||||||
list_files $datadir/test1;
|
list_files $datadir/test1;
|
||||||
drop database test1;
|
drop database test1;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue