Archive for April, 2008

mysqlsla: v1.8 released, v2 coming

Saturday, April 19th, 2008

mysqlsla v1.8 is available at:
http://hackmysql.com/scripts/mysqlsla-1.8-DEBUG
I am releasing it publicly without updating the mysqlsla web page or documentation because, instead, I am waiting until I finish mysqlsla v2. After working with v1.8 I realized the code needed a major re-think and overhaul. v2 will reflect this and will be a far superior log hacking and analyzing tool, capable of far more than v1.8 is now.

But for now, 1.8 fixes several good (or bad?) bugs:

  • –only-hosts did not work for general logs
  • Multi-line comments using /* */ caused everything after the first line to be ignored in raw logs
  • “Change user” commands were not handled in general logs
  • CHANGE, DROP and RESET statements were filtered out
  • A certain variant of the Connect command in general logs was not handled
  • A few more SQL capitalization/beautifications were added

If you use mysqlsla, you should really get v1.8 due to these bug fixes. And if you have used mysqlsla before and found it didn’t do what you needed: tell me because v2 open to suggestions. My goal for v2 is to make it the MySQL log hacking tool, capable of parsing, ordering, analyzing, sorting, etc. a MySQL log in any way possible and then to serve as a liaison to other scripts, such as Baron’s mk-query-profiler; e.g. have mysqlsla process and filter a log and then feed SQL statements to mk-query-profiler or any other script. Currently, v1.8 is too stuck in its own ways to help other scripts. Such selfishness shall be expunged.

mysqlreport v3.5 released

Wednesday, April 16th, 2008

mysqlreport v3.5 has been released which has the following fixes, changes, updates:

  • Fixed bug: incorrect checking of MySQL version caused mysqlreport to ignore InnoDB status values in some cases. Simplified version from 3 integers (major, minor, patch) to 1 (50024 = 5.0.24, 60001 = 6.0.1, etc.) for easier, more accurate version checking all around.
  • Fixed potential bug: read_relative_infiles might have incorrectly divided infiles with multiple status value sets.
  • Fixed bug: if wait_timeout was greater than –relative, mysqlreport would lose its connection while sleeping. Now the connection is closed and reopened for each live relative report collection.
  • Infiles can now be given SHOW VARIABLES output (in addition to the old method of inserting values manually like: key_buffer_size=128M)
  • Slow query time is beautified for microsecond, millisecond, and second resolution (format_u_time):
    0.000000 - 0.000999 = 0 - 999 µ
    0.001000 - 0.999999 = 1 ms - 999.999 ms
    1.000000 - n.nnnnnn = 1 s - n.nnnnn s
  • Added a lot more debugging output.