summaryrefslogtreecommitdiff
path: root/storage/tokudb/mysql-test/tokudb_bugs/t/tokudb_drop_part_table_668.test
blob: 4c40339be5a2fe07bee46c35f61d4dd52c0d8ef8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# verify that we can drop partitioned tokudb tables created in tokudb 6.6.8

source include/have_tokudb.inc;
source include/have_partition.inc;
set default_storage_engine='tokudb';

# capture the datadir
let $MYSQLD_DATADIR= `SELECT @@datadir`;

--source include/shutdown_mysqld.inc
# remove all tokudb file in the datadir
system mkdir $MYSQLD_DATADIR/save;
system mv $MYSQLD_DATADIR/*toku* $MYSQLD_DATADIR/test $MYSQLD_DATADIR/save;
system mkdir $MYSQLD_DATADIR/test;

# install 6.6.8 tokudb test files
system cp -r std_data/tokudb_drop_part_table_668/data/* $MYSQLD_DATADIR;
--source include/start_mysqld.inc

create table tc (a int, b int, c int, primary key(a), key(b)) engine=tokudb partition by hash(a) partitions 2;

# check that the tokudb meta data gets dropped when the table is dropped
select dictionary_name from information_schema.tokudb_file_map;
drop table ta;
select dictionary_name from information_schema.tokudb_file_map;
drop table tc;
select dictionary_name from information_schema.tokudb_file_map;

# check that the test dir is empty
list_files $MYSQLD_DATADIR/test *.frm;

--source include/shutdown_mysqld.inc
# restore saved datadir
system rm -rf $MYSQLD_DATADIR/*toku* $MYSQLD_DATADIR/test;
system mv $MYSQLD_DATADIR/save/* $MYSQLD_DATADIR;
system rmdir $MYSQLD_DATADIR/save;
--source include/start_mysqld.inc