diff options
Diffstat (limited to 'mysql-test/main/partition_open_files_limit.test')
-rw-r--r-- | mysql-test/main/partition_open_files_limit.test | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/mysql-test/main/partition_open_files_limit.test b/mysql-test/main/partition_open_files_limit.test new file mode 100644 index 00000000..5a0bc9c7 --- /dev/null +++ b/mysql-test/main/partition_open_files_limit.test @@ -0,0 +1,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; |