Debian Codegraph @

mysql-test/suite/max_parts/t/innodb_partition_open_files_limit.test

raw
1 --source include/not_windows.inc
2
3 CALL mtr.add_suppression("innodb_open_files should not be greater than the open_files_limit.");
4 CALL mtr.add_suppression("You must raise the value of innodb_open_files in my.cnf! Remember that InnoDB keeps all");
5 CALL mtr.add_suppression("redo log files and all system tablespace files open for the whole time mysqld is running, and");
6 CALL mtr.add_suppression("needs to open also some .ibd files if the file-per-table storage model is used. Current open files .*, max allowed open files 1.");
7 CALL mtr.add_suppression("Too many (.*) files stay open while the maximum allowed value would be 1. You may need to raise the value of innodb_open_files in my.cnf.");
8 CALL mtr.add_suppression("Cannot close file ./mysql/tables.ibd, because modification");
9 CALL mtr.add_suppression("Open files .* exceeds the limit 1");
10 CALL mtr.add_suppression("Cannot close file");
11 --disable_warnings
12 DROP TABLE IF EXISTS `t1`;
13 --enable_warnings
14
15 # On some platforms the lowest possible open_files_limit is too high...
16 let $max_open_files_limit= `SELECT @@open_files_limit > 1024`;
17 if ($max_open_files_limit)
18 {
19 skip Need open_files_limit to be lower than 1025;
20 }
21
22 --echo # Bug#46922: crash when adding partitions and open_files_limit is reached
23 #
24 # Note:
25 # The test script ask for open_files_limit=5
26 # The server silently increase that to 5000 before asking the OS.
27 # The OS may (or may not) reduce/increase open_files_limit, typically to 1024
28 # (Linux, see 'ulimit -n')
29 # So, for the ADD PARTITIONS to really reach the 'Too many open files'
30 # error, the test script attempts 600 partitions.
31 #
32 CREATE TABLE t1 (a INT PRIMARY KEY)
33 PARTITION BY KEY () PARTITIONS 1;
34 INSERT INTO t1 VALUES (1), (2), (3), (4), (5), (6), (7), (8), (9), (10), (11);
35 --replace_regex /file '.*'/file '<partition file>'/
36 ALTER TABLE t1 ADD PARTITION PARTITIONS 50;
37 --sorted_result
38 SELECT * FROM t1;
39 DROP TABLE t1;