Bug #83124 Bug 81657 fix merge to 5.6 broken
Submitted: 23 Sep 2016 9:24 Modified: 5 Jan 2017 12:53
Reporter: Laurynas Biveinis (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: Replication Severity:S3 (Non-critical)
Version:5.6, 5.6.33, 5.7, 8.0 OS:Any
Assigned to: CPU Architecture:Any

[23 Sep 2016 9:24] Laurynas Biveinis
Description:
Bug 81657 fix in 5.5 introduced get_locked_tables_mode_name helped function and called it from THD::decide_logging_format.

The way this was merged to 5.6, the new helper function is introduced, but it's never called, and THD::decide_logging_format still contains the following:

#ifndef DBUG_OFF
    {
      static const char *prelocked_mode_name[] = {
        "NON_PRELOCKED",
        "PRELOCKED",
        "PRELOCKED_UNDER_LOCK_TABLES",
      };
      DBUG_PRINT("debug", ("prelocked_mode: %s",
                           prelocked_mode_name[locked_tables_mode]));
    }
#endif

How to repeat:
See above

Suggested fix:
Fix
[23 Sep 2016 10:21] MySQL Verification Team
Hello Laurynas,

Thank you for the report and feedback!

Thanks,
Umesh
[23 Sep 2016 11:00] Laurynas Biveinis
The same issue exists in 5.7.

Also, in both 5.6 and 5.7, the comment next to enum locked_tables_mode should say "binlog.cc" not "sql_class.cc"
[27 Sep 2016 9:41] Laurynas Biveinis
Bug 83124 fix for 5.6

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

Contribution: bug83124-5.6.patch (application/octet-stream, text), 1.23 KiB.

[27 Sep 2016 9:42] Laurynas Biveinis
Bug 83124 fix for 5.7

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

Contribution: bug83124-5.7.patch (application/octet-stream, text), 1.23 KiB.

[27 Sep 2016 9:42] Laurynas Biveinis
8.0.0 is also affected
[27 Sep 2016 9:43] Laurynas Biveinis
Bug 83124 fix for 8.0

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

Contribution: bug83124-8.0.patch (application/octet-stream, text), 1.55 KiB.

[13 Dec 2016 10:04] Laurynas Biveinis
Time to close this?

The published release note entries are missing "not"
[5 Jan 2017 12:53] Erlend Dahl
[3 Jan 2017 7:07] David Moss

Thanks for your feedback. This has been fixed and the following was noted in
the change log:
The fix for Bug #81657 was not correctly merged into MySQL 5.6\7 and 8.0.
Thanks to Laurynas Biveinis for alerting us.