Permalink
Switch branches/tags
Commits on Feb 4, 2013
  1. Twitter MySQL 5.5.29.t10

    Davi Arnaut committed Feb 4, 2013
  2. Report counter for InnoDB stall events.

    Introduce a new status variable named Innodb_semaphore_stalls that
    exposes the number of detected semaphore stalls (e.g. long semaphore
    wait) so that it is possible to easily trigger alerts when these
    events occur.
    Davi Arnaut committed Jan 31, 2013
  3. Print ISO date and PID with mysqld_safe log messages.

    Make mysqld_safe print log messages using a format similar to the one
    used by mysqld. The header should include a date printed using the ISO
    format (YYYY-MM-DD hh:mm:ss) and the process ID.
    Davi Arnaut committed Jan 30, 2013
  4. Expose I/O operations counters per tablespace.

    Although InnoDB exposes counters for the number of pages and bytes
    read/written, it is not possible to break down these numbers per table,
    which would help in determining the I/O distribution among tables (and
    the tablespaces they belong to).
    
    This change introduces a set of per tablespace counters for read, write
    and flush operations. The counters are incremented whenever data is read,
    written or flushed to an InnoDB space. Additionally, the number of bytes
    read and written are also counted. These statistics are kept in the
    tablespace memory cache and, hence, are ephemeral. In the unlikely case
    a tablespace is removed from the cache, the counters values are lost.
    
    A new information schema table named INNODB_SPACE_STATS is introduced
    to expose these statistics counters. Each row of the table represents
    a space in the tablespace memory cache, and each column represents a
    counter value.
    Davi Arnaut committed Jan 23, 2013
Commits on Jan 23, 2013
  1. Restore test case for Bug#39438.

    Changes to test case innodb_bug39438.test seems to have been lost when
    InnoDB test cases were moved around, causing it to be effectively
    useless as the core of the test case remained commented out.
    
    This change restores the test case by uncommenting the core parts,
    adding a suppression for an error message generated by the test and,
    lastly, removes an unneeded option file which implied a server restart
    before running the test case.
    Davi Arnaut committed Jan 23, 2013
Commits on Jan 22, 2013
  1. Expose total per-table space file size as Max_data_length.

    Althought SHOW TABLE STATUS exposes, for InnoDB tables, the size of the
    clustered and secondary indexes and the amount of free space, it does
    not expose, nor it is possible to calculate, the total size of the
    tablespace to which the table belongs — because any internal overhead is
    deducted from the exposed sizes.
    
    This change repurposes the Max_data_length field of SHOW TABLE STATUS to
    expose the actual total size of the tablespace to which an InnoDB table
    belongs to. Previously, this field was left unused (zeroed) for such
    tables.
    Davi Arnaut committed Jan 22, 2013
  2. Fix typo in assignment of the field_length field for the `page_number`

    column of the information schema table `innodb_buffer_page_basic`.
    
    The typo appears to have or cause no meaningful user-visible effect.
    Davi Arnaut committed Jan 22, 2013
Commits on Jan 16, 2013
  1. Revert MySQL revision f8a5acc (and any subsequent related changes).

    The fix for Bug#14548159 (Numerous cases of incorrect identifier quoting
    in replication) introduced a regression that breaks statement-based
    replication by generating statements with malformed quoting which will
    cause a slave to stop since such statements cannot be parsed.
    
    For now, the solution is to simply revert the introduced changes.
    Although the change was introduced to fix a security issue, it is more
    important to ensure that new problems are not introduced, especially
    since the security issue is low risk.
    Davi Arnaut committed Jan 15, 2013
  2. Slave should include the table name in its status while processing

    RBR events.
    
    When processing a row-based event, the SQL Thread state is updated to
    reflect what type of event is being processed, but short of dumping the
    event from the logs, there is currently no way to identify to which
    table the event is being applied to.
    
    In order to allow for easier identification of which table an event is
    being applied to, this change extends the SQL Thread state to also
    include the fully qualified name of the table associated with an event
    being applied.
    Davi Arnaut committed Jan 14, 2013
  3. Expose operations counters per table.

    Although MySQL has counters for the number of requests/operations
    on tables (e.g. Handler_write), it is not possible to break down
    the numbers per table, which would be useful in identifying what
    types of operations are being performed on specific tables.
    
    This change introduces a set of per table statistics counters for
    handler operations. The counters are incremented for each specific
    operation on a handler instance and once the handler instance is
    closed, the counters are accrued in the table definition stored in
    the definition cache. If the table definition is altered or flushed,
    the counters are lost.
    
    An information schema table named TABLE_STATISTICS is introduced to
    provide the statistics counters for each table in the definition cache.
    Each counter is displayed in a separate column that, for example,
    records the number of insert, delete, or update operations, as well as
    other operations, plus columns for the table and database names.
    Davi Arnaut committed Jan 11, 2013
