Commit graph

517 commits

Author SHA1 Message Date
Leonard Zhou
28f0e8cf77 Merge 2009-03-24 14:24:27 +08:00
Georgi Kodinov
596a9dbdfb Disabled the failing test case until bug #43440 is resolved 2009-03-23 11:38:54 +02:00
Alfranio Correia
c461c1b0ca Post-fix BUG#42861. 2009-03-23 01:07:25 +00:00
Alfranio Correia
ef0d5cc5f2 auto-merge 5.1-bugteam (local) --> 5.1-bugteam 2009-03-22 19:46:57 +00:00
Alfranio Correia
b97083dfc7 Bug #42861 Assigning invalid directories to --slave-load-tmpdir crashes the slave
Compiling with debug and assigning an invalid directory to --slave-load-tmpdir
was crashing the slave due to the following assertion DBUG_ASSERT(! is_set() ||
can_overwrite_status). This assertion assumes that a thread can change its
state once (i.e. ok,error, etc) before aborting, cleaning/resuming or completing
its execution unless the overwrite flag (i.e. can_overwrite_status) is true.

The Append_block_log_event::do_apply_event which is responsible for creating
temporary file(s) was not cleaning the thread state. Thus a failure while
trying to create a file in an invalid temporary directory was causing the crash.

To fix the problem we check if the temporary directory is valid before starting
the SQL Thread and reset the thread state before creating a file in
Append_block_log_event::do_apply_event.
2009-03-18 10:31:17 +00:00
Leonard Zhou
53849a24f9 Merge 2009-03-16 17:06:22 +08:00
Guangbao Ni
224376a796 Auto-merge from 5.1-bugteam 2009-03-18 15:02:06 +00:00
Guangbao Ni
0ba1cc2523 Bug #42217 mysql.procs_priv does not get replicated
mysql.procs_priv table itself does not get replicated.
Inserting routine privilege record into mysql.procs_priv table
is triggered by creating function/procedure statements
according to current user's privileges.
Because the current user of SQL thread has GLOBAL_ACL,
which doesn't need any check mysql.procs_priv privilege
when create/alter/execute routines.
Corresponding GLOBAL_ACL privilege user
doesn't insert routine privilege record into
mysql.procs_priv when creating a routine.

Fixed by switching the current user of SQL thread to definer user if
the definer user exists on slave.
That populates procs_priv, otherwise to keep the SQL thread
user and procs_priv remains unchanged.


mysql-test/suite/rpl/r/rpl_do_grant.result:
  Test case result for routine privilege when definer user exist or not on slave
mysql-test/suite/rpl/t/rpl_do_grant.test:
  Test case result for routine privilege when definer user exist or not on slave
sql/sql_parse.cc:
  Switch current user of SQL thread to definer user if the definer user
  existes on slave when checking whether the routine privilege is
  needed to insert mysql.procs_priv table or not.
2009-03-18 13:48:23 +00:00
Leonard Zhou
b42c29cfe3 BUG#22504 load data infile sql statement in replication architecture get error
The problem is issued because we set wrong start position and stop position of query string into binlog.
That two values are stored as part of head info of query string.
When we parse binlog, we first get position values then get the query string according position values.
But seems that two values are not calculated correctly after the parse of Yacc.

We don't want to touch so much of yacc because it may influence other codes.
So just add one space after 'INTO' key word when parsing.
This can easily resolve the problem.

mysql-test/suite/rpl/r/rpl_loaddatalocal.result:
  Test result
mysql-test/suite/rpl/t/rpl_loaddatalocal.test:
  Test case
sql/log_event.cc:
  Add space after 'INTO'.
2009-03-16 16:21:29 +08:00
Leonard Zhou
9952412798 BUG#39858 rpl.rpl_rotate (rpl.rpl_rotate_logs) failed on pushbuild: result mismatch
The method to purge binary log files produces different results in some platforms.
The reason is that the purge time is calculated based on table modified time and
that can't guarantee to purge master-bin.000002 in all platforms.(eg. windows)

Use a new way that sets the time to purge binlog file 1 second after the last
modified time of master-bin.000002.
That can be sure that the file is always deleted in any platform.

mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  Test result
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
  Test file
