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. · 82956fff
      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.
      82956fff
  3. 29 Apr, 2010 1 commit
  4. 28 Apr, 2010 2 commits
    • Sven Sandberg's avatar
      BUG#50670: Slave stops with error code 1644 · fc4a8a5e
      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'
      
      
      mysql-test/extra/binlog_tests/blackhole.test:
        updated suppression pattern
      mysql-test/extra/binlog_tests/mix_innodb_myisam_binlog.test:
        updated suppression pattern
      mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test:
        updated suppression pattern
      mysql-test/extra/rpl_tests/rpl_insert_id.test:
        updated suppression pattern
      mysql-test/extra/rpl_tests/rpl_loaddata.test:
        updated suppression pattern
      mysql-test/extra/rpl_tests/rpl_mixing_engines.test:
        updated suppression pattern
      mysql-test/extra/rpl_tests/rpl_start_stop_slave.test:
        updated suppression pattern
      mysql-test/extra/rpl_tests/rpl_stm_000001.test:
        updated suppression pattern
      mysql-test/extra/rpl_tests/rpl_stop_middle_group.test:
        updated suppression pattern
      mysql-test/r/archive.result:
        updated result file
      mysql-test/r/commit_1innodb.result:
        updated result file
      mysql-test/r/ctype_cp932_binlog_stm.result:
        updated result file
      mysql-test/r/partition_innodb_stmt.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_innodb.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_killed.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_multi_engine.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_statement_insert_delayed.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_stm_blackhole.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_stm_do_db.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_stm_ps.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_stm_row.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_stm_unsafe_warning.result:
        updated result file
      mysql-test/suite/binlog/r/binlog_unsafe.result:
        updated result file
      mysql-test/suite/binlog/t/binlog_killed.test:
        updated suppression pattern
      mysql-test/suite/binlog/t/binlog_multi_engine.test:
        updated suppression pattern
      mysql-test/suite/binlog/t/binlog_statement_insert_delayed.test:
        updated suppression pattern
      mysql-test/suite/binlog/t/binlog_stm_ps.test:
        updated suppression pattern
      mysql-test/suite/binlog/t/binlog_stm_row.test:
        updated suppression pattern
      mysql-test/suite/binlog/t/binlog_stm_unsafe_warning.test:
        updated suppression pattern
      mysql-test/suite/binlog/t/binlog_tmp_table.test:
        updated suppression pattern
      mysql-test/suite/binlog/t/binlog_unsafe.test:
        updated suppression pattern
      mysql-test/suite/ndb/r/ndb_binlog_format.result:
        updated result file
      mysql-test/suite/ndb/t/ndb_binlog_format.test:
        updated suppression pattern
      mysql-test/suite/perfschema/r/binlog_stmt.result:
        updated result file
      mysql-test/suite/perfschema/t/binlog_stmt.test:
        updated suppression pattern
      mysql-test/suite/rpl/r/rpl_begin_commit_rollback.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_blackhole.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_concurrency_error.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_get_lock.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_insert_id.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_insert_ignore.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_misc_functions.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_mysql_upgrade.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_nondeterministic_functions.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_read_only.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_row_binlog_max_cache_size.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_row_mixing_engines.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_slow_query_log.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_sp.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_stm_000001.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_stm_auto_increment_bug33029.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_stm_loadfile.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_stm_start_stop_slave.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_temp_temporary.result:
        updated result file
      mysql-test/suite/rpl/r/rpl_variables_stm.result:
        updated result file
      mysql-test/suite/rpl/t/rpl000013.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_begin_commit_rollback.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_blackhole.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_concurrency_error.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_get_lock.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_insert.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_insert_id.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_insert_ignore.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_invoked_features.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_misc_functions.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_mixed_bit_pk.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_mysql_upgrade.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_nondeterministic_functions.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_optimize.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_read_only.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_semi_sync.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_semi_sync_event.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_session_var.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_slow_query_log.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_sp.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_stm_auto_increment_bug33029.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_stm_found_rows.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_stm_insert_delayed.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_stm_loadfile.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_temp_table.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_temp_temporary.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_temporary.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_timezone.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_trigger.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_udf.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_user_variables.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_variables_stm.test:
        updated suppression pattern
      mysql-test/suite/rpl/t/rpl_view_multi.test:
        updated suppression pattern
      mysql-test/suite/rpl_ndb/r/rpl_ndb_binlog_format_errors.result:
        updated result file
      mysql-test/suite/rpl_ndb/t/rpl_ndb_binlog_format_errors.test:
        updated suppression pattern
      mysql-test/suite/rpl_ndb/t/rpl_ndb_stm_innodb.test:
        updated suppression pattern
      mysql-test/suite/sys_vars/t/rpl_init_slave_func.test:
        updated suppression pattern
      mysql-test/t/archive.test:
        updated suppression pattern
      mysql-test/t/commit_1innodb.test:
        updated suppression pattern
      mysql-test/t/create_select_tmp.test:
        updated suppression pattern
      mysql-test/t/ctype_cp932_binlog_stm.test:
        updated suppression pattern
      mysql-test/t/lock_sync.test:
        updated suppression pattern
      mysql-test/t/mysqlbinlog.test:
        updated suppression pattern
      mysql-test/t/mysqldump.test:
        updated suppression pattern
      mysql-test/t/sp_trans.test:
        updated suppression pattern
      sql/log_event.cc:
        Clarified error message.
      sql/share/errmsg-utf8.txt:
        Clarified error messages.
      fc4a8a5e
    • unknown's avatar
      Bug #51839 mixup of DDL causes slave to stop · 1daed852
      unknown 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.
      
      
      mysql-test/suite/rpl/r/rpl_tmp_table_and_DDL.result:
        Test Result for bug#51839
      mysql-test/suite/rpl/t/rpl_tmp_table_and_DDL.test:
        Added test to make sure the binlog format is not changed
        after a execution of DDL with a table locked.
      sql/sp.cc:
        Grab an exclusive MDL lock and open a proc table for update firstly
        instead of clearing the current binlog format.
      1daed852
  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. · 995c2556
      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.
      995c2556
  8. 21 Apr, 2010 6 commits
    • Alexander Nozdrin's avatar
      45a93758
    • Alexander Nozdrin's avatar
      Patch for Bug#53022: Compilation of "embedded" is broken. · f0f066ba
      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 change the order of header file, moving zlib.h
      to the top of the header list. More proper fix would be to wrap
      unguarded auto-generated [my_]config.h by guarded non-generated
      header file.
      f0f066ba
    • Alfranio Correia's avatar
      BUG#51894 Replication failure with SBR on DROP TEMPORARY TABLE inside a · e2328781
      Alfranio Correia authored
                transaction
      BUG#52616 Temp table prevents switch binlog format from STATEMENT to ROW
      
      Post-merge fixes.
      
      
      mysql-test/include/commit.inc:
        Changed the test case as drop temporary is now written to the binary log in row mode.
      mysql-test/r/commit_1innodb.result:
        Changed the test case as drop temporary is now written to the binary log in row mode.
      mysql-test/r/ctype_cp932_binlog_stm.result:
        Disabled warning messages because the test runs in both statement and mixed modes.
      mysql-test/t/ctype_cp932_binlog_stm.test:
        Disabled warning messages because the test runs in both statement and mixed modes.
      mysql-test/t/mysqlbinlog.test:
        Removed the --short-form due to BUG#18337 what was suppressing the
        select * from t5 /* must be (1),(1) */ in row format.
      e2328781
    • Jon Olav Hauglid's avatar
      merge from mysql-trunk-runtime · 18b9157f
      Jon Olav Hauglid authored
      18b9157f
    • Jon Olav Hauglid's avatar
      merge from mysql-trunk-bugfixing · 587719c2
      Jon Olav Hauglid authored
      587719c2
    • Mats Kindahl's avatar
      Merging with mysql-trunk-bugfixing · aba04534
      Mats Kindahl authored
      aba04534
  9. 20 Apr, 2010 3 commits
    • Mats Kindahl's avatar
      WL#5030: Splitting mysql_priv.h · 4b77a66b
      Mats Kindahl authored
      Removing traces of mysql_priv.h from comments and other
      non-source files that were missed before.
      4b77a66b
    • Alfranio Correia's avatar
      BUG#51894 Replication failure with SBR on DROP TEMPORARY TABLE inside a · 4bf7d53b
      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.
      
      mysql-test/extra/rpl_tests/rpl_binlog_max_cache_size.test:
        Updated the test case because 
           CREATE TEMPORARY TABLE t_innodb_temp SELECT * FROM t_myisam is not unsafe.
      mysql-test/extra/rpl_tests/rpl_implicit_commit_binlog.test:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/extra/rpl_tests/rpl_innodb.test:
        Removed comments from the test case that became false after the patch.
      mysql-test/extra/rpl_tests/rpl_loaddata.test:
        Suppressed warning messages due to the following cases:
        
           1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp
        
           2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam
      mysql-test/include/ctype_utf8_table.inc:
        Suppressed warning messages due to the following cases:
        
           1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp
        
           2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam
      mysql-test/r/ctype_cp932_binlog_stm.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/binlog/r/binlog_database.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/binlog/r/binlog_innodb_row.result:
        Updated the result file.
      mysql-test/suite/binlog/r/binlog_multi_engine.result:
        Updated the unsafe message.
      mysql-test/suite/binlog/r/binlog_row_binlog.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/binlog/r/binlog_row_drop_tmp_tbl.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/binlog/r/binlog_stm_binlog.result:
        Updated the result file.
      mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/binlog/t/binlog_tmp_table.test:
        Suppressed warning messages due to the following cases:
        
           1 - INSERT INTO t_myisam SELECT * FROM t_myisam_temp
        
           2 - INSERT INTO t_myisam_temp SELECT * FROM t_myisam
      mysql-test/suite/ndb/r/ndb_binlog_format.result:
        Updated the unsafe message.
      mysql-test/suite/rpl/r/rpl_concurrency_error.result:
        Updated the unsafe message.
      mysql-test/suite/rpl/r/rpl_mixed_binlog_max_cache_size.result:
        Updated the result file because 
           CREATE TEMPORARY TABLE t_innodb_temp SELECT * FROM t_myisam is not unsafe.
      mysql-test/suite/rpl/r/rpl_mixed_implicit_commit_binlog.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_mixed_mixing_engines.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_mixed_row_innodb.result:
        Added some comments to ease the understanding of the result file.
      mysql-test/suite/rpl/r/rpl_non_direct_mixed_mixing_engines.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_non_direct_row_mixing_engines.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_non_direct_stm_mixing_engines.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_row_drop.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_row_implicit_commit_binlog.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_row_mixing_engines.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_stm_binlog_max_cache_size.result:
        Updated the result file because 
           CREATE TEMPORARY TABLE t_innodb_temp SELECT * FROM t_myisam is not unsafe.
      mysql-test/suite/rpl/r/rpl_stm_implicit_commit_binlog.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_stm_innodb.result:
        Added some comments to ease the understanding of the result file.
      mysql-test/suite/rpl/r/rpl_stm_mixing_engines.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl/r/rpl_stm_stop_middle_group.result:
        Updated the unsafe message.
      mysql-test/suite/rpl/r/rpl_temp_temporary.result:
        Added a test case.
      mysql-test/suite/rpl/t/rpl000013.test:
        Suppressed warning messages due to the following cases:
        
           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
      mysql-test/suite/rpl/t/rpl_misc_functions.test:
        Suppressed warning messages.
      mysql-test/suite/rpl/t/rpl_temp_table.test:
        Suppressed warning messages due to the following cases:
        
           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
      mysql-test/suite/rpl/t/rpl_temp_temporary.test:
        Added a test case.
      mysql-test/suite/rpl/t/rpl_temporary.test:
        Suppressed warning messages due to the following cases:
        
           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
      mysql-test/suite/rpl_ndb/r/rpl_ndb_row_implicit_commit_binlog.result:
        Updated the test case due to the new rules: changes to
        temporary tables are written to the binary log in the
        boundaries of a transaction if there is any.
      mysql-test/suite/rpl_ndb/r/rpl_truncate_7ndb.result:
        Updated the test case to remove references to positions
        in the binary log.
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test:
        Updated the test case to remove references to positions
        in the binary log.
      mysql-test/t/create_select_tmp.test:
        Suppressed warning messages due to the following cases:
        
           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
      mysql-test/t/ctype_cp932_binlog_stm.test:
        Suppressed warning messages due to the following cases:
        
           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
      mysql-test/t/mysqlbinlog.test:
        Suppressed warning messages due to the following cases:
        
           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
      sql/log.cc:
        Improved the code by creating several functions to hide decision
        on type of engine changed, commit/abort, etc:  
        
        . stmt_has_updated_non_trans_table
        
        . trans_has_updated_non_trans_table
        
        . ending_trans
        
        Updated the binlog_rollback function and the use of the 
        OPTION_KEEP_LOG which indincates when a temporary table was
        either created or dropped and as such the command must be 
        logged if not in MIXED mode and even while rolling back the
        transaction.
      sql/log.h:
        Improved the code by creating several functions to hide decision
        on type of engine changed, commit/abort, etc.
      sql/log_event.cc:
        Removed the setting of the OPTION_KEEP_LOG as it is related to CREATE
        TEMPORARY and DROP TEMPORARY and not to the type of engine (i.e.
        transactional or non-transactional).
      sql/log_event_old.cc:
        Removed the setting of the OPTION_KEEP_LOG as it is related to CREATE
        TEMPORARY and DROP TEMPORARY and not to the type of engine (i.e.
        transactional or non-transactional).
      sql/share/errmsg-utf8.txt:
        Updated the unsafe message.
      sql/sql_class.cc:
        Classifies 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
        
        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
      sql/sql_class.h:
        It allows to switch from STATEMENT to MIXED/ROW when there are temporary
        tables but the contrary is not possible.
      sql/sql_table.cc:
        Fixed the case that a DROP/DROP TEMPORARY that affects a temporary table in MIXED
        mode is written as a DROP TEMPORARY TABLE IF EXISTS because the table may not exist in the slave and due to the IF EXISTS token an error will never happen
        while processing the statement in the slave.
        
        Removed a function that was not being used.
      4bf7d53b
    • Jon Olav Hauglid's avatar
      merge from mysql-trunk-bugfixing · 913ff066
      Jon Olav Hauglid authored
      913ff066
  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 · 7ca7b55f
      Luis Soares authored
      mysql-trunk-bugfixing (bug 52341).
      7ca7b55f
    • Luis Soares's avatar
      Automerge: merged bug bundle from bug report into latest · 1bbd8984
      Luis Soares authored
      mysql-trunk-bugfixing.
      1bbd8984
    • Jon Olav Hauglid's avatar
      Bug #47459 Assertion in Diagnostics_area::set_eof_status on OPTIMIZE TABLE · c782dd58
      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.
      c782dd58
    • Jon Olav Hauglid's avatar
      Bug #51391 Deadlock involving events during rqg_info_schema test · 1a20fadc
      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.
      1a20fadc
    • Sergey Vojtovich's avatar
    • Sergey Vojtovich's avatar
      BUG#46587 - archive storage engine headers don't include · 593b0bd2
      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.
      
      storage/archive/azlib.h:
        zlib.h must be included after my_global.h.
      593b0bd2
    • Sergey Vojtovich's avatar
      BUG#47059 - In audit plugin I cannot see the event subclasses, · 68f835a9
      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.
      
      include/mysql/plugin_audit.h:
        Expose event subclass to audit general plugins.
      plugin/audit_null/audit_null.c:
        Added distinct counters for general event sub-classes.
        
        Removed printf() from deinit(). One can easily see number of
        calls via status variables.
        
        To make code nicer, modified class mask to use macro instead
        of hardcoded number.
        
        Incremented audit plugin minor version.
      sql/sql_audit.cc:
        Expose event subclass to audit general plugins.
      68f835a9