From Bugzilla Helper: User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.0.1) Gecko/20021003 Description of problem: If the mysql daemon is runing as a non-root user, it calls mlockall() after switching uid's and consequently it fails to lock itself into memory. All mysql versions are affected, from rh72 through rawhide. The patch I'm attaching is against 3.23.54a (rawhide). It may not be the ideal fix, but it is obviously correct and works for me. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. add "memlock" to the [mysqld] section in /etc/my.cnf 2. start mysqld 3. check its memlocked status (the L flag in the "ps ax" output) Actual Results: 11958 pts/0 S 0:01 \_ /usr/libexec/mysqld Expected Results: 12228 pts/0 SL 0:02 \_ /usr/libexec/mysqld Additional info: Non-working memlock causes mysqld to get paged out occassionally, with the expected negative effects on performance.
Created attachment 89216 [details] fix for memlock problem
Since this is a fairly noncritical issue, I don't think we should maintain a private fix for it. The bug should be filed upstream, that is with MySQL AB. (A quick look suggests that the issue is still present in MySQL 4.0.17.)