Bug #90111 Incorrect enum comparisons
Submitted: 16 Mar 2018 14:50 Modified: 17 Mar 2018 6:09
Reporter: Zsolt Parragi (OCA) Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: Logging Severity:S3 (Non-critical)
Version:5.7 OS:Any
Assigned to: CPU Architecture:Any
Tags: Contribution

[16 Mar 2018 14:50] Zsolt Parragi
Description:
In sql/log_event.cc, incorrect enum values are used in switches.

The values such as REAL_RESULT, used in the cases are part of the Item_result enum, but the variable these switches are based on (User_var_log_event::type) has  the type User_var_event::Value_type.

How to repeat:
Build mysql with clang 6 in relwithdebinfo mode
[16 Mar 2018 14:50] Zsolt Parragi
patch

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: incorrect_enum_switch.patch (text/x-patch), 5.35 KiB.

[17 Mar 2018 6:09] Umesh Shastry
Hello Zsolt,

Thank you for the report and contribution.

Thanks,
Umesh
[13 Jun 2018 12:51] Laurynas Biveinis
Bug 90111 fix for 8.0.11 by Zsolt Parragi

(*) I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

Contribution: bug90111-8.0.11.patch (application/octet-stream, text), 5.97 KiB.

[14 Jun 2018 5:00] Umesh Shastry
Thank you for the contributions!

Regards,
Umesh