[ Avaa Bypassed ]




Upload:

Command:

hmhc3928@3.144.251.106: ~ $
# Verify that after CHANGE MASTER, replication (I/O thread and SQL
# thread) restart from where SQL thread left, not from where
# I/O thread left (some old bug fixed in 4.0.17)

call mtr.add_suppression("Slave I/O: The slave I/O thread stops because a fatal error is encountered when it tried to SET @master_binlog_checksum");

connection slave;
let $save_master_host= query_get_value(SHOW SLAVE STATUS, Master_Host, 1);

connection master;
# Make SQL slave thread advance a bit
create table t1(n int);
--sync_slave_with_master
select * from t1;
# Now stop it and make I/O slave thread be ahead
stop slave sql_thread;
connection master;
insert into t1 values(1);
insert into t1 values(2);
save_master_pos;
let $slave_param= Read_Master_Log_Pos;
let $slave_param_value= query_get_value(SHOW MASTER STATUS, Position, 1);
connection slave;
source include/wait_for_slave_param.inc;
source include/stop_slave.inc;

let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
if ($read_pos == $exec_pos)
{
  source include/show_rpl_debug_info.inc;
  echo 'Read_Master_Log_Pos: $read_pos' == 'Exec_Master_Log_Pos: $exec_pos';
  die Failed because Read_Master_Log_Pos is equal to Exec_Master_Log_Pos;
} 
--replace_column 2 ####
change master to master_user='root';
let $read_pos= query_get_value(SHOW SLAVE STATUS, Read_Master_Log_Pos, 1);
let $exec_pos= query_get_value(SHOW SLAVE STATUS, Exec_Master_Log_Pos, 1);
if ($read_pos != $exec_pos)
{
  source include/show_rpl_debug_info.inc;
  echo 'Read_Master_Log_Pos: $read_pos' <> 'Exec_Master_Log_Pos: $exec_pos';
  die Failed because Read_Master_Log_Pos is not equal to Exec_Master_Log_Pos;
}

start slave;
sync_with_master;
select * from t1;
connection master;
drop table t1;
--sync_slave_with_master

# End of 4.1 tests

#
# BUG#12190 CHANGE MASTER has differ path requiremts on MASTER_LOG_FILE and RELAY_LOG_FILE
#

if ($bug_59037_is_fixed == 'true') {
--source include/rpl_reset.inc

connection master;
create table t1 (a int);
insert into t1 values (1);
flush logs;
insert into t1 values (2);

# Note: the master positon saved by this will also be used by the
# 'sync_with_master' below.
--sync_slave_with_master

# Check if the table t1 and t2 are identical on master and slave;
--let $diff_tables= master:t1, slave:t1
--source include/diff_tables.inc

connection slave;
source include/stop_slave.inc;
delete from t1 where a=2;

# start replication from the second insert, after fix of BUG#12190,
# relay_log_file does not use absolute path, only the filename is
# required
#
# Note: the follow change master will automatically reset
# relay_log_purge to false, save the old value to restore
let $relay_log_purge= `select @@global.relay_log_purge`;
CHANGE MASTER TO relay_log_file='slave-relay-bin.000005', relay_log_pos=4;
start slave sql_thread;
source include/wait_for_slave_sql_to_start.inc;

# Sync to the same position saved by the 'sync_slave_with_master' above.
sync_with_master;

# Check if the table t1 and t2 are identical on master and slave;
--let $diff_tables= master:t1, slave:t1
--source include/diff_tables.inc

# clean up
connection slave;
start slave io_thread;
source include/wait_for_slave_io_to_start.inc;
eval set global relay_log_purge=$relay_log_purge;
connection master;
drop table t1;
--sync_slave_with_master
}

#
# BUG#44209: MASTER_CONNECT_RETRY and --master-retry-count disconnected from each other
#

-- connection master
-- source include/rpl_reset.inc

-- connection slave
-- let $retry_count0= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)

# assertion: show that the command line is still valid (MTR sets it to 10)
-- echo Master_Retry_Count: $retry_count

-- source include/stop_slave.inc

# action: change the initial value to some other value
-- let $retry_count1= `SELECT $retry_count0+10`
-- eval CHANGE MASTER TO master_retry_count=$retry_count1

-- source include/start_slave.inc

-- let $retry_count1= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
# assertion: it shows the new value -- retry_count0 +10
if (`SELECT $retry_count1 <> ($retry_count0+10)`)
{
  -- let $expected= `SELECT $retry_count0+10`
  -- echo Unexpected retry count value! Got: $retry_count1, expected: $expected
  -- die
}