2009-03-12 17:48:41 +08:00
Georgi Kodinov
a43992d78c Revert the push for bug #39858 2009-03-11 17:19:18 +02:00
Leonard Zhou
16d7c26b71 Merge 2009-03-11 14:10:50 +08:00
Leonard Zhou
3c5c878715 BUG#39858 rpl.rpl_rotate (rpl.rpl_rotate_logs) failed on pushbuild: result mismatch
The method to purge binary log files produces different results in some platforms.
The reason is that the purge time is calculated based on table modified time and
that can't guarantee to purge master-bin.000002 in all platforms.(eg. windows)

Use a new way that sets the time to purge binlog file 1 second after the last modified time of master-bin.000002.
That can be sure that the file is always deleted in any platform.

mysql-test/suite/rpl/r/rpl_rotate_logs.result:
  Test result
mysql-test/suite/rpl/t/rpl_rotate_logs.test:
  Change 'purge time' 1 sencond after the last modified time of master-bin.000002.
2009-03-11 13:35:58 +08:00
Luis Soares
5833903889 BUG#39753: Replication failure on MIXED + bit + myisam + no PK
When using mixed mode the record values stored inside the storage
engine differed from the ones computed from the row event. This
happened because the prepare_record function was calling
empty_record macro causing some don't care bits to be left set.
                          
Replacing the empty_record plus explicitly setting defaults with 
restore_record to restore the record default values fixes this.
2009-03-05 20:54:53 +01:00
Staale Smedseng
8eb09f0149 Commit for merge and push 2009-02-27 17:06:23 +02:00
Leonard Zhou
2b3dfbc176 merge 2009-02-23 16:29:39 +08:00
Leonard Zhou
61d706a4f0 Bug#40013 mixed replication: row based format could lead to stale tmp tables on the
slave.

In mixed mode, if we create a temporary table and do some update which switch to ROW format,
the format will keep in ROW format until the session ends or the table is dropped explicitly. 
When the session ends, the temp table is dropped automaticly at cleanup time.
but it checks only current binlog format and so skip insertion of DROP TABLE instructions into binlog.
So the temp table can't be dropped correctly at slave.

Our solution is that when closing temp tables at cleanup time we check both binlog format and binlog mode,
and we could write DROP TABLE instructions into binlog if current binlog format is ROW but in MIX mode.

mysql-test/suite/rpl/r/rpl_temp_table_mix_row.result:
  Test result file.
mysql-test/suite/rpl/t/rpl_temp_table_mix_row.test:
  Test file.
sql/sql_base.cc:
  Didn't do binloging when both current format and default format are ROW.
2009-02-23 11:26:38 +08:00
Alfranio Correia
d822ab8957 BUG#38174 secure-file-priv breaks LOAD DATA INFILE replication in statement mode
If secure-file-priv was set on slave, it became unable to execute
LOAD DATA INFILE statements sent from master using mixed or
statement-based replication.
                  
This patch fixes the issue by ignoring this security restriction
and checking if the files are created and read by the slave in the
--slave-load-tmpdir while executing the SQL Thread.
2009-02-21 09:36:07 +00:00
Serge Kozlov
b86dc86ee9 Bug#41423.
1. Constant values of binlog positions replaced by seeking them in binlog/relay log.
2. Updated result file
2009-02-19 23:29:12 +03:00
Davi Arnaut
d3a10ec6ef Bug#41077: Warning contains wrong future version
Substitute all references of MySQL version "5.2" to "6.0" in
deprecation warning messages.Deprecated constructs are being
removed in the 6.0 tree.
2009-02-16 08:38:15 -03:00
Andrei Elkin
924950b631 commenting windows disable for rpl_cross_version to relate to Bug #42879 2009-02-16 14:51:39 +02:00
Andrei Elkin
cd1960ff26 rpl_cross_version.test is disable for win till a proper fixing bug#42451 2009-02-16 10:49:51 +02:00
Andrei Elkin
de9da6dd32 merging from the main to a local branch 2009-02-13 18:20:36 +02:00
Luis Soares
8db289c4d5 BUG#13684: post push fix for test case.
The test case relies on binlog entries for assertion. The problem is that the
binlog does not get cleaned in pushbuild between tests, resulting in extra
entries in the result file, causing the test to fail.
      
