1
0
mirror of https://github.com/MariaDB/server.git synced 2025-08-08 11:22:35 +03:00

Merge remote-tracking branch 'github/bb-11.4-release' into bb-11.8-serg

This commit is contained in:
Sergei Golubchik
2025-04-27 11:33:27 +02:00
committed by Oleksandr Byelkin
430 changed files with 14769 additions and 6751 deletions

View File

@@ -138,6 +138,7 @@ sub new {
my $error = delete($opts{'error'});
my $verbose = delete($opts{'verbose'}) || $::opt_verbose;
my $nocore = delete($opts{'nocore'});
my $open_files_limit = delete($opts{'open_files_limit'});
my $host = delete($opts{'host'});
my $shutdown = delete($opts{'shutdown'});
my $user_data= delete($opts{'user_data'});
@@ -161,6 +162,8 @@ sub new {
push(@safe_args, "--verbose") if $verbose > 0;
push(@safe_args, "--nocore") if $nocore;
push(@safe_args, "--open-files-limit=$open_files_limit") if $open_files_limit;
# Point the safe_process at the right parent if running on cygwin
push(@safe_args, "--parent-pid=".Cygwin::pid_to_winpid($$)) if IS_CYGWIN;

View File

@@ -220,6 +220,7 @@ int main(int argc, char* const argv[] )
pid_t own_pid= getpid();
pid_t parent_pid= getppid();
bool nocore = false;
int open_files_limit = 1024;
struct sigaction sa,sa_abort;
sa.sa_handler= handle_signal;
@@ -268,7 +269,14 @@ int main(int argc, char* const argv[] )
}
else if ( strncmp (arg, "--env ", 6) == 0 )
{
putenv(strdup(arg+6));
putenv(strdup(arg+6));
}
else if ( strncmp(arg, "--open-files-limit=", 19) == 0 )
{
const char* start = arg + 19;
open_files_limit = atoi(start);
if (open_files_limit <= 0)
die("Invalid value '%s' passed to --open-files-limit", start);
}
else
die("Unknown option: %s", arg);
@@ -318,11 +326,8 @@ int main(int argc, char* const argv[] )
if (nocore)
setlimit(RLIMIT_CORE, 0, 0);
/*
mysqld defaults depend on that. make test results stable and independent
from the environment
*/
setlimit(RLIMIT_NOFILE, 1024, 1024);
// Set open files limit
setlimit(RLIMIT_NOFILE, open_files_limit, open_files_limit);
// Signal that child is ready
buf= 37;