-- source include/stop_slave.inc

# action: change master_retry_count to zero will set it to zero.
-- let $retry_count1= 0
-- eval CHANGE MASTER TO master_retry_count=$retry_count1

-- source include/start_slave.inc

-- let $retry_count2= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
# assertion: it shows no changes
if ($retry_count2 != $retry_count1)
{
  -- echo Unexpected retry count value! Got: $retry_count2, expected: $retry_count1
  -- die
}

-- source include/stop_slave.inc

# action: change the value to the smallest value possible
CHANGE MASTER TO master_retry_count=1;

-- source include/start_slave.inc

-- let $retry_count3= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
# assertion: it should show 1
if ($retry_count3 != 1)
{
  -- echo Unexpected retry count value! Got: $retry_count3, expected: 1
  -- die
}

-- source include/stop_slave.inc

# action: change the value back to the original one
-- eval CHANGE MASTER TO master_retry_count=$retry_count0

-- source include/start_slave.inc

-- let $retry_count4= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
# assertion: it should show 1
if ($retry_count4 != $retry_count0)
{
  -- echo Unexpected retry count value! Got: $retry_count4, expected: $retry_count0
  -- die
}

## Now lets change master_retry_count to the maximum value possible
## and stop and restart the slave to check that (in the middle of it 
## we also check that when issueing CHANGE MASTER TO without specifying
## master_retry_count will not affect its current value):
##   1. master_retry_count persists after restart
##   2. setting a value higher than the max will make the max to be set.
##   3. maximum value is accepted and persists after serialization 
##      and de-serialization
-- source include/stop_slave.inc
-- let $retry_count_set= 18446744073709551616
-- replace_result 18446744073709551616 RETRY_COUNT_SET
-- eval CHANGE MASTER TO master_retry_count=$retry_count_set
-- let $retry_count_expected= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-- replace_result 18446744073709551615 RETRY_COUNT_EXPECTED 4294967295 RETRY_COUNT_EXPECTED 9223372036854775807 RETRY_COUNT_EXPECTED
-- eval SELECT $retry_count_expected AS current_retry_count

## assert that issuing CHANGE MASTER without changing master_retry_count
## does not affect the existing value for master_retry_count
-- let $connect_retry_old= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
-- let $connect_retry_new= `SELECT $connect_retry_old + 1`
-- let $retry_count_before= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
-- eval CHANGE MASTER TO master_connect_retry= $connect_retry_new
-- let $retry_count_after= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
if ($retry_count_before != $retry_count_after)
{
  -- echo Unexpected retry count value! Got: $retry_count_after, expected: $retry_count_before
  -- die
}
-- eval CHANGE MASTER TO master_connect_retry= $connect_retry_old

## Server restart persisting test
--let $rpl_server_number= 2
--source include/rpl_restart_server.inc

-- source include/start_slave.inc

-- let $retry_count5= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
if ($retry_count5 != $retry_count_expected)
{
  -- echo Unexpected retry count value! Got: $retry_count5, expected: $retry_count_expected
  -- die
}

# action: change the value back to the original one
-- source include/stop_slave.inc
-- eval CHANGE MASTER TO master_retry_count=$retry_count0

## assert that there is a parse error if not using a numerical value
-- error ER_PARSE_ERROR
CHANGE MASTER TO master_retry_count='a';

## assert that there is a parse error if using a negative number
-- error ER_PARSE_ERROR
CHANGE MASTER TO master_retry_count=-1;

-- source include/start_slave.inc

## assert that the test has cleaned itself up
-- let $retry_count6= query_get_value(SHOW SLAVE STATUS, Master_Retry_Count, 1)
if ($retry_count6 != $retry_count0)
{
  -- echo Unexpected retry count value! Got: $retry_count6, expected: $retry_count0
  -- die
}

## Checks if Replicate_Ignore_Server_Ids is correctly written to a repository.

--connection slave
-- source include/stop_slave.inc

-- let $connect_old_value= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
-- let $ignore_old_value= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1)

-- eval CHANGE MASTER TO master_connect_retry= 200, IGNORE_SERVER_IDS= (100, 200, 300, 400, 500)

-- let $connect_new_value= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
-- let $ignore_new_value= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1)

--let $rpl_server_number= 2
--source include/rpl_restart_server.inc

-- source include/start_slave.inc

-- let $connect_crash_value= query_get_value(SHOW SLAVE STATUS, Connect_Retry, 1)
-- let $ignore_crash_value= query_get_value(SHOW SLAVE STATUS, Replicate_Ignore_Server_Ids, 1)