This fix adds a reset master at the beginning of the test, so that we get a
clean binlog file.
2009-02-11 18:46:43 +01:00
Luis Soares
a567ee9b7a merge: 5.1-bt --> 5.1-bt local 2009-02-11 14:52:19 +01:00
Mats Kindahl
9b612d2c90 BUG#36763: TRUNCATE TABLE fails to replicate when stmt-based binlogging is not supported.
Post-merge fixes. Changes to some result sets.

mysql-test/r/commit_1innodb.result:
  TRUNCATE TABLE does not cause the binary log to do commits any more.
mysql-test/suite/binlog/r/binlog_row_mix_innodb_myisam.result:
  TRUNCATE TABLE is not transactional, hence does not have BEGIN/COMMIT around itself.
mysql-test/suite/binlog/r/binlog_stm_mix_innodb_myisam.result:
  TRUNCATE TABLE is not transactional, hence does not have BEGIN/COMMIT around itself.
mysql-test/suite/rpl/r/rpl_innodb_mixed_dml.result:
  TRUNCATE TABLE is not transactional, hence does not have BEGIN/COMMIT around itself.
mysql-test/suite/rpl/r/rpl_truncate_2myisam.result:
  STOP SLAVE was replaced with include file.
mysql-test/suite/rpl/r/rpl_truncate_3innodb.result:
  STOP SLAVE was replaced with include file.
2009-02-10 15:44:58 +01:00
Luis Soares
b7b6773f69 BUG#13684: SP: DROP PROCEDURE|FUNCTION IF EXISTS not binlogged if routine does not exist
There is an inconsistency with DROP DATABASE IF EXISTS, DROP
TABLE IF EXISTS and DROP VIEW IF EXISTS: those are binlogged even
if the DB or TABLE does not exist, whereas DROP PROCEDURE IF
EXISTS does not. It would be nice or at least consistent if DROP
PROCEDURE/STATEMENT worked the same too.
      