Commits on Jan 8, 2013
  1. Bug#68051: Killing a query inside InnoDB causes it to eventually crash

    with an assertion
    
    Killing a query that is inside InnoDB searching for a row (specifically
    in row_search_for_mysql) causes InnoDB to crash with an assertion failure
    the next time the same table/cursor instance is used again.
    
    This is a regression introduced by the fix for Bug#14704286 (revision
    id: krunal.bauskar@oracle.com-20121015041950-v9r57913ucuh4f21, git
    commit: 66c9023), which introduces a
    check in row_search_for_mysql to interrupt the function if the query has
    been killed.
    
    The problem is that the error code path in row_search_for_mysql used to
    handle an interruption does not properly store the cursor position upon
    exit, which might be required in some cases. This leads to an assertion
    failure in btr_pcur_restore_position_func (btr0pcur.c:250) once the
    cursor is used again.
    
    The solution is to simply revert the original fix. The risks associated
    with introducing an interruption point in a code path that was previously
    uninterruptible far outweigh any benefits.
    Davi Arnaut committed Jan 8, 2013
  2. Increase timeout for wait condition in innodb_fragment_extent.test

    Waiting for records to be purged might take longer than the default
    30 seconds timeout limit, specially when running under valgrind.
    Davi Arnaut committed Jan 7, 2013
Commits on Jan 7, 2013
  1. Update binlog_row_table_metadata after merge from mysql-5.5.

    Given that the include file used by the test case has been moved to the
    binlog_tests suite, also move this test case to the suite and update its
    result to reflect changes.
    Davi Arnaut committed Jan 7, 2013
Commits on Jan 5, 2013
  1. Raise Twitter MySQL version to t10-dev.

    Merge tag 'mysql-5.5.29' into t10-dev.
    
    Conflicts:
    	VERSION
    	sql/sql_acl.cc
    	support-files/mysql.spec.sh
    Davi Arnaut committed Jan 5, 2013
Commits on Jan 4, 2013
  1. Twitter MySQL 5.5.28.t9

    Davi Arnaut committed Jan 4, 2013