-- echo Eexpected values: "$ignore_new_value" == "$ignore_crash_value" or $connect_new_value == $connect_crash_value
if (`SELECT "$ignore_new_value" <> "$ignore_crash_value" || $connect_new_value <> $connect_crash_value`)
{
  -- echo Unexpected values: "$ignore_new_value" <> "$ignore_crash_value" or $connect_new_value <> $connect_crash_value
  -- die
}

# clean up
--source include/stop_slave.inc
CHANGE MASTER TO IGNORE_SERVER_IDS= ();
--source include/start_slave.inc

#
# WL#3127 slave side TCP address binding
# - CHANGE MASTER ... MASTER_BIND='interface'
# - SHOW SLAVE STATUS has new column Master_Bind
#

let $check_ipv6_just_check=1;
source include/check_ipv6.inc;
let $check_ipv6_just_check=0;

# Test valid IPv4 address
let $master_bind='127.0.0.1';
--source extra/rpl_tests/rpl_change_master_bind.inc

# Test invalid IPv4 address
let $master_bind='1.1.1.1';
let $master_bind_error_expected=2003;
--source extra/rpl_tests/rpl_change_master_bind.inc
let $master_bind_error_expected=0;

# Test valid IPv6 address
let $master_bind='::1';
if (!$check_ipv6_supported)
{
  # No IPv6 support, fallback to IPv4
  let $master_bind='127.0.0.1';
}
--source extra/rpl_tests/rpl_change_master_bind.inc

# Test with no bind address(check that reset works)
let $master_bind='';
--source extra/rpl_tests/rpl_change_master_bind.inc

### Revert to original master_host value
--source include/stop_slave.inc
--replace_result $save_master_host SAVE_MASTER_HOST
--eval CHANGE MASTER TO master_host='$save_master_host'
--source include/start_slave.inc

Filemanager

