Debian Codegraph @

mysql-test/suite/parts/t/partition_open.test

raw
1 #
2 # MDEV-11084 Select statement with partition selection against MyISAM table opens all partitions.
3 #
4 --source include/have_partition.inc
5
6 let $datadir=`select @@datadir`;
7
8 # Table declared as having 2 partitions
9 # create table t1 (x int) egine=myisam
10 # partition by range columns (x)
11 # ( partition p0 values less than (100), partition p1 values less than (1000));
12 #
13 # But we copy only second partition. So the 'p0' can't be opened.
14
15 copy_file std_data/mdev11084.frm $datadir/test/t1.frm;
16 copy_file std_data/mdev11084.par $datadir/test/t1.par;
17 copy_file std_data/mdev11084.part1.MYD $datadir/test/t1#P#p1.MYD;
18 copy_file std_data/mdev11084.part1.MYI $datadir/test/t1#P#p1.MYI;
19 select * from t1 partition (p1);
20 --replace_result $datadir ./
21 --error ER_FILE_NOT_FOUND
22 select * from t1 partition (p0);
23 --replace_result $datadir ./
24 drop table t1;