Commits on Jan 3, 2013
  1. Suppress unsafe statement warnings generated by a replication test.

    The rpl_filter_tables_not_exist test case generates unsafe statement
    warnings both on the master and slave, so add a missing suppression
    to the master.
    Davi Arnaut committed Jan 3, 2013
  2. Increase timeout for test case innodb_mysql.

    The test case might take a long time to execute when running under
    valgrind and debugging is enabled.
    Davi Arnaut committed Jan 3, 2013
  3. InnoDB reserves an excessive amount of space in large tables for write

    operations.
    
    When performing operations that are expected to expand a table (for
    example, allocate new pages due to a page split), InnoDB currently
    preallocates and reserves up to 1% of the total size of the tablespace
    as a measure to ensure that enough free extents (that is, disk space)
    are available for the operation and to ensure that if running out of
    disk space, these operations are preemptively failed as to reserve any
    remaining free space to operations that end up freeing space (that is,
    delete data).
    
    The percentage is reasonable for tables smaller than a few gigabytes,
    but not for tables sized at tens of gigabytes or more, at which point
    the percentage won't correctly estimate the free space needed to perform
    operations and may cause an excessive amount of free extents to be
    preallocated. Also, this reservation approach is of dubious need
    considering that disk space usage is normally monitored and that
    transactions normally won't cause large expansions. In the worst case,
    it is even possible to expand the underlying filesystem if the database
    goes into a deadlock where it lacks free space for cleaning operations.
    
    The solution is to provide a way to either completely disable free
    extents reservation or to control the amount of free extents that are
    reserved for such operations. This changes introduces two new system
    variables to accomplish both. The variable innodb_reserve_free_extents
    can be used to enable or disable free extents reservation and
    innodb_free_extents_reservation_factor can be used to control what
    percentage of a space size is reserved for operations that may cause
    more space to be used.
    Davi Arnaut committed Jan 3, 2013
  4. Change the type of the system variables innodb_segment_fill_factor and

    innodb_index_fill_factor to double.
    
    These variables are used to represent percentages but could not be set
    to percentages with fractional parts. Furthermore, their initial default
    values were fractional percentages, but had to be changed because the
    interface did not support them. Now these system variables are made of
    type double and their default values are restored to their original
    form.
    Davi Arnaut committed Jan 2, 2013
  5. The fractional part of the def, min and max values of system variables

    is ignored.
    
    Allow the default, minimum and maximum values of system variables of
    type double to have a meaningful fractional part. Since the command-line
    option parsing interface (my_getopt) uses fields of type unsigned long
    long (ull) to store these values, the double values were being stored in
    a lossy way that discards the fractional part.
    
    This change introduces a couple of functions that can be used to store
    the raw representation of a double value in the raw bits of unsigned
    long long field in a way that the binary representation remains the
    same. Using these function the real value can be converted back and
    forth between the types.
    Davi Arnaut committed Jan 2, 2013
  6. Support for floating-point system variables using the plugin interface.

    Augment the server plugin interface to allow plugins to define and
    expose floating-point system variables of type double. The convenience
    macros MYSQL_SYSVAR_DOUBLE and MYSQL_THDVAR_DOUBLE are introduced and
    can be used by plugins to declare system variables of type double.
    Davi Arnaut committed Jan 2, 2013
  7. Add counters for successful page merges and page discards

    Currently Innodb_page_merges counts only merge attempts but there is
    no metric for successful merges. This change introduces a new status
    variable named Innodb_page_merges_succeeded which indicates the number
    of successful page merge operations (that is, the number of pages
    successfully merged into another page).
    
    Additionally, this change also introduces a new status variable named
    Innodb_page_discards which represents the number of pages that have
    become empty and are thus discarded.
    Davi Arnaut committed Dec 29, 2012
  8. Expose purge age information

    This change introduces new status variables that expose the purge age
    in transactions and undo log. Innodb_purge_trx_no indicates the maximum
    transaction ID for which records have been purged. Innodb_purge_undo_no
    represents the maximum undo log record number for which records have
    been purged. Finally, Innodb_trx_max_id represents the smallest number
    not yet assigned as a transaction ID.
    Davi Arnaut committed Dec 29, 2012
  9. Introduce new status variables for insert buffering operations.

    - Innodb_ibuf_pages
      The current size (in pages) of the ibuf tree.
    
    - Innodb_ibuf_merged_pages
      Number of index pages that absorbed buffered changes.
    
    - Innodb_ibuf_merged_inserts
      Number of insert operations merged.
    
    - Innodb_ibuf_merged_delete_marks
      Number of delete mark operations merged.
    
    - Innodb_ibuf_merged_deletes
      Number of delete operations merged.
    
    - Innodb_ibuf_discarded_inserts
      Number of discarded buffered delete operations.
    
    - Innodb_ibuf_discarded_delete_marks
      Number of discarded buffered delete mark operations.
    
    - Innodb_ibuf_discarded_deletes
      Number of discarded buffered delete operations.
    Davi Arnaut committed Dec 28, 2012
