Properly declare slow log support functions in sys_vars.cc for use in mysqld.cc

Bug #1176303 reported by Laurynas Biveinis
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Percona Server moved to https://jira.percona.com/projects/PS
Status tracked in 5.7
5.1
Won't Fix
Low
Unassigned
5.5
Triaged
Low
Unassigned
5.6
Triaged
Low
Unassigned
5.7
Triaged
Low
Unassigned

Bug Description

Right now we have in mysqld.cc:

/* defined in sys_vars.cc */
extern void init_log_slow_verbosity();
extern void init_slow_query_log_use_global_control();

And in sys_vars.cc:

void init_log_slow_verbosity()
{
  update_slow_query_log_use_global_control(0,0,OPT_GLOBAL);
}

void init_slow_query_log_use_global_control()
{
  update_log_slow_verbosity(&(global_system_variables.log_slow_verbosity));
}

First, the titles / bodies of the functions seem to be swapped. That's benign because the functions are always called together.

Second, they should be declared in sys_vars.h instead of mysqld.cc. Perhaps it is the update_... functions that should be exported from sys_vars, and then init_ functions would be static to mysqld.cc.

tags: added: slow-extended
Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-2001

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.