1
0
mirror of https://github.com/MariaDB/server.git synced 2025-07-27 18:02:13 +03:00

MDEV-11412 Ensure that table is truly dropped when using DROP TABLE

minor post-review fixes
* remove duplicate tests
* first file indicates table existance even with discovery
* don't duplicate trigger dropping code
This commit is contained in:
Sergei Golubchik
2020-06-15 12:13:44 +02:00
parent b014720b6c
commit 2bb5981c20
4 changed files with 13 additions and 75 deletions

View File

@ -32,7 +32,7 @@ create table t1(a int) engine=innodb;
# create test user
create user test identified by '123456';
grant all privileges on test.t1 to 'test'@'%'identified by '123456' with grant option;
grant all privileges on test.t1 to 'test'@'%'identified by '123456';
# connect as test
connect (con_test, localhost, test,'123456', );
@ -52,13 +52,6 @@ drop user test;
# check files in datadir about t1
--list_files $DATADIR/test/
--echo #Test4: drop table can drop consistent table as well
create table t1(a int) engine=innodb;
drop table t1;
# check files in datadir about t1
--list_files $DATADIR/test/
--echo #Test5: drop table with triger, and with missing frm
# create table t1 with triger and rm frm
create table t1(a int)engine=innodb;
@ -107,19 +100,6 @@ drop table if exists t1;
# check files in datadir about t1
--list_files $DATADIR/test/
--echo #Test8: check compatibility with if exists
create table t1(a int)engine=innodb;
--remove_file $DATADIR/test/t1.frm
# first drop will success
drop table t1;
# check files in datadir about t1
--list_files $DATADIR/test/
# second drop with if exists will success
drop table if exists t1;
--echo #Test9: check compatibility with restrict/cascade
# create table with foreign key reference and rm frm
CREATE TABLE parent (id INT NOT NULL, PRIMARY KEY (id)) ENGINE=INNODB;