Commits on Dec 24, 2012
  1. InnoDB wastes 62 of every 16,384 pages in XDES/IBUF_BITMAP extent

    The problem is that once the segments of a tablespace are bigger than
    32 pages, fragment pages are no longer allocated for use, yet they are
    still reserved whenever a new fragment extent is allocated. This is a
    direct consequence of mainly two facts: whenever a new descriptor page
    is needed (every 16384 pages), the extent that contains the descriptor
    page cannot be assigned to a segment and is instead used as a fragment
    extent; and a segment can only allocate up to 32 fragment pages since
    the array used to track fragment pages belonging to a segment is limited
    to 32 entries per segment.
    
    The solution is to allow for fragment extents to be leased to segments
    whenever there are free fragment extents available. A fragment extent
    is considered available if the only used pages in the extent are the
    extent descriptor and ibuf bitmap pages. A new extent state is used to
    tag leased extents and to ensure that they are returned to the space
    free fragment list once no longer being used by a segment.
    
    Additionally, a new system variable named innodb_lease_fragment_extents
    is introduced to control whether free fragment extents are allocated to
    segments.
    
    This is an incompatible change. Once a fragment extent is allocated to
    a segment, the table that contains the segment is no longer compatible
    with earlier MySQL versions.
    
    Also, the two reserved pages per leased extent are counted towards the
    size of the segment.  This means that index and table size information
    provided by statements such as SHOW TABLE STATUS will include the size
    of the two additional pages per leased extent.
    Davi Arnaut committed Dec 21, 2012
Commits on Dec 15, 2012
  1. Fix spurious failures of the rpl_start_stop_slave test case.

    Wait for the slave thread to reach the desired state (connected to
    master and waiting for events to arrive) before attempting to retrieve
    its connection ID.
    Davi Arnaut committed Dec 14, 2012
Commits on Dec 13, 2012
  1. Avoid recalculating the number of reserved fragment pages.

    The segment is locked exclusively while its number of reserved pages
    is being calculated, so it suffices (and is safe and more efficient
    too) to calculate it only once.
    Davi Arnaut committed Dec 13, 2012
Commits on Dec 12, 2012
  1. Log checkpoint triggered flushes might be synchronous and asynchronous.

    To better reflect the synchronization status of such flushes, add a
    separate counter for asynchronous flushes.
    Davi Arnaut committed Dec 12, 2012
Commits on Dec 10, 2012
  1. Bug #15954896 "SP, MULTI-TABLE DELETE AND LONG ALIAS".

    Using too long table aliases in stored routines might
    have caused server crashes.
    
    Code in sp_head::merge_table_list() which is responsible
    for collecting information about tables used in stored
    routine was not aware of the fact that table alias might
    have arbitrary length. I.e. it assumed that table alias
    can't be longer than NAME_LEN bytes and allocated buffer
    for a key identifying table accordingly.
    
    This patch fixes the issue by ensuring that we use
    dynamically allocated buffer for table key when table
    alias is too long. By default stack based buffer is used
    in which NAME_LEN bytes are reserved for table alias.
    --BZR--
    revision-id: dmitry.lenev@oracle.com-20121210060637-fxax09ib1bmqnyu3
    property-audit-revid: dmitry.lenev@oracle.com-20121210060637-yperf5z5775fr35g
    property-branch-nick: mysql-5.5.29-release
    testament3-sha1: cce9458140faf010437ea0d1c99996b704473f37
    Dmitry Lenev committed Dec 10, 2012
Commits on Dec 7, 2012
  1. --BZR--

    revision-id: mysql-builder@oracle.com-20121207134020-07bwimoyszp727uo
    property-audit-revid: harin.vadodaria@oracle.com-20121207134020-wq0v688nskg3bzn7
    property-branch-nick: clone
    testament3-sha1: 97dd012cc7a69c4e64d388a5952e8f368eb2dbaa
    mysql-builder@oracle.com committed Dec 7, 2012
Commits on Dec 6, 2012
  1. Bug#15912213: BUFFER OVERFLOW IN ACL_GET()

          
    Description: A very large database name causes buffer
                 overflow in functions acl_get() and
                 check_grant_db() in sql_acl.cc. It happens
                 due to an unguarded string copy operation.
                 This puts required sanity checks before
                 copying db string to destination buffer.
    --BZR--
    revision-id: harin.vadodaria@oracle.com-20121206113209-fy5t21za4ur2k2b7
    property-audit-revid: harin.vadodaria@oracle.com-20121206113209-x3l2f4q7eetmuv8i
    property-branch-nick: 5529_bug15912213
    testament3-sha1: fba0531258c7b589582f9bebebe2a9bbcd0b9f19
    Harin Vadodaria committed Dec 6, 2012
