Bug #102668 Unused parameter documented in the comment as used
Submitted: 20 Feb 6:53 Modified: 22 Feb 14:11
Reporter: Li Zhong Email Updates:
Status: Verified Impact on me:
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.23 OS:Any
Assigned to: CPU Architecture:Any

[20 Feb 6:53] Li Zhong
In MySQL-8.0.23, some function parameters are unused in the functions but documented in the comments as meaningful, which may cause misleading when other people want to use them:
Function                    |Variable    |File Name                        |Line
dd_fill_dict_index          |zip_allowed |storage/innobase/dict/dict0dd.cc |2516
Corresponding comment:
Line 2509: @param[in]  create_info create table information

buf_flush_dirty_pages 	    |strict 	 |storage/innobase/buf/buf0lru.cc  |658
Corresponding comment:
Line 652 @param[in]  trx     transaction to check if the operation
Line 653                                 must be interrupted 

dd_fill_one_dict_index 	    | strict 	 |storage/innobase/dict/dict0dd.cc |2240
Corresponding comment:
Line 2232 @param[in]  strict      whether to be strict about the max record size

I guess either the comments are not updated or the implementation of functions missing to use these parameters(which indicates there are bugs) ?

How to repeat:
It's in source code of mysql-8.0.23

Suggested fix:
Correct the comments or the implementations to make it consistent
[22 Feb 13:55] MySQL Verification Team
Hi Mr. Zhong,

Thank you for your bug report.

We accept the bugs in our code that cause problems in production or performance issue. We also accept bugs that improves our documentation or makes it more clear to the public.

However, code comments are there for our developers only and do not affect in any possible way our users.

Not a bug.
[22 Feb 14:11] MySQL Verification Team
Hi Mr. Zhong,

We decided to accept code comment errors as bugs.

Hence, verified as reported.