Bug #102659 Unhandled return value in MySQL-8.0.23
Submitted: 19 Feb 2021 9:07 Modified: 19 Feb 2021 17:29
Reporter: Li Zhong Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Errors Severity:S3 (Non-critical)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any

[19 Feb 2021 9:07] Li Zhong
Description:
The following return value in MySQL-8.0.23 newest source code is unhandled:

Function                      |Variable| File                            |LineNo
============================================================================
modify_default_roles_in_table | ret   | sql/auth/role_tables.cc           | 174
modify_default_roles_in_table | ret   | sql/auth/role_tables.cc           | 181
buffer_record_somewhere       | error | sql/sql_executor.cc               | 4696
dispatch_sql_command          | error | sql/sql_parse.cc                  | 4988
Encryption::check_keyring     | my_ret| storage/innobase/os/os0enc.cc     | 1300
Arch_Page_Sys::recover        | err   | storage/innobase/arch/arch0recv.cc| 42
Event_job_data::execute       | ret   | sql/event_data_objects.cc         | 1152

May be some assert or error handling code is necessary?

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

Suggested fix:
Add assert of error handling code
[19 Feb 2021 13:28] MySQL Verification Team
Hi Mr. Zhong,

Thank you for your bug report.

We have analysed the code that you reported to us and we have to agree with you. Simply, within these functions, some returned values have not been acted upon.

In most of these situations, it is our opinion that debug assert would be appropriate.

Verified as reported.
[19 Feb 2021 17:29] Li Zhong
Thanks for your confirmation! Let me know if I can help with fixing.