Commits on Dec 5, 2012
  1. Bug#67718: InnoDB drastically under-fills pages in certain conditions

    The problem arises from InnoDB's B+ tree page split algorithm that
    attempts to optimize for sequential inserts but might end up causing
    poor space utilization depending on the distribution pattern of index
    key values throughout the index.
    
    If an insert that causes a page to be split is inserting a key value
    that is an immediate successor or predecessor to the last inserted key
    value in the same page, the insertion point is used as the split point
    irrespective of the actual distribution of values in the page. For
    example, further inserts into the page with a key value that is greater
    than any key value already in the page, but lower than the minimum key
    value of its sibling page, will lead to a series of drastically
    under-filled pages.
    
    This page split behavior is especially a problem for workloads with a
    random distribution of inserts across the pages. Since any given insert
    into a page might be an immediate successor or predecessor to the last
    insert, a pattern of sequential inserts might be incorrectly assumed
    and lead to an unbalanced distribution of data through page splits.
    
    The solution is to use the standard B+ tree split algorithm while still
    preserving some form of optimization for sequential inserts. When a
    page needs to be split, the median key value in a page is used as the
    split point so that the data is distributed in a symmetric fashion. In
    order to improve space utilization for sequential inserts, if a pattern
    of sequential inserts is detected, the insert point might be used as
    the split point if the page is the right-most or left-most page in the
    tree and the key value being inserted is above the largest or below the
    smallest value in the index.
    
    A new variable named "innodb_index_page_split_mode" is introduced to
    provide a way to control the page split behavior. The variable accepts
    a set of permitted values: "symmetric", "lower" and "upper". Currently,
    "symmetric" is always required and will be added if not stated. If its
    value is empty, the original aforementioned behavior is used instead.
    
    Using "symmetric" alone, pages are always split roughly in the middle.
    When "symmetric,lower" or "symmetric,upper" are set, sequential inserts
    into the left-most or right-most page in the tree will cause the
    insertion point to be used as the split point. Using "symmetric,upper,
    lower" will cause sequential-insert behavior to split at the insertion
    point (as above) for both the left-most and right-most pages in the
    tree (or more precisely, at their level).
    Davi Arnaut committed Dec 5, 2012
  2. Bug #15948123: SERVER WORKS INCORRECT WITH LONG TABLE ALIASES

    After-push cleanup: removal of unneeded assertions.
    
    --BZR--
    revision-id: gleb.shchepa@oracle.com-20121205164721-2ck8zcgnke5kf4ja
    property-audit-revid: gleb.shchepa@oracle.com-20121205164721-ic8ab6byz17dy7bv
    property-branch-nick: mysql-5.5.29-release
    testament3-sha1: 3e60b150169ebeeb1947c1afb03b2ee7f2213e2e
    GlebShchepa committed Dec 5, 2012
  3. Bug #15948123: SERVER WORKS INCORRECT WITH LONG TABLE ALIASES

    Code in MDL subsystem assumes that identifiers of objects can't
    be longer than NAME_LEN characters. This assumption was broken
    when one tried to construct MDL_key based on table alias, which
    can have arbitrary length. Since MDL_key's (and MDL locks) are
    not really used for table aliases this patch changes code to
    not initialize MDL_key object for table list element representing
    aliases.
    
    --BZR--
    revision-id: gleb.shchepa@oracle.com-20121205132445-umtrq410fiqwbj6y
    property-audit-revid: gleb.shchepa@oracle.com-20121205132445-wfp3uva2f23no90j
    property-branch-nick: mysql-5.5.29-release
    testament3-sha1: f172c8e89be6194f73576792fc900c3e7cf517aa
    GlebShchepa committed Dec 5, 2012