← Back to team overview

ourdelta-developers team mailing list archive

[Bug 288062] Re: microslow patch long_query_time backwards compatibility?

 

In mysqld.cc, get_one_option() function, adding in:

+  case OPT_LONG_QUERY_TIME:
+    /*
+      Fix up low values to ensure backward compatibility in microslow patch:
+      if long_query_time < 600 (10 minutes in old granularity)
+      then we simply adjust it for microseconds.
+    */
+    if (global_system_variables.long_query_time < 600)
+      global_system_variables.long_query_time *= 1000000;
+    break;

that should do the trick cleanly.
Modified in ourdelta-percona-d6-mysql50 branch for testing.

** Changed in: ourdelta
   Importance: Medium => High
       Status: Confirmed => In Progress

-- 
microslow patch long_query_time backwards compatibility?
https://bugs.launchpad.net/bugs/288062
You received this bug notification because you are a member of OurDelta-
developers, which is the registrant for OurDelta.

Status in OurDelta - Builds for MySQL: In Progress

Bug description:
Check percona/microslow patch to be backwards compatible, so an existing user upgrading to OurDelta won't see changed behaviour by default.

The my.cnf options are processed and assigned automatically so we probably can't get in there.
But before it's used, we can see if it's say < 600 (10 minutes in old form!) and do *1000000 to convert it to microseconds.
Should be perfectly safe.



References