Thursday, July 26, 2012

Changes in Twitter MySQL 5.5.24.t7

Earlier this week we pushed to Github the seventh iteration of Twitter MySQL. Here are some of the highlights.

Bugs Fixed

Functionality Added or Changed

  • The execution of row-based events in a replication slave is not reflected in the SQL Thread state, making it rather difficult to identify long-running events. For example, the execution of a large row-by-row delete event is not immediately identifiable as the replication SQL thread state for most of its duration stays as "Reading event from the relay log".

    This change adds two new states to the replication slave SQL thread that are used to highlight the event that the SQL thread is executing and, for row-based events, to indicate how many rows have been applied. These will generally look like:
    Executing Delete_rows event at position 100
    Handling record 50 of 100 for a Delete_rows event
    
  • Although Table_map events include some column metadata information, such as type and length, it lacks information such as column names, whether an integer type is signed or unsigned, or the character set of string types. This makes it rather difficult for external programs to extract meaningful data from row-based events.

    In order to enable external programs to fully deduce the table/column definitions, a new Table_metadata event was introduced. The purpose of this event is to describe the structure and other properties of the table and its columns, such as column name, SQL type name, character set, etc.
  • The currently available fields that compromise the header of error log messages, which are the date and time, plus the severity of the message, do not provide the enough information to identify discontinuity in reporting or which process generated a message.

    To make such identification possible, this change includes the process ID in the header so that any changes in its value will identify the source (process) of the message and also indicate any discontinuity in reporting. Also, the format of the date and time is changed to the ISO format (YYYY-MM-DD hh:mm:ss).
  • Even though the creation of non-deterministic functions can be allowed by enabling log_bin_trust_function_creators, enabling the option also implies that executing such functions is allowed even if the binary log format is set to statement. If the binary log format is set to row-based, creating and executing non-deterministic functions shouldn't pose any problems. Hence, this change allows non-deterministic functions to be created when the binary log format is set to row-based. If said functions are invoked at runtime when the binary log format is statement-based, they will fail with an error.
  • Change the install name of the mysqlclient shared library to use an absolute pathname instead of just the library filename. This allows Apple's Mac OS X dynamic linker to locate the library even if the path where it is installed is not included in the default search path.
For a more complete look at what's new in this version, please see the change history and documentation. Feedback, bug reports, etc, can be submitted directly to the issue tracker.