An error occurred fetching the project authors.
  1. 24 May, 2010 1 commit
    • unknown's avatar
      Bug #49741 test files contain explicit references to bin/relay-log positions · e78da462
      unknown authored
      Some of the test cases reference to binlog position and
      these position numbers are written into result explicitly.
      It is difficult to maintain if log event format changes. 
      
      There are a couple of cases explicit position number appears, 
      we handle them in different ways
      A. 'CHANGE MASTER ...' with MASTER_LOG_POS or/and RELAY_LOG_POS options
         Use --replace_result to mask them.
      B. 'SHOW BINLOG EVENT ...'
         Replaced by show_binlog_events.inc or wait_for_binlog_event.inc. 
         show_binlog_events.inc file's function is enhanced by given
         $binlog_file and $binlog_limit.
      C. 'SHOW SLAVE STATUS', 'show_slave_status.inc' and 'show_slave_status2.inc'
         For the test cases just care a few items in the result of 'SHOW SLAVE STATUS',
         only the items related to each test case are showed.
         'show_slave_status.inc' is rebuild, only the given items in $status_items
         will be showed.
         'check_slave_is_running.inc' and 'check_slave_no_error.inc'
         and 'check_slave_param.inc' are auxiliary files helping
         to show running status and error information easily.
      
      
      mysql-test/extra/binlog_tests/binlog.test:
        It only cares whether current binlog file index is changed, so it is ok
        with 'show_master_status.inc' instead of 'show mater status'.
      mysql-test/extra/binlog_tests/blackhole.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/extra/rpl_tests/rpl_deadlock.test:
        Use 'check_slave_is_running.inc' instead of 'show_slave_status2.inc'.
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
        Use 'wait_for_slave_sql_error.inc' and 'ait_for_slave_sql_error_and_skip.inc' instead of 'show slave status'.
      mysql-test/extra/rpl_tests/rpl_flsh_tbls.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/extra/rpl_tests/rpl_get_master_version_and_clock.test:
        It is need now to give a error number, so use 'wait_for_slave_io_to_stop.inc'
        instead of 'wait_for_slave_io_error.inc'.
      mysql-test/extra/rpl_tests/rpl_insert_delayed.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/extra/rpl_tests/rpl_log.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
        se 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/extra/rpl_tests/rpl_max_relay_size.test:
        se 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/extra/rpl_tests/rpl_ndb_apply_status.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/extra/rpl_tests/rpl_reset_slave.test:
        Use 'show_slave_status.inc' instead of 'show_slave_status2.inc' statement.
        Use 'check_slave_no_error.inc' to simplify the check that there is no error.
      mysql-test/extra/rpl_tests/rpl_row_basic.test:
        Use 'check_slave_is_running.inc' to verify that Slave threads are running well.
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
      mysql-test/extra/rpl_tests/rpl_row_tabledefs.test:
        Use 'show_slave_error_status_and_skip.inc' instead of 'show slave status'.
      mysql-test/include/check_slave_is_running.inc:
        To make sure both sql and io thread are running well. If not, the test will be aborted.
      mysql-test/include/check_slave_no_error.inc:
        To make sure both sql and io thread have no error. If not, the test will be aborted.
      mysql-test/include/get_relay_log_pos.inc:
        According to the position of a log event in master binlog file,
        find the peer position of a log event in relay log file.
      mysql-test/include/rpl_stmt_seq.inc:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/include/show_binlog_events.inc:
        Add two options $binlog_file and $binlog_limit for showing binlog events from different binlog files or/and given different limits on position or row number.
      mysql-test/include/show_rpl_debug_info.inc:
        Add 'SELECT NOW()' in the debug information.
      mysql-test/include/show_slave_status.inc:
        It's more clean and tidy Only the given columns of slave status are printed.
      mysql-test/include/test_fieldsize.inc:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/include/wait_for_binlog_event.inc:
        Use show_rpl_debug_info.inc instead of 'SHOW BINLOG EVENTS'.
      mysql-test/include/wait_for_slave_io_error.inc:
        Add $slave_io_errno and $show_slave_io_error, it waits only a given error.
      mysql-test/include/wait_for_slave_param.inc:
        Use die instead of exit.
      mysql-test/include/wait_for_slave_sql_error.inc:
        Add $slave_sql_errno and $show_slave_sql_error, it waits only a given error.
      mysql-test/include/wait_for_status_var.inc:
        Use die instead of exit.
      mysql-test/r/flush_block_commit_notembedded.result:
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/r/multi_update.result:
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/suite/binlog/r/binlog_innodb.result:
        It checks whether somethings are binlogged, so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/suite/binlog/r/binlog_row_binlog.result:
        Position in the result of 'show master status' is replaced by '#'.
      mysql-test/suite/binlog/r/binlog_stm_binlog.result:
        Position in the result of 'show master status' is replaced by '#'.
      mysql-test/suite/binlog/t/binlog_innodb.test:
        It checks whether somethings are binlogged, so we use 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/suite/binlog/t/binlog_stm_binlog.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/bugs/r/rpl_bug36391.result:
        Position in the result of 'show master status' is replaced by '#'.
      mysql-test/suite/bugs/t/rpl_bug12691.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/bugs/t/rpl_bug36391.test:
        'show master status' is replaced by 'show_master_status.inc'.
        Position in the result of 'show master status' is replaced by '#'.
      mysql-test/suite/engines/funcs/r/rpl_000015.result:
        It checks whether somethings are binlogged, 
        so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/suite/engines/funcs/t/rpl_000015.test:
        Use 'check_slave_is_running.inc' to verify that Slave threads are running well.
      mysql-test/suite/engines/funcs/t/rpl_REDIRECT.test:
        Use 'query_vertical SHOW SLAVE STATUS' instead of 'show slave status'.
        There is no status columns in the result file, for no slave exists on master's server.
      mysql-test/suite/engines/funcs/t/rpl_change_master.test:
        This test just care whether Read_Master_Log_Pos is equal to Exec_Master_Log_Pos after 'CHANGE MASTER ..'. So 'show slave status' is removed and just check the value of Read_Master_Log_Pos and Exec_Master_Log_Pos.
      mysql-test/suite/engines/funcs/t/rpl_empty_master_crash.test:
        We doesn't really need the statement.
      mysql-test/suite/engines/funcs/t/rpl_flushlog_loop.test:
        Just show Relay_Log_File, running status and error informations.
        Use 'check_slave_is_running.inc' to verify that Slave threads are running well.
      mysql-test/suite/engines/funcs/t/rpl_loaddata_s.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/engines/funcs/t/rpl_log_pos.test:
        Mask the explicit positions in the result file.
        Use 'check_slave_no_error.inc' to simplify the check that there is no error.
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/engines/funcs/t/rpl_rbr_to_sbr.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/engines/funcs/t/rpl_row_drop.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/engines/funcs/t/rpl_row_inexist_tbl.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/engines/funcs/t/rpl_row_until.test:
        Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
        
        Mask the explicit binary log positions in the result file.
      mysql-test/suite/engines/funcs/t/rpl_server_id1.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
        Use 'check_slave_no_error.inc' to simplify the check that there is no error.
      mysql-test/suite/engines/funcs/t/rpl_server_id2.test:
        It doesn't really need in this test.
      mysql-test/suite/engines/funcs/t/rpl_slave_status.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/engines/funcs/t/rpl_switch_stm_row_mixed.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/manual/t/rpl_replication_delay.test:
        Use 'show_slave_status.inc' instead of 'show slave status'.
      mysql-test/suite/parts/t/rpl_partition.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl/include/rpl_mixed_ddl.inc:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_000015.test:
        Use 'show_slave_status.inc' instead of 'show_slave_status2.inc'.
      mysql-test/suite/rpl/t/rpl_binlog_grant.test:
        Use 'wait_for_binlog_event.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_bug33931.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/rpl/t/rpl_change_master.test:
        This test just care whether Read_Master_Log_Pos is equal to Exec_Master_Log_Pos after 'CHANGE MASTER ..'. So 'show slave status' is removed and just check the value of Read_Master_Log_Pos and Exec_Master_Log_Pos.
      mysql-test/suite/rpl/t/rpl_critical_errors.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
        Mask the explicit position numbers in result file.
        It is restricted running on SBR, for it want to binlog 'set @A=1' statement.
      mysql-test/suite/rpl/t/rpl_empty_master_crash.test:
        It doesn't need in this test.
      mysql-test/suite/rpl/t/rpl_flushlog_loop.test:
        UUse 'check_slave_is_running.inc' and 'show_slave_status.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl/t/rpl_get_master_version_and_clock.test:
        Use 'wait_for_slave_io_error.inc' to wait the given io thread error happening.
      mysql-test/suite/rpl/t/rpl_grant.test:
        It doesn't need in this test.
      mysql-test/suite/rpl/t/rpl_incident.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl/t/rpl_known_bugs_detection.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/rpl/t/rpl_loaddata_fatal.test:
        Use 'wait_for_slave_sql_error_and_skip.inc' to wait the given sql thread error happening and then skip the event. There is no need to print the result of 'show slave stutus'.
      mysql-test/suite/rpl/t/rpl_log_pos.test:
        Use 'wait_for_slave_io_error.inc' to wait the given io thread error happening.
        There is no need to print the result of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_rbr_to_sbr.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_replicate_do.test:
        Use 'show_slave_status.inc' instead of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_rotate_logs.test:
        Use 'show_slave_status.inc' instead of 'show_slave_status2.inc'.
      mysql-test/suite/rpl/t/rpl_row_basic_11bugs.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_row_create_table.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_row_drop.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_row_until.test:
        Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
      mysql-test/suite/rpl/t/rpl_skip_error.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl/t/rpl_slave_load_remove_tmpfile.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and mask the explicit position number in the 'CHANGE MASTER' statements.
      mysql-test/suite/rpl/t/rpl_sp.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/suite/rpl/t/rpl_ssl.test:
        Use 'show_slave_status.inc' instead of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_ssl1.test:
        Use 'show_slave_status.inc' instead of 'show slave status'.
      mysql-test/suite/rpl/t/rpl_stm_until.test:
        Use 'check_slave_param.inc' to check whether SQL Thread stop at a right position, and use binlog position variables instead of explicit number in the 'CHANGE MASTER' statements.
      mysql-test/suite/rpl/t/rpl_temporary_errors.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test:
        Use 'wait_for_slave_sql_error.inc' to wait the given sql thread error happening.
        There is no need to print the result of 'show slave status'.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_circular_simplex.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_idempotent.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_multi.test:
        Mask master_log_pos and master_log_file
      mysql-test/suite/rpl_ndb/t/rpl_ndb_sync.test:
        Use 'check_slave_is_running.inc' instead of 'show slave status' statement.
      mysql-test/suite/rpl_ndb/t/rpl_truncate_7ndb.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/t/alter_table-big.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/t/create-big.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/t/ctype_cp932_binlog_stm.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      mysql-test/t/flush_block_commit_notembedded.test:
        It checks whether somethings are binlogged, 
        so we using 'show_binlog_event.inc' instead of 'show master status'.
      mysql-test/t/multi_update.test:
        It checks whether somethings are binlogged, 
        so we using 'wait_binlog_event.inc' instead of 'show master status'.
      mysql-test/t/sp_trans_log.test:
        Use 'show_binlog_events.inc' instead of 'show binlog events' statement.
      e78da462
  2. 01 Mar, 2010 1 commit
    • Andrei Elkin's avatar
      Bug #51600 rpl_slave_skip waits for slave to stop incorrectly · 711114b7
      Andrei Elkin authored
      START SLAVE UNTIL MASTER ... specifies only SQL thread to stop.
      rpl_slave_skip erronously deployed waiting for stop of both threads.
      
      Corrected with deploying the correct macro.
      Notice, earlier a similar bug@47749 was fixed in mysql-trunk.
      
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        changing two waiting calls for offline of both threads into waiting for SQL to stop.
      711114b7
  3. 03 Dec, 2008 1 commit
    • Mats Kindahl's avatar
      Bug #40116: Uncommited changes are replicated and stay on slave · c0297b70
      Mats Kindahl authored
      after rollback on master
      
      When starting a transaction with a statement containing changes
      to both transactional tables and non-transactional tables, the
      statement is considered as non-transactional and is therefore
      written directly to the binary log. This behaviour was present
      in 5.0, and has propagated to 5.1.
      
      If a trigger containing a change of a non-transactional table is
      added to a transactional table, any changes to the transactional
      table is "tainted" as non-transactional.
      
      This patch solves the problem by removing the existing "hack" that
      allows non-transactional statements appearing first in a transaction
      to be written directly to the binary log. Instead, anything inside
      a transaction is treaded as part of the transaction and not written
      to the binary log until the transaction is committed.
      
      mysql-test/suite/rpl/t/rpl_row_create_table.test:
        Removing positions from SHOW BINLOG EVENTS and using
        reset_master_and_slave to start on a fresh binary log each time.
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        Adding explicit commit in AUTOCOMMIT=0 to make test work correctly.
      mysql-test/suite/rpl/t/rpl_trigger.test:
        Adding test case for BUG#40116.
      sql/log.cc:
        Changing commit logic in binlog_commit() to only commit when
        committing a real transaction or committing a punch transaction.
      c0297b70
  4. 10 Jul, 2008 1 commit
    • Sven Sandberg's avatar
      BUG#37975: wait_for_slave_* should increase the timeout · 9d4ee0bf
      Sven Sandberg authored
      Problem 1: tests often fail in pushbuild with a timeout when waiting
      for the slave to start/stop/receive error.
      Fix 1: Updated the wait_for_slave_* macros in the following way:
      - The timeout is increased by a factor ten
      - Refactored the macros so that wait_for_slave_param does the work for
      the other macros.
      Problem 2: Tests are often incorrectly written, lacking a
      source include/wait_for_slave_to_[start|stop].inc.
      Fix 2: Improved the chance to get it right by adding
      include/start_slave.inc and include/stop_slave.inc, and updated tests
      to use these.
      Problem 3: The the built-in test language command
      wait_for_slave_to_stop is a misnomer (does not wait for the slave io
      thread) and does not give as much debug info in case of failure as
      the otherwise equivalent macro
      source include/wait_for_slave_sql_to_stop.inc
      Fix 3: Replaced all calls to the built-in command by a call to the
      macro.
      Problem 4: Some, but not all, of the wait_for_slave_* macros had an
      implicit connection slave. This made some tests confusing to read,
      and made it more difficult to use the macro in circular replication
      scenarios, where the connection named master needs to wait.
      Fix 4: Removed the implicit connection slave from all
      wait_for_slave_* macros, and updated tests to use an explicit
      connection slave where necessary.
      Problem 5: The macros wait_slave_status.inc and wait_show_pattern.inc
      were unused. Moreover, using them is difficult and error-prone.
      Fix 5: remove these macros.
      Problem 6: log_bin_trust_function_creators_basic failed when running
      tests because it assumed @@global.log_bin_trust_function_creators=1,
      and some tests modified this variable without resetting it to its
      original value.
      Fix 6: All tests that use this variable have been updated so that
      they reset the value at end of test.
      
      
      mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
        Replaced wait_for_slave_to_stop by include/wait_for_slave_sql_to_stop.inc
      mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
        Replaced wait_for_slave_to_stop by include/wait_for_slave_sql_to_stop.inc
        Added connection slave since includ/wait_for_slave_sql_to_stop.inc
        does not do that anymore.
      mysql-test/extra/rpl_tests/rpl_log.test:
        Replaced start slave+wait_slave_status by start_slave.inc
      mysql-test/include/reset_master_and_slave.inc:
        replaced start/stop slave by start_slave.inc/stop_slave.inc
      mysql-test/include/sync_slave_io_with_master.inc:
        Improved comments and error message.
      mysql-test/include/wait_for_slave_io_to_stop.inc:
        Refactored to use wait_for_slave_param.inc.
        Removed connection slave.
      mysql-test/include/wait_for_slave_param.inc:
        - Improved usage instructions
        - Added more debug info in case of timeout
        - Added parameters $slave_param_comparison, $slave_timeout,
        $slave_keep_connection, $slave_error_message
      mysql-test/include/wait_for_slave_sql_error.inc:
        Refactored to use wait_for_slave_param.inc.
        Removed connection slave.
      mysql-test/include/wait_for_slave_sql_to_start.inc:
        Refactored to use wait_for_slave_param.inc.
        Removed connection slave.
      mysql-test/include/wait_for_slave_sql_to_stop.inc:
        Refactored to use wait_for_slave_param.inc.
        Removed connection slave.
      mysql-test/include/wait_for_slave_to_start.inc:
        Refactored to use wait_for_slave_param.inc.
        Removed connection slave.
      mysql-test/include/wait_for_slave_to_stop.inc:
        Refactored to use wait_for_slave_param.inc.
        Removed connection slave.
      mysql-test/include/wait_show_pattern.inc:
        Removed unused (and error-prone) file
      mysql-test/include/wait_slave_status.inc:
        Removed unused (and error-prone) file
      mysql-test/suite/binlog/t/binlog_auto_increment_bug33029.test:
        Renamed $keep_connection to $slave_keep_connection.
      mysql-test/suite/rpl/t/rpl_bug26395.test:
        Replace stop slave by stop_slave.inc
      mysql-test/suite/rpl/t/rpl_circular_for_4_hosts.test:
        Replace start/stop slave by start_slave.inc/stop_slave.inc.
        Replace wait_for_slave_param by wait_for_slave_sql_to_stop.inc.
      mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
        Renamed $keep_connection to $slave_keep_connection.
      mysql-test/suite/rpl/t/rpl_flushlog_loop.test:
        Replace wait_slave_status by start_slave.inc
      mysql-test/suite/rpl/t/rpl_idempotency.test:
        Added connection slave since wait_for_slave_sql_to_stop.inc does not
        do that any more.
      mysql-test/suite/rpl/t/rpl_incident.test:
        Replaced wait_for_slave_to_stop by wait_for_slave_sql_to_stop.inc
      mysql-test/suite/rpl/t/rpl_init_slave.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
        Replaced save_master_pos;connection slave;sync_with_master by
        sync_slave_with_master.
      mysql-test/suite/rpl/t/rpl_log_pos.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
        Replaced wait_for_slave_param by other wait_for_slave_* macros.
      mysql-test/suite/rpl/t/rpl_packet.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
      mysql-test/suite/rpl/t/rpl_row_inexist_tbl.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
      mysql-test/suite/rpl/t/rpl_row_stop_middle_update.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
      mysql-test/suite/rpl/t/rpl_row_until.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
        Replaced save_master_pos;connection slave;sync_with_master by
        sync_slave_with_master.
      mysql-test/suite/rpl/t/rpl_server_id1.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
      mysql-test/suite/rpl/t/rpl_slave_grp_exec.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
      mysql-test/suite/rpl/t/rpl_slave_status.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
      mysql-test/suite/rpl/t/rpl_sp.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      mysql-test/suite/rpl/t/rpl_sp_effects.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      mysql-test/suite/rpl/t/rpl_stm_until.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
        Replaced save_master_pos;connection slave;sync_with_master by
        sync_slave_with_master.
      mysql-test/suite/rpl_ndb/t/rpl_ndb_basic.test:
        Replaced start slave by start_slave.inc.
        Added explicit connection slave since wait_for_slave_sql_to_stop.inc
        does not do that anymore.
      mysql-test/t/disabled.def:
        Disabled failing test.
      mysql-test/t/func_time.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      mysql-test/t/grant.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      mysql-test/t/grant2.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      mysql-test/t/innodb_notembedded.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      mysql-test/t/log_bin_trust_function_creators_func.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
        Clean up at end of test by dropping the created user.
      mysql-test/t/query_cache.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      mysql-test/t/query_cache_notembedded.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      mysql-test/t/rpl_init_slave_func.test:
        Replaced start/stop slave by start_slave.inc/stop_slave.inc.
      mysql-test/t/timezone2.test:
        Restore @@global.log_bin_trust_function_creators at end of test.
      9d4ee0bf
  5. 04 Jul, 2008 1 commit
    • Sven Sandberg's avatar
      BUG#37858: loaddata,rpl_slave_skip,rpl_innodb_mixed_dml fail if datafile not world-readable · 761b1b29
      Sven Sandberg authored
      Problem 1: main.loaddata tried to trigger an error caused by
      reading files outside the vardir, by reading itself. However,
      if loaddata.test is not world-readable (e.g., umask=0077),
      then another error is triggered.
      Fix 1: allow the other error too.
      Problem 2: rpl_slave_skip and rpl_innodb_mixed_dml tried to
      copy a file from mysql-test/suite/rpl/data to mysql-test/var
      and then read it. That failed too if umask=0077, since the
      file would not become world-readable.
      Fix 2: move the files from mysql-test/suite/rpl/data to
      mysql-test/std_data and update tests accordingly. Remove
      the directory mysql-test/suite/rpl/data.
      
      
      mysql-test/r/loaddata.result:
        Updated result file.
      mysql-test/std_data/rpl_bug28618.dat:
        Moved this file to std_data.
      mysql-test/std_data/rpl_mixed.dat:
        Moved this file to std_data.
      mysql-test/suite/rpl/data:
        Removed directory that is now unused.
      mysql-test/suite/rpl/include/rpl_mixed_dml.inc:
        The rpl_mixed.dat file has been moved. Updated the test to
        use the new location.
      mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
        Updated result file.
      mysql-test/suite/rpl/r/rpl_slave_skip.result:
        Updated result file.
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        The rpl_bug28618.dat file has been moved. Updated the test
        to use the new location.
      mysql-test/t/loaddata.test:
        Allow more error messages. ER_TEXTFILE_NOT_READABLE may
        happen if the file is not world-readable (which may happen,
        e.g., if the user has umask=0077).
      761b1b29
  6. 28 Mar, 2008 1 commit
    • unknown's avatar
      BUG#29020 (Event results not correctly replicated to slave in RBR): · 66a443a0
      unknown authored
      The bug allow multiple executing transactions working with non-transactional
      to interfere with each others by interleaving the events of different trans-
      actions.
      
      Bug is fixed by writing non-transactional events to the transaction cache and
      flushing the cache to the binary log at statement commit. To mimic the behavior
      of normal statement-based replication, we flush the transaction cache in row-
      based mode when there is no committed statements in the transaction cache,
      which means we are committing the first one. This means that it will be written
      to the binary log as a "mini-transaction" with just the rows for the statement.
      
      Note that the changes here does not take effect when building the server with
      HAVE_TRANSACTIONS set to false, but it is not clear if this was possible before
      this patch either.
      
      For row-based logging, we also have that when AUTOCOMMIT=1, the code now always
      generates a BEGIN/COMMIT pair for single statements, or BEGIN/ROLLBACK pair in the
      case of non-transactional changes in a statement that was rolled back. Note that
      for the case where changes to a non-transactional table causes a rollback due
      to error, the statement will now be logged with a BEGIN/ROLLBACK pair, even
      though some changes has been committed to the non-transactional table.
      
      
      mysql-test/extra/rpl_tests/rpl_row_delayed_ins.test:
        Removing SHOW BINLOG EVENTS causing test to be non-deterministic.
      mysql-test/r/ctype_cp932_binlog_row.result:
        Result change.
      mysql-test/suite/binlog/r/binlog_base64_flag.result:
        Result change.
      mysql-test/suite/binlog/r/binlog_multi_engine.result:
        Result file change.
      mysql-test/suite/binlog/r/binlog_row_binlog.result:
        Result file change.
      mysql-test/suite/binlog/r/binlog_row_ctype_ucs.result:
        Result file change.
      mysql-test/suite/binlog/r/binlog_row_insert_select.result:
        Result file change.
      mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
        Result file change.
      mysql-test/suite/binlog/r/binlog_stm_binlog.result:
        Result file change.
      mysql-test/suite/binlog/t/binlog_base64_flag.test:
        Removing table that will be used in test to prevent failing if preceeding
        tests forgot to drop the table.
      mysql-test/suite/rpl/r/rpl_rbr_to_sbr.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_basic_11bugs.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_create_table.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_delayed_ins.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_flsh_tbls.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_inexist_tbl.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_log.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_log_innodb.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_row_until.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_slave_skip.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_switch_stm_row_mixed.result:
        Result file change.
      mysql-test/suite/rpl/r/rpl_truncate_2myisam.result:
        Result file change.
      mysql-test/suite/rpl/t/rpl_row_create_table.test:
        Binlog position change.
      mysql-test/suite/rpl/t/rpl_row_flsh_tbls.test:
        Binlog position change.
      mysql-test/suite/rpl/t/rpl_row_mysqlbinlog.test:
        Binlog position change. Added stop position to mysqlbinlog argments to prevent
        extreneous output.
      mysql-test/suite/rpl/t/rpl_row_until.test:
        Binlog position change.
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        Binlog position change.
      mysql-test/suite/rpl/t/rpl_switch_stm_row_mixed.test:
        Removing extreneous SHOW BINLOG EVENTS causing test to be non-deterministic.
      mysql-test/suite/rpl_ndb/r/rpl_ndb_log.result:
        Result change.
      sql/log.cc:
        Adding variable at_least_one_stmt to denote that there is at least one
        statement committed to the transaction cache (but there might be more).
        
        Removing duplicate checks from binlog_end_trans(). The transaction cache
        should always be committed or rolled back when this function is called.
        
        Correcting conditions for binlog_rollback() and binlog_commit() and removing
        the previous "invisible commit" in favor of always using explicit commits
        in the binary log.
      sql/log_event.cc:
        Marking table map event to be cached. Removing Muted_query_log_event from code.
      sql/log_event.h:
        Removing unused class Muted_query_log_event.
      sql/sql_insert.cc:
        Adding missing call to ha_autocommit_or_rollback() for delayed thread. Marking
        CREATE-SELECT statements as transactional, since they don't need to be logged.
      66a443a0
  7. 19 Oct, 2007 1 commit
    • unknown's avatar
      BUG#28618 (Skipping into the middle of a group with SQL_SLAVE_SKIP_COUNTER · d29fe86f
      unknown authored
      is possible):
      
      When skipping the beginning of a transaction starting with BEGIN, the OPTION_BEGIN
      flag was not set correctly, which caused the slave to not recognize that it was
      inside a group. This patch sets the OPTION_BEGIN flag for BEGIN, COMMIT, ROLLBACK,
      and XID events. It also adds checks if inside a group before decreasing the
      slave skip counter to zero.
      
      Begin_query_log_event was not marked that it could not end a group, which is now
      corrected.
      
      
      mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test:
        Correcting slave skip counter to get the correct behaviour.
      mysql-test/suite/rpl/r/rpl_slave_skip.result:
        Result change.
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        Adding tests to check that skipping works for transactions:
        - Skipping one group with BEGIN first
        - Skipping two groups with BEGIN first
        - Skipping one group without BEGIN first but with AUTOCOMMIT=0
        - LOAD DATA INFILE under statement-based replication
      mysql-test/suite/rpl_ndb/r/rpl_ndb_extraCol.result:
        Result change.
      sql/log_event.cc:
        Adding checks if we're in a group when the slave skip counter is 1.
        In that case, we should keep going.
        
        Adding helping member function Log_event::continue_group() denoting
        that this event cannot end a group, and if the skip counter indicates
        that the group ends after this event, it should not decrease the skip
        counter.
        
        Query_log_event will change the OPTION_BEGIN flag for BEGIN, COMMIT, and
        ROLLBACK, even when skipping because of a positive skip count, and
        Xid_log_event will also affect the OPTION_BEGIN flag, even when being
        skipped.
        
        Begin_load_query_log_event cannot end a group, so it is marked to
        continue the group.
      sql/log_event.h:
        Adding helper function Log_event::continue_group().
      sql/rpl_rli.h:
        Adding Relay_log_info::get_flag() to get the value of a
        replication flag.
      sql/slave.cc:
        Adding debug output and changing debug message.
      mysql-test/suite/rpl/data/rpl_bug28618.dat:
        New BitKeeper file ``mysql-test/suite/rpl/data/rpl_bug28618.dat''
      mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt:
        New BitKeeper file ``mysql-test/suite/rpl/t/rpl_slave_skip-slave.opt''
      d29fe86f
  8. 27 Jun, 2007 1 commit
    • unknown's avatar
      Move disabling of rpl_invoked_features to suite/rpl/t/disabled.def · fb8a2798
      unknown authored
      Move tests to their respective suite
      
      
      mysql-test/suite/binlog/t/binlog_innodb.test:
        Rename: mysql-test/t/binlog_innodb.test -> mysql-test/suite/binlog/t/binlog_innodb.test
      mysql-test/suite/binlog/r/binlog_innodb.result:
        Rename: mysql-test/r/binlog_innodb.result -> mysql-test/suite/binlog/r/binlog_innodb.result
      mysql-test/suite/binlog/t/binlog_multi_engine.test:
        Rename: mysql-test/t/binlog_multi_engine.test -> mysql-test/suite/binlog/t/binlog_multi_engine.test
      mysql-test/suite/binlog/r/binlog_multi_engine.result:
        Rename: mysql-test/r/binlog_multi_engine.result -> mysql-test/suite/binlog/r/binlog_multi_engine.result
      mysql-test/suite/rpl/t/rpl_grant.test:
        Rename: mysql-test/t/rpl_grant.test -> mysql-test/suite/rpl/t/rpl_grant.test
      mysql-test/suite/rpl/t/rpl_invoked_features-master.opt:
        Rename: mysql-test/t/rpl_invoked_features-master.opt -> mysql-test/suite/rpl/t/rpl_invoked_features-master.opt
      mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt:
        Rename: mysql-test/t/rpl_invoked_features-slave.opt -> mysql-test/suite/rpl/t/rpl_invoked_features-slave.opt
      mysql-test/suite/rpl/t/rpl_invoked_features.test:
        Rename: mysql-test/t/rpl_invoked_features.test -> mysql-test/suite/rpl/t/rpl_invoked_features.test
      mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt:
        Rename: mysql-test/t/rpl_loaddata_fatal-slave.opt -> mysql-test/suite/rpl/t/rpl_loaddata_fatal-slave.opt
      mysql-test/suite/rpl/t/rpl_loaddata_fatal.test:
        Rename: mysql-test/t/rpl_loaddata_fatal.test -> mysql-test/suite/rpl/t/rpl_loaddata_fatal.test
      mysql-test/suite/rpl/t/rpl_slave_skip.test:
        Rename: mysql-test/t/rpl_slave_skip.test -> mysql-test/suite/rpl/t/rpl_slave_skip.test
      mysql-test/suite/rpl/r/rpl_grant.result:
        Rename: mysql-test/r/rpl_grant.result -> mysql-test/suite/rpl/r/rpl_grant.result
      mysql-test/suite/rpl/r/rpl_invoked_features.result:
        Rename: mysql-test/r/rpl_invoked_features.result -> mysql-test/suite/rpl/r/rpl_invoked_features.result
      mysql-test/suite/rpl/r/rpl_loaddata_fatal.result:
        Rename: mysql-test/r/rpl_loaddata_fatal.result -> mysql-test/suite/rpl/r/rpl_loaddata_fatal.result
      mysql-test/suite/rpl/r/rpl_slave_skip.result:
        Rename: mysql-test/r/rpl_slave_skip.result -> mysql-test/suite/rpl/r/rpl_slave_skip.result
      mysql-test/suite/rpl/t/disabled.def:
        Move disabling of rpl_invoked_features to suite/rpl/t/disabled.def
      mysql-test/t/disabled.def:
        Move disabling of rpl_invoked_features to suite/rpl/t/disabled.def
      fb8a2798
  9. 13 Jun, 2007 1 commit
    • unknown's avatar
      Fixing some trivial test problems. · ad33be54
      unknown authored
      mysql-test/r/rpl_loaddata_fatal.result:
        Result change
      mysql-test/r/rpl_slave_skip.result:
        Result change
      mysql-test/t/rpl_loaddata_fatal.test:
        Test only valid for debug build
        Adding shutdown sequence.
      mysql-test/t/rpl_slave_skip.test:
        Masking out new columns.
      sql/log_event.cc:
        Freeing memory to keep valgrind silent.
      ad33be54
  10. 01 Jun, 2007 1 commit
    • unknown's avatar
      WL#3339 (Issue warnings when statement-based replication may fail): · d7bfc5ce
      unknown authored
      Adding missing test files. Result change in test rpl_udf.
      
      
      mysql-test/r/rpl_udf.result:
        Result change
      mysql-test/r/rpl_slave_skip.result:
        New BitKeeper file ``mysql-test/r/rpl_slave_skip.result''
      mysql-test/t/rpl_slave_skip.test:
        New BitKeeper file ``mysql-test/t/rpl_slave_skip.test''
      d7bfc5ce