summaryrefslogtreecommitdiff
path: root/mysql-test/main/partition_open_files_limit.test
blob: 5a0bc9c7cb50bdd70aa952f6a76b0d714f819219 (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
--source include/have_partition.inc

--disable_warnings
DROP TABLE IF EXISTS `t1`;
--enable_warnings

call mtr.add_suppression("option 'table_open_cache'");
call mtr.add_suppression("option 'max_connections'");


# On some platforms the lowest possible open_files_limit is too high...
let $max_open_files_limit= `SELECT @@open_files_limit > 511`;
if ($max_open_files_limit)
{
  skip Need open_files_limit to be lower than 512;
}

#
--echo # Bug#46922: crash when adding partitions and open_files_limit is reached
#
CREATE TABLE t1 (a INT PRIMARY KEY) 
ENGINE=MyISAM PARTITION BY KEY () PARTITIONS 1;
INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
--echo # if the bug exists, then crash will happen here
--replace_regex /file '.*'/file '<partition file>'/
--error 23
ALTER TABLE t1 ADD PARTITION PARTITIONS 511;
--sorted_result
SELECT * FROM t1;
DROP TABLE t1;