| 1 |
# |
| 2 |
# Bug#24509 cannot use more than 2048 file descriptors on windows |
| 3 |
# |
| 4 |
|
| 5 |
# |
| 6 |
# This test requires approximately 6000 of files to be open simultaneously. |
| 7 |
# Let us skip it on platforms where open files limit is too low. |
| 8 |
let $max_open_files_limit= `SELECT @@open_files_limit < 6100`; |
| 9 |
if ($max_open_files_limit) |
| 10 |
{ |
| 11 |
skip Need open_files_limit to be greater than 6100; |
| 12 |
} |
| 13 |
|
| 14 |
--disable_query_log |
| 15 |
create database many_tables; |
| 16 |
use many_tables; |
| 17 |
let $max_tables=3000; |
| 18 |
let $i=$max_tables; |
| 19 |
|
| 20 |
--disable_warnings |
| 21 |
create table t (i int); |
| 22 |
let $table_list=t READ; |
| 23 |
|
| 24 |
while ($i) |
| 25 |
{ |
| 26 |
eval create table t$i (i int); |
| 27 |
let $table_list= $table_list ,t$i READ; |
| 28 |
dec $i; |
| 29 |
} |
| 30 |
|
| 31 |
#lock all tables we just created (resembles mysqldump startup is doing with --all-databases operation) |
| 32 |
#There will be 2 descriptors for each table (table.MYI and table.MYD files) means 6000 files |
| 33 |
#descriptors altogether. For Microsoft C runtime, this is way too many. |
| 34 |
|
| 35 |
eval LOCK TABLES $table_list; |
| 36 |
unlock tables; |
| 37 |
|
| 38 |
drop database many_tables; |
| 39 |
--enable_query_log |
| 40 |
--enable_warnings |
| 41 |
--echo all done |
| 42 |
|
| 43 |
|