1. 01 Oct, 2010 19 commits
    • Mattias Jonsson's avatar
      merge · ac5a175b
      Mattias Jonsson authored
      ac5a175b
    • Mattias Jonsson's avatar
      minor test result update after merge · 790dd097
      Mattias Jonsson authored
      790dd097
    • Mattias Jonsson's avatar
      merge · a37418bc
      Mattias Jonsson authored
      a37418bc
    • Mattias Jonsson's avatar
      Manual merge into mysql-5.5-bugteam · 199fb365
      Mattias Jonsson authored
      199fb365
    • Mattias Jonsson's avatar
      merge · cddd0d68
      Mattias Jonsson authored
      cddd0d68
    • Vasil Dimov's avatar
      Merge mysql-5.5-innodb -> mysql-5.5-bugteam · 66bde6c2
      Vasil Dimov authored
      66bde6c2
    • Mattias Jonsson's avatar
      merge · 141d8312
      Mattias Jonsson authored
      141d8312
    • Mattias Jonsson's avatar
      7ecc1077
    • Mattias Jonsson's avatar
      merge · 1045f452
      Mattias Jonsson authored
      1045f452
    • Vasil Dimov's avatar
      Null merge mysql-5.1-bugteam -> mysql-5.5-bugteam · 5ad0f7a7
      Vasil Dimov authored
      This is a null merge because it only contains InnoDB changes that
      originated in mysql-5.1-innodb and have been manually ported into
      mysql-5.5-innodb.
      5ad0f7a7
    • Vasil Dimov's avatar
      Merge mysql-5.1-innodb -> mysql-5.1-bugteam · 1ca8c7b5
      Vasil Dimov authored
      1ca8c7b5
    • Mattias Jonsson's avatar
    • Vasil Dimov's avatar
      Fix a potential bug when using __sync_lock_test_and_set() · f7b01a39
      Vasil Dimov authored
      This is a manual merge from mysql-5.1-innodb of:
      
        revision-id: vasil.dimov@oracle.com-20100930102618-s9f9ytbytr3eqw9h
        committer: Vasil Dimov <vasil.dimov@oracle.com>
        timestamp: Thu 2010-09-30 13:26:18 +0300
        message:
          Fix a potential bug when using __sync_lock_test_and_set()
      
          TYPE __sync_lock_test_and_set (TYPE *ptr, TYPE value, ...)
      
          it is not documented what happens if the two arguments are of different
          type like it was before: the first one was lock_word_t (byte) and the
          second one was 1 or 0 (int).
      
          Approved by:	Marko (via IRC)
      f7b01a39
    • Mattias Jonsson's avatar
      merge · 460fcf7c
      Mattias Jonsson authored
      460fcf7c
    • Mattias Jonsson's avatar
      Bug#51851: Server with SBR locks mutex twice on · a01773db
      Mattias Jonsson authored
      LOAD DATA into partitioned MyISAM table
      
      Problem was that both partitioning and myisam
      used the same table_share->mutex for different protections
      (auto inc and repair).
      
      Solved by adding a specific mutex for the partitioning
      auto_increment.
      
      Also adding destroying the ha_data structure in
      free_table_share (which is to be propagated
      into 5.5).
      
      This is a 5.1 ONLY patch, already fixed in 5.5+.
      a01773db
    • Mattias Jonsson's avatar
      Bug#56172: Server crashes in ha_partition::reset on · 2a67a3a7
      Mattias Jonsson authored
                 REBUILD PARTITION under LOCK TABLE
      
      Collapsed patch including updates from the reviews.
      
      In case of failure in ALTER ... PARTITION under LOCK TABLE
      the server could crash, due to it had modified the locked
      table object, which was not reverted in case of failure,
      resulting in a bad table definition used after the failed
      command.
      
      Solved by instead of altering the locked table object and
      its partition_info struct, creating an internal temporary
      intermediate table object used for altering,
      just like the non partitioned mysql_alter_table.
      So if an error occur before the alter operation is complete,
      the original table is not modified at all.
      But if the alter operation have succeeded so far that it
      must be completed as whole,
      the table is properly closed and reopened.
      (The completion on failure is done by the ddl_log.)
      2a67a3a7
    • Jon Olav Hauglid's avatar
      fbfbc7ee
    • Bernt M. Johnsen's avatar
      Merge · 4b247f77
      Bernt M. Johnsen authored
      4b247f77
    • Vasil Dimov's avatar
      Fix Bug#56340 innodb updates index stats too frequently after non-index updates · 314d795b
      Vasil Dimov authored
      This is a manual merge from mysql-5.1-innodb of:
      
        revno: 3618
        revision-id: vasil.dimov@oracle.com-20100930124844-yglojy7c3vaji6dx
        parent: vasil.dimov@oracle.com-20100930102618-s9f9ytbytr3eqw9h
        committer: Vasil Dimov <vasil.dimov@oracle.com>
        branch nick: mysql-5.1-innodb
        timestamp: Thu 2010-09-30 15:48:44 +0300
        message:
          Fix Bug#56340 innodb updates index stats too frequently after non-index updates
      
          This is a simple optimization issue. All stats are related to only indexed
          columns, index size or number of rows in the whole table. UPDATEs that touch
          only non-indexed columns cannot affect stats and we can avoid calling the
          function row_update_statistics_if_needed() which may result in unnecessary I/O.
      
          Approved by:	Marko (rb://466)
      
      In addition to the above message: we know that
      row_update_cascade_for_mysql() (the other place where
      row_update_statistics_if_needed is called) always updates indexed
      columns (FK-related), so there is no need to add this cond there.
      314d795b
  2. 30 Sep, 2010 7 commits
  3. 29 Sep, 2010 5 commits
    • Georgi Kodinov's avatar
      merge · c70a6f5c
      Georgi Kodinov authored
      c70a6f5c
    • Georgi Kodinov's avatar
      merge · 216418e7
      Georgi Kodinov authored
      216418e7
    • Dmitry Lenev's avatar
      A better fix for bug #56405 "Deadlock in the MDL deadlock · 49406b97
      Dmitry Lenev authored
      detector" that doesn't introduce bug #56715 "Concurrent
      transactions + FLUSH result in sporadical unwarranted
      deadlock errors".
      
      Deadlock could have occurred when workload containing a mix
      of DML, DDL and FLUSH TABLES statements affecting the same
      set of tables was executed in a heavily concurrent environment.
      
      This deadlock occurred when several connections tried to
      perform deadlock detection in the metadata locking subsystem.
      The first connection started traversing wait-for graph,
      encountered a sub-graph representing a wait for flush, acquired
      LOCK_open and dived into sub-graph inspection. Then it
      encountered sub-graph corresponding to wait for metadata lock
      and blocked while trying to acquire a rd-lock on
      MDL_lock::m_rwlock, since some,other thread had a wr-lock on it.
      When this wr-lock was released it could have happened (if there
      was another pending wr-lock against this rwlock) that the rd-lock
      from the first connection was left unsatisfied but at the same
      time the new rd-lock request from the second connection sneaked
      in and was satisfied (for this to be possible the second
      rd-request should come exactly after the wr-lock is released but
      before pending the wr-lock manages to grab rwlock, which is
      possible both on Linux and in our own rwlock implementation).
      If this second connection continued traversing the wait-for graph
      and encountered a sub-graph representing a wait for flush it tried
      to acquire LOCK_open and thus the deadlock was created.
      
      The previous patch tried to workaround this problem by not
      allowing the deadlock detector to lock LOCK_open mutex if
      some other thread doing deadlock detection already owns it
      and current search depth is greater than 0. Instead deadlock
      was reported. As a result it has introduced bug #56715.
      
      This patch solves this problem in a different way.
      It introduces a new rw_pr_lock_t implementation to be used
      by MDL subsystem instead of one based on Linux rwlocks or
      our own rwlock implementation. This new implementation
      never allows situation in which an rwlock is rd-locked and
      there is a blocked pending rd-lock. Thus the situation which
      has caused this bug becomes impossible with this implementation.
      
      Due to fact that this implementation is optimized for
      wr-lock/unlock scenario which is most common in the MDL
      subsystem it doesn't introduce noticeable performance
      regressions in sysbench tests. Moreover it significantly
      improves situation for POINT_SELECT test when many
      connections are used.
      
      No test case is provided as this bug is very hard to repeat
      in MTR environment but is repeatable with the help of RQG
      tests.
      This patch also doesn't include a test for bug #56715
      "Concurrent transactions + FLUSH result in sporadical
      unwarranted deadlock errors" as it takes too much time to
      be run as part of normal test-suite runs.
      49406b97
    • Vladislav Vaintroub's avatar
      Rename CMAKE_PARSE_ARGUMENTS macro to avoid name collision · bc684bab
      Vladislav Vaintroub authored
      with CMake 2.8.3 builtin macro
      bc684bab
    • Jon Olav Hauglid's avatar
      Followup to Bug#46165 server crash in dbug · 4228b8bb
      Jon Olav Hauglid authored
      This patch moves the regression test from variables.test to
      variables_debug.test as the debug system variable is not 
      available on release builds.
      4228b8bb
  4. 28 Sep, 2010 9 commits
    • Alexander Nozdrin's avatar
      Empty merge from mysql-5.5. · 76f4cfde
      Alexander Nozdrin authored
      76f4cfde
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-5.5-merge. · fab555ce
      Alexander Nozdrin authored
      fab555ce
    • Alexander Nozdrin's avatar
      Auto-merge from mysql-5.5-merge. · a79093cd
      Alexander Nozdrin authored
      a79093cd
    • Vasil Dimov's avatar
      Increment InnoDB Plugin version to 1.0.13. · 3b0b15c5
      Vasil Dimov authored
      InnoDB Plugin 1.0.12 has been released with MySQL 5.1.51.
      3b0b15c5
    • Jon Olav Hauglid's avatar
      Bug #46165 server crash in dbug · 92b24781
      Jon Olav Hauglid authored
      This crash occured if the same debug trace file was closed twice,
      leading to the same memory being free'd twice. This could occur
      if the "debug" server system variable refered to the same trace
      file in both global and session scope.
      
      Example of an order of events that would lead to a crash:
      1) Enable debug tracing to a trace file (global scope)
      2) Enable debug tracing to the same trace file (session scope)
      3) Reset debug settings (global scope)
      4) Reset debug settings (session scope)
      
      This caused a crash because the trace file was, by mistake, closed
      in 3), leading to the same memory being free'd twice when the file
      was closed again in 4).
      
      Internally, the debug settings are stored in a stack, with session
      settings (if any) on top and the global settings below. Each connection
      has its own stack. When a set of settings is changed, it must be 
      determined if its debug trace file is to be closed. Before, this was done
      by only checking below on the settings stack. So if the global settings
      were changed, an existing debug trace file reference in session settings
      would be missed. This caused the file to be closed even if it was in use,
      leading to a crash later when it was closed again.
      
      This patch fixes the problem by preventing the trace file from being shared
      between global and session settings. If session debug settings are set without
      specifying a new trace file, stderr is used for output. This is a change
      in behaviour and should be reflected in the documentation.
      
      Test case added to variables.test.
      92b24781
    • Vasil Dimov's avatar
      Manually merge a GCC warning fix from 5.1 to 5.5: · 64ef6416
      Vasil Dimov authored
        ------------------------------------------------------------
        revno: 3615
        revision-id: vasil.dimov@oracle.com-20100928081234-22qbm6cwht521484
        parent: vasil.dimov@oracle.com-20100928063833-snn6cjwgksa6gk3b
        committer: Vasil Dimov <vasil.dimov@oracle.com>
        branch nick: mysql-5.1-innodb
        timestamp: Tue 2010-09-28 11:12:34 +0300
        message:
          Silence a GCC warning about reaching the end of non-void func
          
          Spotted by:	Marko
      64ef6416
    • Vasil Dimov's avatar
      Silence a GCC warning about reaching the end of non-void func · 68e34ab1
      Vasil Dimov authored
      Spotted by:	Marko
      68e34ab1
    • Vasil Dimov's avatar
      3a43a2e2
    • Vasil Dimov's avatar
      Merge mysql-5.1-bugteam -> mysql-5.1-innodb · 7535f1ee
      Vasil Dimov authored
      7535f1ee