1. 04 May, 2010 2 commits
  2. 30 Apr, 2010 1 commit
    • Alexander Nozdrin's avatar
      Patch for Bug#52356: query_cache_debug fails on Linux. · c784ee27
      Alexander Nozdrin authored
      There were two problems here:
        1. misleading error message
        2. abusing KILL QUERY in the test case
      
      1. The server reported "'DELETE FROM t1' failed: 1689: Wait on a lock was
      aborted due to a pending exclusive lock", while the proper error message
      should be "'DELETE FROM t1' failed: 1317: Query execution was interrupted".
      
      The problem is that the server has two different flags for
      signalling that a query is being killed: THD::killed and
      mysys_var::abort. The test case triggers a race: sometimes
      mysys_var::abort is set earlier than THD::killed. That leads
      to the following situation:
      
        - thr_lock() checks mysys_var::abort and returns error status,
          since mysys_var::abort is set;
      
        - the caller (mysql_lock_tables()) gets an error from thr_lock(),
          but THD::killed is not set, so it decides that thr_lock() couldn't
          get a lock due to a pending exclusive lock.
      
      This is a known issue with the server and it's not going to be fixed soon.
      
      5.5 differs from 5.1 here as follows: when thr_lock() returns an error:
        - 5.1 continues trying thr_lock() until success;
        - 5.5 propagates the error
      
      2. The test case uses KILL QUERY is a highly concurent environment.
      
      The fix is to wait for the dying statement to rest in peace before
      executing another DELETE FROM t1.
      c784ee27
  3. 29 Apr, 2010 1 commit
  4. 28 Apr, 2010 2 commits
    • Sven Sandberg's avatar
      BUG#50670: Slave stops with error code 1644 · a6518243
      Sven Sandberg authored
      Clarified error messages related to unsafe statements:
       - avoid the internal technical term "row injection"
       - use 'binary log' instead of 'binlog'
       - avoid the word 'unsafeness'
      a6518243
    • 's avatar
      Bug #51839 mixup of DDL causes slave to stop · fa28ba8b
      authored
      Stored routine DDL statements use statement-based replication
      regardless of the current binlog format. The problem here was
      that if a DDL statement failed during metadata lock acquisition
      or opening of mysql.proc, the binlog format would not be reset
      before returning. So the following DDL or DML statements are 
      binlogged with a wrong binlog format, which causes the slave 
      to stop.
      
      The problem can be resolved by grabbing an exclusive MDL lock firstly
      instead of clearing the current binlog format. So that the binlog
      format will not be affected when the lock grab returns directly with
      an error. The same way is taken to open a proc table for update.
      fa28ba8b
  5. 27 Apr, 2010 5 commits
  6. 26 Apr, 2010 5 commits
  7. 22 Apr, 2010 1 commit
    • Alexander Nozdrin's avatar
      Patch for Bug#53022: Compilation of "embedded" is broken. · 53af29c0
      Alexander Nozdrin authored
      The bug was a side effect of WL#5030 (fix header files) and
      WL#5161 (CMake).
      
      The problem was that CMake-generated config.h (and my_config.h
      as a copy of it) had a header guard. GNU autotools-generated
      [my_]config.h did not. During WL#5030 the order of header files
      was changed, so the following started to happen (using GNU autotools,
      in embedded server):
        - my_config.h included, defining HAVE_OPENSSL
        - my_global.h included, un-defining  HAVE_OPENSSL
        - zlib.h included, including config.h,
          defining HAVE_OPENSSL again.
      
      The fix is to check HAVE_OPENSSL in conjuction with EMBEDDED_LIBRARY.
      More common fix would be to define a macros as HAVE_OPENSSL && !EMBEDDED_LIBRARY
      and use it instead of HAVE_OPENSSL.
      53af29c0
  8. 21 Apr, 2010 6 commits
  9. 20 Apr, 2010 3 commits
    • Mats Kindahl's avatar
      WL#5030: Splitting mysql_priv.h · f96694f9
      Mats Kindahl authored
      Removing traces of mysql_priv.h from comments and other
      non-source files that were missed before.
      f96694f9
    • Alfranio Correia's avatar
      BUG#51894 Replication failure with SBR on DROP TEMPORARY TABLE inside a · 9ba731c2
      Alfranio Correia authored
                transaction
      BUG#52616 Temp table prevents switch binlog format from STATEMENT to ROW
      
      Before the WL#2687 and BUG#46364, every non-transactional change that happened
      after a transactional change was written to trx-cache and flushed upon
      committing the transaction. WL#2687 and BUG#46364 changed this behavior and
      non-transactional changes are now written to the binary log upon committing
      the statement.
      
      A binary log event is identified as transactional or non-transactional through
      a flag in the Log_event which is set taking into account the underlie storage
      engine on what it is stems from. In the current bug, this flag was not being
      set properly when the DROP TEMPORARY TABLE was executed.
      
      However, while fixing this bug we figured out that changes to temporary tables
      should be always written to the trx-cache if there is an on-going transaction.
      Otherwise, binlog events in the reversed order would be produced.
      
      Regarding concurrency, keeping changes to temporary tables in the trx-cache is
      also safe as temporary tables are only visible to the owner connection.
      
      In this patch, we classify the following statements as unsafe:
         1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp
      
         2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam
      
         3 - CREATE TEMPORARY TABLE t_myisam_temp SELECT * FROM t_myisam
      
      On the other hand, the following statements are classified as safe:
      
         1 - INSERT INTO t_innodb SELECT * FROM t_myisam_temp
      
         2 - INSERT INTO t_myisam_temp SELECT * FROM t_innodb
      
      The patch also guarantees that transactions that have a DROP TEMPORARY are
      always written to the binary log regardless of the mode and the outcome:
      commit or rollback. In particular, the DROP TEMPORARY is extended with the
      IF EXISTS clause when the current statement logging format is set to row.
      
      Finally, the patch allows to switch from STATEMENT to MIXED/ROW when there
      are temporary tables but the contrary is not possible.
      9ba731c2
    • Jon Olav Hauglid's avatar
      merge from mysql-trunk-bugfixing · f2587df7
      Jon Olav Hauglid authored
      f2587df7
  10. 19 Apr, 2010 5 commits
  11. 18 Apr, 2010 1 commit
  12. 16 Apr, 2010 1 commit
  13. 15 Apr, 2010 7 commits
    • Luis Soares's avatar
      automerge: merged bundle from bug report into latest · 24b9ff29
      Luis Soares authored
      mysql-trunk-bugfixing (bug 52341).
      24b9ff29
    • Luis Soares's avatar
      Automerge: merged bug bundle from bug report into latest · 697da8cf
      Luis Soares authored
      mysql-trunk-bugfixing.
      697da8cf
    • Jon Olav Hauglid's avatar
      Bug #47459 Assertion in Diagnostics_area::set_eof_status on OPTIMIZE TABLE · 1a1a96e7
      Jon Olav Hauglid authored
      This assertion could be triggered during execution of OPTIMIZE TABLE for
      InnoDB tables. As part of optimize for InnoDB tables, the table is recreated
      and then opened again. If the reopen failed for any reason, the assertion
      would be triggered. This could for example be caused by a concurrent DROP
      TABLE executed by a different connection. The reason for the assertion was
      that any failures during reopening were ignored.
      
      This patch fixes the problem by making sure that the result of reopening the
      table is checked and that any error messages are sent to the client.
      
      Test case added to innodb_mysql_sync.test.
      1a1a96e7
    • Jon Olav Hauglid's avatar
      Bug #51391 Deadlock involving events during rqg_info_schema test · b6f0c3a1
      Jon Olav Hauglid authored
      This was a deadlock between CREATE/ALTER/DROP EVENT and a query
      accessing both the mysql.event table and I_S.GLOBAL_VARIABLES.
      
      The root of the problem was that the LOCK_event_metadata mutex was
      used to both protect the "event_scheduler" global system variable
      and the internal event data structures used by CREATE/ALTER/DROP EVENT.
      
      The deadlock would occur if CREATE/ALTER/DROP EVENT held
      LOCK_event_metadata while trying to open the mysql.event table,
      at the same time as the query had mysql.event open, trying to
      lock LOCK_event_metadata to access "event_scheduler".
      
      This bug was fixed in the scope of Bug#51160 by using only
      LOCK_global_system_variables to protect "event_scheduler".
      This makes it so that the query above won't lock LOCK_event_metadata,
      thereby preventing this deadlock from occuring.
      
      This patch contains no code changes.
      Test case added to lock_sync.test.
      b6f0c3a1
    • Sergey Vojtovich's avatar
    • Sergey Vojtovich's avatar
      BUG#46587 - archive storage engine headers don't include · e43e5983
      Sergey Vojtovich authored
                  my_global.h first
      
      We may end up with a compilation failure on certain platforms
      because zlib.h is included before my_global.h.
      
      Fixed by moving zlib.h inclusion down after my_global.h.
      e43e5983
    • Sergey Vojtovich's avatar
      BUG#47059 - In audit plugin I cannot see the event subclasses, · 1b12f4c2
      Sergey Vojtovich authored
                  e.g.MYSQL_AUDIT_GENERAL_ERROR
      
      General audit API (MYSQL_AUDIT_GENERAL_CLASS) didn't expose event
      subclass to plugins.
      
      This patch exposes event subclass to plugins via
      struct mysql_event_general::event_subclass.
      
      This change is not compatible with existing general audit plugins.
      Audit interface major version has been incremented.
      1b12f4c2