Commit 1fe215a7 authored by Alfranio Correia's avatar Alfranio Correia
Browse files

auto merge

parents 3175a06a 047eced3
Loading
Loading
Loading
Loading
+12 −7
Original line number Diff line number Diff line
@@ -4,8 +4,7 @@
# Test of FLUSH NO_WRITE_TO_BINLOG by the way.
#


-- source include/master-slave.inc
source include/master-slave.inc;

let $SERVER_VERSION=`select version()`;

@@ -34,26 +33,32 @@ flush tables;
--replace_column 2 # 5 #
--replace_regex /table_id: [0-9]+/table_id: #/
eval SHOW BINLOG EVENTS FROM $rename_event_pos ;
save_master_pos;
connection slave;
sync_with_master;

sync_slave_with_master;
# Check that the slave is not confused.
select * from t3;
# Note that all this confusion may cause warnings 'table xx is open on rename'
# in the .err files; these are not fatal and are not reported by mysql-test-run.

stop slave;
source include/wait_for_slave_to_stop.inc;

connection master;
drop table t1;

connection slave;
flush tables with read lock;
start slave;
sleep 1;
source include/wait_for_slave_to_start.inc;
--error 1192
stop slave;

# Cleanup
unlock tables;

connection master;
drop table t3, t4, t5;

sync_slave_with_master;

# End of 4.1 tests
+17 −3
Original line number Diff line number Diff line
@@ -7,15 +7,29 @@
#
# source include/wait_for_slave_sql_error.inc;
#
# Parameters to this macro are $slave_timeout and
# $slave_keep_connection. See wait_for_slave_param.inc for
# descriptions.
# Parameters:
#
# $slave_sql_errno
#   Number of expected SQL error. If it skipped then any error
#   will pass.
# 
# $slave_timeout and
#   See wait_for_slave_param.inc for descriptions.
# 
# $slave_keep_connection. 
#   See wait_for_slave_param.inc for descriptions.

let $old_slave_param_comparison= $slave_param_comparison;

let $slave_param= Last_SQL_Errno;
let $slave_param_comparison= !=;
let $slave_param_value= 0;

if ($slave_sql_errno) {
  let $slave_param_comparison= =;
  let $slave_param_value= $slave_sql_errno;
}

let $slave_error_message= Failed while waiting for slave to produce an error in its sql thread;
source include/wait_for_slave_param.inc;
let $slave_error_message= ;
+10 −12
Original line number Diff line number Diff line
@@ -580,7 +580,6 @@ sub optimize_cases {
sub process_opts_file {
  my ($tinfo, $opt_file, $opt_name)= @_;

  $tinfo->{$opt_name}= [];
  if ( -f $opt_file )
  {
    my $opts= opts_from_file($opt_file);
@@ -756,17 +755,6 @@ sub collect_one_test_case {
  push(@{$tinfo->{'master_opt'}}, @$suite_opts);
  push(@{$tinfo->{'slave_opt'}}, @$suite_opts);

  # ----------------------------------------------------------------------
  # Add master opts, extra options only for master
  # ----------------------------------------------------------------------
  process_opts_file($tinfo, "$testdir/$tname-master.opt", 'master_opt');

  # ----------------------------------------------------------------------
  # Add slave opts, list of extra option only for slave
  # ----------------------------------------------------------------------
  process_opts_file($tinfo, "$testdir/$tname-slave.opt", 'slave_opt');
  
  
  #-----------------------------------------------------------------------
  # Check for test specific config file
  #-----------------------------------------------------------------------
@@ -987,6 +975,16 @@ sub collect_one_test_case {
  push(@{$tinfo->{'master_opt'}}, @::opt_extra_mysqld_opt);
  push(@{$tinfo->{'slave_opt'}}, @::opt_extra_mysqld_opt);

  # ----------------------------------------------------------------------
  # Add master opts, extra options only for master
  # ----------------------------------------------------------------------
  process_opts_file($tinfo, "$testdir/$tname-master.opt", 'master_opt');

  # ----------------------------------------------------------------------
  # Add slave opts, list of extra option only for slave
  # ----------------------------------------------------------------------
  process_opts_file($tinfo, "$testdir/$tname-slave.opt", 'slave_opt');

  return $tinfo;
}

+1 −0
Original line number Diff line number Diff line
@@ -30,4 +30,5 @@ flush tables with read lock;
start slave;
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
drop table t3, t4, t5;
+1 −0
Original line number Diff line number Diff line
@@ -30,4 +30,5 @@ flush tables with read lock;
start slave;
stop slave;
ERROR HY000: Can't execute the given command because you have active locked tables or an active transaction
unlock tables;
drop table t3, t4, t5;
Loading