Fixed DROP PROCEDURE|FUNCTION IF EXISTS by adding a call to
write_bin_log in mysql_execute_command. Checked also if all
documented "DROP (...) IF EXISTS" get binlogged. Left out DROP
SERVER IF EXISTS because it seems that it only gets binlogged when
using row event (see BUG#25705).
2009-02-10 11:52:19 +01:00
Mats Kindahl
8a98664d3b Merging with 5.1-bugteam. 2009-02-09 23:51:59 +01:00
Andrei Elkin
5fc4c37a80 Bug #42451 setup_fake_relay_log makes an incorrect path on windows
Path composition for the relay log file that is stored into the relay index
file was not correct for windows.
mysql-test language does not provide primitives for portable path composition.
      
Fixed with storing only the basename part of the external "fake" relay log into
the relay index file.
Safety of removal of the dirname part of the relaylog is provided by logics of
`setup_fake_relay_log' that places the fake file into @@datadir directory.


mysql-test/include/setup_fake_relay_log.inc:
  storing only the basename part of the external "fake" relay log into the relay
  log index.
mysql-test/suite/rpl/t/rpl_cross_version.test:
  restoring test for windows.
2009-02-09 15:17:04 +02:00
Mats Kindahl
bd53d21417 Bug #36763
TRUNCATE TABLE fails to replicate when stmt-based binlogging is not supported.

There were two separate problems with the code, both of which are fixed with
this patch:

1. An error was printed by InnoDB for TRUNCATE TABLE in statement mode when
   the in isolation levels READ COMMITTED and READ UNCOMMITTED since InnoDB
   does permit statement-based replication for DML statements. However,
   the TRUNCATE TABLE is not transactional, but is a DDL, and should therefore
   be allowed to be replicated as a statement.

2. The statement was not logged in mixed mode because of the error above, but
   the error was not reported to the client.

This patch fixes the problem by treating TRUNCATE TABLE a DDL, that is, it is
always logged as a statement and not reporting an error from InnoDB for TRUNCATE
TABLE.


mysql-test/extra/binlog_tests/binlog_truncate.test:
  Adding new test to check that TRUNCATE TABLE is written correctly
  to the binary log.
mysql-test/extra/rpl_tests/rpl_truncate.test:
  Removing redundant testing by eliminating settings of BINLOG_FORMAT.
mysql-test/extra/rpl_tests/rpl_truncate_helper.test:
  Replacing slave and master reset code with include file.
  Removing settings of BINLOG_FORMAT.
  Replacing printing of table contents to compare master and slave
  with diff_tables.inc.
mysql-test/suite/binlog/t/binlog_truncate_innodb.test:
  Adding test for testing that TRUNCATE TABLE is logged correctly for InnoDB
  in all isolation levels.
mysql-test/suite/binlog/t/binlog_truncate_myisam.test:
  Adding test for testing that TRUNCATE TABLE is logged correctly for MyISAM.
mysql-test/suite/binlog/t/disabled.def:
  Disabling binlog_truncate_innodb since it does not work (yet).
sql/sql_base.cc:
  Correcting setting of capabilities flags to make the comparison with 0
  later in the code work correctly.
sql/sql_delete.cc:
  Re-organizing code to ensure that TRUNCATE TABLE is logged in statement
  format and that row format is not used unless there are rows to log (which
  there are not when delete_all_rows() is called, so this has to be logged
  as a statement).
2009-02-06 17:06:41 +01:00
Gleb Shchepa
b9d02d4669 Bug #39265: fix for the bug 33699 should be reverted
Documented behaviour was broken by the patch for bug 33699
that actually is not a bug.

This fix reverts patch for bug 33699 and reverts the
UPDATE of NOT NULL field with NULL query to old
behavior.


mysql-test/extra/rpl_tests/rpl_extraMaster_Col.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/include/ps_modify.inc:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/auto_increment.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/csv_not_null.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/null.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/ps_2myisam.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/ps_3innodb.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/ps_4heap.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/ps_5merge.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/r/warnings.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/suite/ndb/r/ps_7ndb.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/suite/rpl/r/rpl_extraColmaster_innodb.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/suite/rpl/r/rpl_extraColmaster_myisam.result:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/suite/rpl/t/rpl_err_ignoredtable.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/t/auto_increment.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/t/csv_not_null.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/t/null.test:
  Bug #39265: fix for the bug 33699 should be reverted
mysql-test/t/warnings.test:
  Bug #39265: fix for the bug 33699 should be reverted
sql/sql_update.cc:
  Bug #39265: fix for the bug 33699 should be reverted
2009-02-05 13:49:32 +04:00
Serge Kozlov
84a237b914 Bug#38603:
The patch adds restart of mysql server and replacing of binlog file 
when mysql server is stopped.
2009-02-03 00:26:49 +03:00
Serge Kozlov
56fa095907 Post-merge patch for extra/rpl_test/rpl_log.test:
Remove size of binlog file from SHOW BINARY LOGS. 
Changing size of binlog file is an affect of adding or removing events to/from
binlog and it can be checked in next command of test: SHOW BINLOG EVENTS.
For SHOW BINARY LOGS statement enough to show the list of file names.
2009-02-02 14:44:18 +03:00
Georgi Kodinov
299339d41a Fixed internal test check warnings in 5.1-bugteam. 2009-02-01 11:18:09 +02:00
Georgi Kodinov
87eb2cb938 merged 5.1-main -> 5.1-bugteam 2009-01-30 15:44:49 +02:00
Andrei Elkin
093a6dd90e bug #42451 setup_fake_relay_log makes an incorrect path on windows
Temporarily blocking to run the test on windows.

Todo: remove the include upon setup_fake_relay_log has been fixed.


mysql-test/suite/rpl/t/rpl_cross_version.test:
  blocking to run the test on windows for a while.
2009-01-29 15:54:58 +02:00
Andrei Elkin
da8df39c14 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
Fixing pb failures caused by mtr invokes the test with --tmpdir to which
there are  sensitive operations in the test
and setup_fake_relay_log.inc also needed --secure-file-priv for its own separate
directory.

Fixed with removing SELECT INTO OUTFILE and deploying --exec echo instead in the marco.
The test's opt file should contain --secure-file-priv=$MYSQL_TEST_DIR as the test
operations deal with files located in $MYSQL_TEST_DIR.

mysql-test/include/setup_fake_relay_log.inc:
  Refining setup_fake_relay_log.inc to not use --secure-file-priv sensitive feature.
  The latter should remain available for the test.
2009-01-27 13:33:30 +02:00
Luis Soares
e1487388e4 BUG#42370: rpl_trigger.test: Test case timeout after 900 seconds
The test fails with timeout when applying diff on two tables.

In this test case, there can be a situation when the slave is not yet synced
with the master, thence the changes may not be on the slave at diff time.

This patch addresses this issue by synchronizing master and slave before the
diff takes place.
2009-01-27 12:32:16 +01:00
Andrei Elkin
b33437f18a Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
Overriding a default value of --secure-file-priv on pb.mtr to be $MYSQLTEST_VARDIR which 
makes pb's mtr happy to execute the regression test for the bug.


mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
  satisfying pb's mtr that uses --vardir to shm.
2009-01-26 17:24:43 +02:00
Andrei Elkin
5f7750ce6a Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
Overriding a default value of --secure-file-priv on pb.mtr with a value allowable 
the test to pass on pb.

mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
  Overriding a default value of --secure-file-priv with a value allowable the test to pass on pb.
2009-01-26 16:49:42 +02:00
Andrei Elkin
db337eb8d8 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
an additional changeset to remove printing a path name.

mysql-test/suite/rpl/r/rpl_cross_version.result:
  removing a local exec env dependency
mysql-test/suite/rpl/t/rpl_cross_version.test:
  refining a test to not have local exec env dependency.
2009-01-23 19:15:27 +02:00
Andrei Elkin
00ca9099e6 merge from 5.1-bt to a local tree. 2009-01-23 19:10:13 +02:00
Luis Soares
df8543868d merge: 5.1 -> 5.1-rpl
conflicts:
  Text conflict in client/mysqltest.cc
  Text conflict in mysql-test/include/wait_until_connected_again.inc
  Text conflict in mysql-test/lib/mtr_report.pm
  Text conflict in mysql-test/mysql-test-run.pl
  Text conflict in mysql-test/r/events_bugs.result
  Text conflict in mysql-test/r/log_state.result
  Text conflict in mysql-test/r/myisam_data_pointer_size_func.result
  Text conflict in mysql-test/r/mysqlcheck.result
  Text conflict in mysql-test/r/query_cache.result
  Text conflict in mysql-test/r/status.result
  Text conflict in mysql-test/suite/binlog/r/binlog_index.result
  Text conflict in mysql-test/suite/binlog/r/binlog_innodb.result
  Text conflict in mysql-test/suite/rpl/r/rpl_packet.result
  Text conflict in mysql-test/suite/rpl/t/rpl_packet.test
  Text conflict in mysql-test/t/disabled.def
  Text conflict in mysql-test/t/events_bugs.test
  Text conflict in mysql-test/t/log_state.test
  Text conflict in mysql-test/t/myisam_data_pointer_size_func.test
  Text conflict in mysql-test/t/mysqlcheck.test
  Text conflict in mysql-test/t/query_cache.test
  Text conflict in mysql-test/t/rpl_init_slave_func.test
  Text conflict in mysql-test/t/status.test
2009-01-23 13:22:05 +01:00
Andrei Elkin
8c3389f386 Bug #31240 load data infile replication between (4.0 or 4.1) and 5.1 fails
It's a regression issue.
The reason of the bug appeared to be an error introduced into 5.1 source code.
A piece of code in Create_file_log_event::do_apply_event() did not have test
coverage which made make test and pb unaware.
      
Fixed with inverting the old value of the return value from 
Create_file_log_event::do_apply_event().
The rpl test suite is extended with `rpl_cross_version' the file to hold 
regression cases similar to the current.


mysql-test/suite/rpl/r/rpl_cross_version.result:
  new results file
mysql-test/suite/rpl/t/rpl_cross_version-master.opt:
  options to the server to be able to start replication to itself
mysql-test/suite/rpl/t/rpl_cross_version.test:
  regression test for bug#31240.
sql/log_event.cc:
  Correcting the return value from  Create_file_log_event::do_apply_event()
2009-01-22 16:55:14 +02:00
Serge Kozlov
4562b69fed Bug#30128: The reason that sometimes events were executed because without STARTS
clause server fires immediately after creating event and time between create and delete
event sometimes is enough for firing. So adding STARTS clause moves first execution in
future after drop of event
1. Added STARTS clause for CREATE EVENT.
2. Updated result file.
2009-01-21 18:48:12 +03:00
He Zhenxing
f2c122bf90 BUG#41986 Replication slave does not pick up proper AUTO_INCREMENT value for Innodb tables
The next number (AUTO_INCREMENT) field of the table for write
rows events are not initialized, and cause some engines (innodb)
not correctly update the tables's auto_increment value.

This patch fixed this problem by honor next number fields if present.

mysql-test/extra/rpl_tests/rpl_auto_increment.test:
  Add test code for BUG#41986
mysql-test/suite/rpl/r/rpl_auto_increment.result:
  update test result file for BUG#41986
sql/log_event.cc:
  set next_number_field before writing rows, and reset next_number_field after finished writing rows
2009-01-14 16:27:32 +08:00
Sven Sandberg
d20aba9409 BUG#37718: rpl.rpl_stm_mystery22 fails sporadically on pushbuild
Problem 1: The test waits for an error in the slave sql thread,
then resolves the error and issues 'start slave'. However, there
is a gap between when the error is reported and the slave sql
thread stops. If this gap was long, the slave would still be
running when 'start slave' happened, so 'start slave' would fail
and cause a test failure.
Fix 1: Made wait_for_slave_sql_error wait for the slave to stop
instead of wait for error in the IO thread. After stopping, the
error code is verified. If the error code is wrong, debug info
is printed. To print debug info, the debug printing code in
wait_for_slave_param.inc was moved out to a new file,
show_rpl_debug_info.inc.
Problem 2: rpl_stm_mystery22 is a horrible name, the comments in
the file didn't explain anything useful, the test was generally
hard to follow, and the test was essentially duplicated between
rpl_stm_mystery22 and rpl_row_mystery22.
Fix 2: The test is about conflicts in the slave SQL thread,
hence I renamed the tests to rpl_{stm,row}_conflicts. Refactored
the test so that the work is done in
extra/rpl_tests/rpl_conflicts.inc, and
rpl.rpl_{row,stm}_conflicts merely sets some variables and then
sourced extra/rpl_tests/rpl_conflicts.inc.
The tests have been rewritten and comments added.
Problem 3: When calling wait_for_slave_sql_error.inc, you always
want to verify that the sql thread stops because of the expected
error and not because of some other error. Currently,
wait_for_slave_sql_error.inc allows the caller to omit the error
code, in which case all error codes are accepted.
Fix 3: Made wait_for_slave_sql_error.inc fail if no error code
is given. Updated rpl_filter_tables_not_exist accordingly.
Problem 4: rpl_filter_tables_not_exist had a typo, the dollar
sign was missing in a 'let' statement.
Fix 4: Added dollar sign.
Problem 5: When replicating from other servers than the one named
'master', the wait_for_slave_* macros were unable to print debug
info on the master.
Fix 5: Replace parameter $slave_keep_connection by
$master_connection.


mysql-test/extra/rpl_tests/rpl_conflicts.test:
  rpl_stm_mystery22 and rpl_row_mystery22 have now been refactored and renamed:
  The two test cases rpl.rpl_stm_conflicts.test and rpl.rpl_row_conflicts.test
  just set some parameters, and then source include/rpl_tests/rpl_conflicts.test.
  Also, cleaned up the test case a bit, and fixed BUG#37718.
mysql-test/include/show_rpl_debug_info.inc:
  Factored out the debug printing code from wait_for_slave_param.inc to
  a new file, show_rpl_debug_info.inc.
  Also removed the $slave_keep_connection parameter, and replaced it by
  $master_connection. This allows printing debug info on the master, no
  matter what the name of the master connection is.
mysql-test/include/start_slave.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/stop_slave.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/sync_slave_io_with_master.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_io_to_start.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_io_to_stop.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_param.inc:
  Factored out the debug printing code from wait_for_slave_param.inc to
  a new file, show_rpl_debug_info.inc.
  Also removed the $slave_keep_connection parameter, and replaced it by
  $master_connection. This allows printing debug info on the master, no
  matter what the name of the master connection is.
  Had to move the printing of debug info out of the while loop because
  of BUG number 41913.
mysql-test/include/wait_for_slave_sql_error.inc:
  Made it wait until the slave sql thread has stopped. This
  takes very short time and avoids race condition bugs in
  test cases (e.g., fixes BUG#37718).
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_sql_error_and_skip.inc:
  Since wait_for_slave_sql_error now waits for the slave sql
  thread to stop too, wait_for_slave_sql_error_and_skip does not
  have to wait for the slave sql thread to stop.
  Also, since wait_for_slave_sql_error now requires the parameter
  $slave_sql_errno to be set, wait_for_slave_sql_error_and_skip
  requires that as well: updated the usage instructions.
mysql-test/include/wait_for_slave_sql_to_start.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_sql_to_stop.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_to_start.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/include/wait_for_slave_to_stop.inc:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/suite/rpl/r/rpl_row_conflicts.result:
  update result file
mysql-test/suite/rpl/r/rpl_stm_conflicts.result:
  update result file
mysql-test/suite/rpl/t/rpl_dual_pos_advance.test:
  Replaced $slave_keep_connection by $master_connection.
mysql-test/suite/rpl/t/rpl_filter_tables_not_exist.test:
  Set $slave_sql_errno, since it is now required.
  Add dollar sign to $show_sql_error (without dollar sign,
  mtr makes it an environment variable).
mysql-test/suite/rpl/t/rpl_row_conflicts.test:
  rpl_stm_mystery22 and rpl_row_mystery22 have now been refactored and renamed:
  The two test cases rpl.rpl_stm_conflicts.test and rpl.rpl_row_conflicts.test
  just set some parameters, and then source include/rpl_tests/rpl_conflicts.test.
  Also, cleaned up the test case a bit, and fixed BUG#37718.
mysql-test/suite/rpl/t/rpl_row_mystery22.test:
  rpl_stm_mystery22 and rpl_row_mystery22 have now been refactored and renamed:
  The two test cases rpl.rpl_stm_conflicts.test and rpl.rpl_row_conflicts.test
  just set some parameters, and then source include/rpl_tests/rpl_conflicts.test.
  Also, cleaned up the test case a bit, and fixed BUG#37718.
mysql-test/suite/rpl/t/rpl_stm_conflicts.test:
  rpl_stm_mystery22 and rpl_row_mystery22 have now been refactored and renamed:
  The two test cases rpl.rpl_stm_conflicts.test and rpl.rpl_row_conflicts.test
  just set some parameters, and then source include/rpl_tests/rpl_conflicts.test.
  Also, cleaned up the test case a bit, and fixed BUG#37718.
2009-01-09 15:12:31 +01:00
Sven Sandberg
28e672dbe7 BUG#41793: rpl_binlog_corruption disabled in main (needs new mtr)
Disabled rpl_binlog_corruption since it requires the new mtr,
which only exists in 5.1-rpl / 6.0-rpl.
Please re-enable the test in 5.1-rpl / 6.0-rpl.


mysql-test/suite/rpl/t/disabled.def:
  Disabled rpl_binlog_corruption since it requires the new mtr,
  which only exists in 5.1-rpl / 6.0-rpl.
2008-12-30 09:48:19 +01:00
Sven Sandberg
ba835f89ba BUG#40482: server/mysqlbinlog crashes when reading invalid Incident_log_event
Problem: When an Incident_log_event contains a bad incident number on disk,
the server crashes with an assertion.
Fix: Don't validate input with assertions. Use errors.

mysql-test/include/cleanup_fake_relay_log.inc:
  Added auxiliary file to restore things that setup_fake_relay_log.inc did.
mysql-test/include/setup_fake_relay_log.inc:
  Added auxiliary file to setup replication from an existing relay log.
mysql-test/std_data/bug40482-bin.000001:
  Binlog file for rpl.rpl_binlog_corruption
mysql-test/suite/rpl/t/rpl_binlog_corruption.test:
  New test file.
sql/log_event.cc:
  Check that the incident number is correct at the time the event is constructed.
  Do not assert it at the time it is printed.
sql/log_event.h:
  Incident_log_event::is_valid() should verify that the incident number is valid.
sql/rpl_constants.h:
  Incident numbers should be hard-coded, since they may appear in files.
2008-12-29 17:04:10 +01:00
Andrei Elkin
f8fe9e0953 Bug#38540 rpl_server_id2 uses show slave status unnecessarily
a minor improvement to the test to ease merging.

mysql-test/suite/rpl/r/rpl_server_id2.result:
  results changed.
mysql-test/suite/rpl/t/rpl_server_id2.test:
  masking out the until_pos which value is out of interest but
  it presence hurts merging between trees.
2008-12-19 22:13:12 +02:00