Bug #106555 assert in SetOsLimitMaxOpenFiles, which is in mysys.my_file.cc has typo error
Submitted: 24 Feb 2022 7:53 Modified: 29 Jun 2022 17:08
Reporter: hongyuan li (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Compiling Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[24 Feb 2022 7:53] hongyuan li
Description:
assert of SetOsLimitMaxOpenFiles in mysql-server/mysys/my_file.cc is 

"
   assert(readback.rlim_cur == request.rlim_cur &&
         readback.rlim_max == readback.rlim_max);
"

"readback.rlim_max == readback.rlim_max" is always true

How to repeat:
just code typo error

Suggested fix:
"readback.rlim_max == readback.rlim_max" should be "readback.rlim_max == request.rlim_max" or "readback.rlim_cur == request.rlim_cur" instead
[24 Feb 2022 7:55] hongyuan li
suggested fix patch

Attachment: mysql_106555_001.patch (application/octet-stream, text), 472 bytes.

[24 Feb 2022 8:26] MySQL Verification Team
Hello hongyuan li,

Thank you very much for your patch contribution, we appreciate it!

In order for us to continue the process of reviewing your contribution to MySQL, please send us a signed copy of the Oracle Contributor Agreement (OCA) as outlined in https://oca.opensource.oracle.com

Signing an OCA needs to be done only once and it's valid for all other Oracle governed Open Source projects as well.

Getting a signed/approved OCA on file will help us facilitate your contribution - this one, and others in the future.  

Please let me know, if you have any questions.

Thank you for your interest in MySQL.

regards,
Umesh
[24 Feb 2022 10:00] hongyuan li
Hello,i has signed an individual Agreement.Thanks for your reply.
[25 Feb 2022 6:56] hongyuan li
Hi Umesh, i have signed an individual Agreement yesterday, how can i send you the 
copy of the Oracle Contributor Agreement (OCA). Appreciate for your instructions.
[25 Feb 2022 7:18] MySQL Verification Team
Hello hongyuan li,

Please note that you don't have to send me here, once you submit then community team would take care of rest things. More details are here in FAQ -
https://oca.opensource.oracle.com/?ojr=faq

regards,
Umesh
[1 Mar 2022 2:12] hongyuan li
Hi Umesh, i have upload the oca here as an atachment, which is only visible to developers. Also, An email has sent to me, informing that OCA was reviewed and approved. Thanks for your any other instructions.
[29 Jun 2022 17:08] Philip Olson
Posted by developer:
 
Fixed as of the upcoming MySQL Server 8.0.30 release, and here's the proposed changelog entry from the documentation team:

Fixed an assert definition in SetOsLimitMaxOpenFiles; our thanks to
hongyuan li for the contribution.

Thank you for the bug report.