1. 20 Jul, 2010 3 commits
    • Davi Arnaut's avatar
      Bug#45288: pb2 returns a lot of compilation warnings on linux · c96b249f
      Davi Arnaut authored
      Fix warnings flagged by the new warning option -Wunused-but-set-variable
      that was added to GCC 4.6 and that is enabled by -Wunused and -Wall. The
      option causes a warning whenever a local variable is assigned to but is
      later unused. It also warns about meaningless pointer dereferences.
      c96b249f
    • Davi Arnaut's avatar
      Bug#52514: mysql 5.1 do_abi_check does not compile w/ gcc4.5 · d676c3ff
      Davi Arnaut authored
                 due to GCC preprocessor change
            
      The problem is that newer GCC versions treats missing headers
      as fatal errors. The solution is to use a guard macro to prevent
      the inclusion of system headers when checking the ABI with the
      C Preprocessor.
      
      Reference: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=15638
                 http://gcc.gnu.org/bugzilla/show_bug.cgi?id=44836
      d676c3ff
    • Davi Arnaut's avatar
      Bug#54453: Failing assertion: trx->active_trans when renaming a · 17b9155f
      Davi Arnaut authored
                 table with active trx
      
      Essentially, the problem is that InnoDB does a implicit commit
      when a cursor (table handler) is unlocked/closed, creating
      a dissonance between the transaction state within the server
      layer and the storage engine layer. Theoretically, a statement
      transaction can encompass several table instances in a similar
      manner to a multiple statement transaction, hence it does not
      make sense to limit a statement transaction to the lifetime of
      the table instances (cursors) used within it.
      
      Since this particular instance of the problem is only triggerable
      on 5.1 and is masked on 5.5 due 2PC being skipped (assertion is in
      the prepare phase of a 2PC), the solution (which is less risky) is
      to explicitly end the transaction before the cached table is unlock
      on rename table.
      
      The patch is to be null merged into trunk.
      17b9155f
  2. 19 Jul, 2010 4 commits
  3. 16 Jul, 2010 3 commits
  4. 09 Jul, 2010 1 commit
  5. 08 Jul, 2010 1 commit
  6. 07 Jul, 2010 1 commit
  7. 04 Jul, 2010 1 commit
    • Vasil Dimov's avatar
      Merge mysql-5.1-innodb -> mysql-5.1-security · 0b0c18a0
      Vasil Dimov authored
      Merge up to sunny.bains@oracle.com-20100625081841-ppulnkjk1qlazh82 .
      There are 8 more changesets in mysql-5.1-innodb, but PB2 shows a
      failure for a test added in one of them. If that is resolved quickly
      then those 8 more changesets will be merged too.
      0b0c18a0
  8. 02 Jul, 2010 8 commits
  9. 01 Jul, 2010 2 commits
    • Alexey Kopytov's avatar
      Automerge. · 988dc230
      Alexey Kopytov authored
      988dc230
    • Alexey Kopytov's avatar
      Bug#54667: Unnecessary signal handler redefinition · ac89d926
      Alexey Kopytov authored
      POSIX requires that a signal handler defined with sigaction()
      is not reset on delivering a signal unless SA_NODEFER or
      SA_RESETHAND is set. It is therefore unnecessary to redefine
      the handler on signal delivery on platforms where sigaction()
      is used without those flags.
      ac89d926
  10. 30 Jun, 2010 2 commits
    • Sergey Glukhov's avatar
      Bug#51431 Wrong sort order after import of dump file · a6220d82
      Sergey Glukhov authored
      The problem is that QUICK_SELECT_DESC behaviour depends
      on used_key_parts value which can be bigger than selected
      best_key_parts value if an engine supports clustered key.
      But used_key_parts is overwritten with best_key_parts
      value that prevents from correct selection of index
      access method. The fix is to preserve used_key_parts
      value for further use in QUICK_SELECT_DESC.
      a6220d82
    • Staale Smedseng's avatar
      Bug #53899 Wrong mysql_stmt_errno() after connection loss with · 3b3983a4
      Staale Smedseng authored
      automatic reconnect
      
      A client with automatic reconnect enabled will see the error
      message "Lost connection to MySQL server during query" if the
      connection is lost between mysql_stmt_prepare() and
      mysql_stmt_execute(). The mysql_stmt_errno() number, however,
      is 0 -- not the corresponding value 2013.
      
      This patch checks for the case where the prepared statement
      has been pruned due to a connection loss (i.e., stmt->mysql
      has been set to NULL) during a call to cli_advanced_command(),
      and avoids changing the last_errno to the result of the last
      reconnect attempt.
      3b3983a4
  11. 29 Jun, 2010 2 commits
  12. 28 Jun, 2010 5 commits
  13. 27 Jun, 2010 2 commits
    • Alfranio Correia's avatar
      353e1107
    • 's avatar
      The following statements support the CURRENT_USER() where a user is needed. · 899a1d69
      authored
      DROP USER 
      RENAME USER CURRENT_USER() ...
      GRANT ... TO CURRENT_USER()
      REVOKE ... FROM CURRENT_USER()
      ALTER DEFINER = CURRENT_USER() EVENTbut, When these statements are binlogged, CURRENT_USER() just is binlogged
      as 'CURRENT_USER()', it is not expanded to the real user name. When slave 
      executes the log event, 'CURRENT_USER()' is expand to the user of slave 
      SQL thread, but SQL thread's user name always NULL. This breaks the replication.
      
      After this patch, session's user will be written into query log events 
      if these statements call CURREN_USER() or 'ALTER EVENT' does not assign a definer.
      899a1d69
  14. 26 Jun, 2010 1 commit
    • Jon Olav Hauglid's avatar
      Bug #54360 Deadlock DROP/ALTER/CREATE DATABASE with open HANDLER · 9fa66b64
      Jon Olav Hauglid authored
      This deadlock happened if DROP DATABASE was blocked due to an open
      HANDLER table from a different connection. While DROP DATABASE
      is blocked, it holds the LOCK_mysql_create_db mutex. This results
      in a deadlock if the connection with the open HANDLER table tries
      to execute a CREATE/ALTER/DROP DATABASE statement as they all
      try to acquire LOCK_mysql_create_db.
      
      This patch makes this deadlock scenario very unlikely by closing and
      marking for re-open all HANDLER tables for which there are pending
      conflicing locks, before LOCK_mysql_create_db is acquired.
      However, there is still a very slight possibility that a connection
      could access one of these HANDLER tables between closing/marking for
      re-open and the acquisition of LOCK_mysql_create_db.
      
      This patch is for 5.1 only, a separate and complete fix will be
      made for 5.5+.
      
      Test case added to schema.test.
      9fa66b64
  15. 25 Jun, 2010 4 commits
    • Georgi Kodinov's avatar
      merge · 2b2e0908
      Georgi Kodinov authored
      2b2e0908
    • Sunny Bains's avatar
      Fix bug#54583. This change reverses rsvn:1350 by getting rid of a bogus assertion · 442ba20a
      Sunny Bains authored
      and clarifies the invariant in dict_table_get_on_id().
            
      In Mar 2007 Marko observed a crash during recovery, the crash resulted from
      an UNDO operation on a system table. His solution was to acquire an X lock on
      the data dictionary, this in hindsight was an overkill. It is unclear what
      caused the crash, current hypothesis is that it was a memory corruption.
            
      The X lock results in performance issues by when undoing changes due to
      rollback during normal operation on regular tables.
            
      Why the change is safe:
      ======================
      The InnoDB code has changed since the original X lock change was made. In the
      new code we always lock the data dictionary in X mode during startup when
      UNDOing operations on the system tables (this is a given). This ensures that
      the crash Marko observed cannot happen as long as all transactions that update
      the system tables follow the standard rules by setting the appropriate DICT_OP
      flag when writing the log records when they make the changes.
            
      If transactions violate the above mentioned rule then during recovery (at
      startup) the rollback code (see trx0roll.c) will not acquire the X lock
      and we will see the crash again.  This will however be a different bug.
      442ba20a
    • Vasil Dimov's avatar
      93abdd67
    • Vasil Dimov's avatar