mirror of
https://github.com/MariaDB/server.git
synced 2026-05-16 20:07:13 +02:00
Temporary commit of 10.0-merge
This commit is contained in:
parent
35bc8f9f43
commit
068c61978e
649 changed files with 90817 additions and 25330 deletions
|
|
@ -76,7 +76,7 @@ static uint set_max_open_files(uint max_file_limit)
|
|||
static uint set_max_open_files(uint max_file_limit)
|
||||
{
|
||||
/* We don't know the limit. Return best guess */
|
||||
return min(max_file_limit, OS_FILE_LIMIT);
|
||||
return MY_MIN(max_file_limit, OS_FILE_LIMIT);
|
||||
}
|
||||
#endif
|
||||
|
||||
|
|
@ -99,7 +99,7 @@ uint my_set_max_open_files(uint files)
|
|||
DBUG_PRINT("enter",("files: %u my_file_limit: %u", files, my_file_limit));
|
||||
|
||||
files+= MY_FILE_MIN;
|
||||
files= set_max_open_files(min(files, OS_FILE_LIMIT));
|
||||
files= set_max_open_files(MY_MIN(files, OS_FILE_LIMIT));
|
||||
if (files <= MY_NFILE)
|
||||
DBUG_RETURN(files);
|
||||
|
||||
|
|
@ -109,9 +109,9 @@ uint my_set_max_open_files(uint files)
|
|||
|
||||
/* Copy any initialized files */
|
||||
memcpy((char*) tmp, (char*) my_file_info,
|
||||
sizeof(*tmp) * min(my_file_limit, files));
|
||||
sizeof(*tmp) * MY_MIN(my_file_limit, files));
|
||||
bzero((char*) (tmp + my_file_limit),
|
||||
max((int) (files- my_file_limit), 0)*sizeof(*tmp));
|
||||
MY_MAX((int) (files- my_file_limit), 0)*sizeof(*tmp));
|
||||
my_free_open_file_info(); /* Free if already allocated */
|
||||
my_file_info= tmp;
|
||||
my_file_limit= files;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue