PKGBUILDs/extra/mariadb/0001-systemd-240.patch

19 lines
835 B
Diff
Raw Normal View History

2019-01-25 13:45:41 +00:00
diff --git a/mysys/my_file.c b/mysys/my_file.c
index a23ab487d00..23226595b2e 100644
--- a/mysys/my_file.c
+++ b/mysys/my_file.c
@@ -52,10 +52,9 @@ static uint set_max_open_files(uint max_file_limit)
DBUG_PRINT("info", ("rlim_cur: %u rlim_max: %u",
(uint) rlimit.rlim_cur,
(uint) rlimit.rlim_max));
- if ((ulonglong) rlimit.rlim_cur == (ulonglong) RLIM_INFINITY)
- rlimit.rlim_cur = max_file_limit;
- if (rlimit.rlim_cur >= max_file_limit)
- DBUG_RETURN(rlimit.rlim_cur); /* purecov: inspected */
+ if ((ulonglong) rlimit.rlim_cur == (ulonglong) RLIM_INFINITY ||
+ rlimit.rlim_cur >= max_file_limit)
+ DBUG_RETURN(max_file_limit);
rlimit.rlim_cur= rlimit.rlim_max= max_file_limit;
if (setrlimit(RLIMIT_NOFILE, &rlimit))
max_file_limit= old_cur; /* Use original value */