Name Type Size Permission Actions
check_type.inc File 1.95 KB 0644
create_recursive_construct.inc File 17.38 KB 0644
create_recursive_construct_stmt_capable_engine.inc File 16.72 KB 0644
delayed_slave_wait_on_query.inc File 1.59 KB 0644
grep_pattern.inc File 598 B 0644
rpl_EE_err.test File 1.03 KB 0644
rpl_auto_increment.test File 8.43 KB 0644
rpl_auto_increment_insert_view.test File 1.37 KB 0644
rpl_auto_increment_invoke_trigger.test File 2.47 KB 0644
rpl_autoinc_func_invokes_trigger.test File 1.78 KB 0644
rpl_binlog_error.inc File 17.24 KB 0644
rpl_binlog_max_cache_size.test File 17.42 KB 0644
rpl_blackhole.test File 1.03 KB 0644
rpl_change_master.test File 10.5 KB 0644
rpl_change_master_bind.inc File 2.23 KB 0644
rpl_charset.test File 4.45 KB 0644
rpl_check_gtid.inc File 4.87 KB 0644
rpl_commit_after_flush.test File 296 B 0644
rpl_conflicts.test File 5.45 KB 0644
rpl_crash_safe.inc File 4.13 KB 0644
rpl_crash_safe.test File 7.61 KB 0644
rpl_db_stmts_ignored.inc File 1.7 KB 0644
rpl_ddl.test File 21.59 KB 0644
rpl_deadlock.test File 5.53 KB 0644
rpl_delete_no_where.test File 523 B 0644
rpl_do_table_filter_insensitive.inc File 492 B 0644
rpl_do_table_filter_sensitive.inc File 491 B 0644
rpl_drop_create_temp_table.inc File 29.76 KB 0644
rpl_drop_create_temp_table.test File 17.8 KB 0644
rpl_extra_col_master.test File 31.89 KB 0644
rpl_extra_col_slave.test File 28.7 KB 0644
rpl_failed_optimize.test File 666 B 0644
rpl_filters.test File 496 B 0644
rpl_flsh_tbls.test File 1.79 KB 0644
rpl_foreign_key.test File 1.7 KB 0644
rpl_generate_mts_gap.test File 1.62 KB 0644
rpl_get_master_version_and_clock.test File 2.88 KB 0644
rpl_gtid_drop_table.inc File 1.11 KB 0644
rpl_gtid_mts_relay_log_recovery.test File 3.78 KB 0644
rpl_gtid_temp_table_in_func_or_trigger.inc File 3.69 KB 0644
rpl_gtids_restart_slave_io_lost_trx.test File 3.48 KB 0644
rpl_heartbeat_2slaves.inc File 4.27 KB 0644
rpl_ignore_table_filter_insensitive.inc File 508 B 0644
rpl_ignore_table_filter_sensitive.inc File 506 B 0644
rpl_implicit_commit_binlog.test File 16.65 KB 0644
rpl_innodb.test File 4.49 KB 0644
rpl_insert_delayed.test File 4.63 KB 0644
rpl_insert_id.test File 15.12 KB 0644
rpl_insert_id_pk.test File 2.65 KB 0644
rpl_insert_ignore.test File 4.74 KB 0644
rpl_insert_ignore_gtid_on.inc File 466 B 0644
rpl_kill_query.inc File 4.14 KB 0644
rpl_loaddata.test File 8.72 KB 0644
rpl_loaddata_s.inc File 896 B 0644
rpl_loadfile.test File 1.07 KB 0644
rpl_log.test File 5.29 KB 0644
rpl_lower_case_table_names.test File 4.07 KB 0644
rpl_max_relay_size.test File 2.58 KB 0644
rpl_mixing_engines.inc File 22.85 KB 0644
rpl_mixing_engines.test File 54.43 KB 0644
rpl_mts_crash_safe.inc File 5.87 KB 0644
rpl_mts_crash_safe.test File 5.47 KB 0644
rpl_mts_execute_partial_trx_in_relay_log.inc File 1.11 KB 0644
rpl_mts_pending_events.inc File 4.91 KB 0644
rpl_mts_relay_log_recovery.test File 3.19 KB 0644
rpl_multi_query.test File 782 B 0644
rpl_multi_update.test File 805 B 0644
rpl_multi_update2.test File 1.35 KB 0644
rpl_multi_update3.test File 4.38 KB 0644
rpl_not_null.test File 10.7 KB 0644
rpl_parallel_load.test File 6.06 KB 0644
rpl_parallel_load_innodb.test File 6.96 KB 0644
rpl_partition.test File 7.88 KB 0644
rpl_record_compare.test File 2.08 KB 0644
rpl_relayrotate.test File 2.68 KB 0644
rpl_reset_slave.test File 3.45 KB 0644
rpl_rollback_to_savepoint.inc File 7.49 KB 0644
rpl_row_001.test File 1.92 KB 0644
rpl_row_UUID.test File 2.61 KB 0644
rpl_row_basic.test File 24.21 KB 0644
rpl_row_blob.test File 5.57 KB 0644
rpl_row_delayed_ins.test File 598 B 0644
rpl_row_empty_imgs.test File 5.67 KB 0644
rpl_row_event_max_size.inc File 3.76 KB 0644
rpl_row_func003.test File 3.07 KB 0644
rpl_row_idempotency.test File 8.39 KB 0644
rpl_row_img.test File 8.23 KB 0644
rpl_row_img_blobs.test File 5.82 KB 0644
rpl_row_img_diff_indexes.test File 9.11 KB 0644
rpl_row_show_relaylog_events.inc File 559 B 0644
rpl_row_sp002.test File 5.26 KB 0644
rpl_row_sp003.test File 2.01 KB 0644
rpl_row_sp006.test File 2.78 KB 0644
rpl_row_sp007.test File 1.46 KB 0644
rpl_row_tabledefs.test File 8.1 KB 0644
rpl_set_null.test File 2.85 KB 0644
rpl_show_binlog_events.inc File 364 B 0644
rpl_show_log_events_with_varying_options.inc File 364 B 0644
rpl_show_relaylog_events.inc File 1.96 KB 0644
rpl_start_stop_slave.test File 5.3 KB 0644
rpl_stm_EE_err2.test File 1.47 KB 0644
rpl_stm_create_if_not_exists.test File 6.87 KB 0644
rpl_stm_insert_delayed.inc File 394 B 0644
rpl_stm_mix_show_relaylog_events.inc File 574 B 0644
rpl_stop_middle_group.test File 5.14 KB 0644
rpl_stop_slave.test File 1.56 KB 0644
rpl_stress_test.inc File 2.22 KB 0644
rpl_sv_relay_space.test File 921 B 0644
rpl_temp_error.test File 623 B 0644
rpl_test_framework.inc File 2.42 KB 0644
rpl_tmp_table_and_DDL.test File 4.8 KB 0644
rpl_trig004.test File 1.7 KB 0644
rpl_truncate.test File 425 B 0644
rpl_truncate_helper.test File 976 B 0644
type_conversions.test File 23.47 KB 0644