Commit f875890a authored by unknown's avatar unknown

Merge mail.hezx.com:/media/sda3/work/mysql/bkwork/versional/mysql-5.1-new-rpl

into  mail.hezx.com:/media/sda3/work/mysql/bkwork/versional/merge-51


mysql-test/suite/rpl/r/rpl_create_database.result:
  Auto merged
mysql-test/suite/rpl/r/rpl_load_from_master.result:
  Auto merged
mysql-test/suite/rpl/t/rpl_create_database.test:
  Auto merged
mysql-test/suite/rpl/t/rpl_load_from_master.test:
  Auto merged
mysql-test/suite/rpl/r/rpl_init_slave.result:
  SCCS merged
mysql-test/suite/rpl/t/rpl_init_slave.test:
  SCCS merged
parents 5744be40 556f2e4e
......@@ -43,7 +43,7 @@ set global max_relay_log_size=8192-1; # mapped to 4096
select @@global.max_relay_log_size;
start slave;
sync_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
--echo #
--echo # Test 2
......@@ -55,7 +55,7 @@ set global max_relay_log_size=(5*4096);
query_vertical select @@global.max_relay_log_size;
start slave;
sync_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
--echo #
--echo # Test 3: max_relay_log_size = 0
......@@ -67,7 +67,7 @@ set global max_relay_log_size=0;
query_vertical select @@global.max_relay_log_size;
start slave;
sync_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
--echo #
--echo # Test 4: Tests below are mainly to ensure that we have not coded with wrong assumptions
......@@ -78,7 +78,7 @@ reset slave;
# test of relay log rotation when the slave is stopped
# (to make sure it does not crash).
flush logs;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
--echo #
--echo # Test 5
......@@ -96,7 +96,7 @@ create table t1 (a int);
save_master_pos;
connection slave;
sync_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
--echo #
--echo # Test 6: one more rotation, to be sure Relay_Log_Space is correctly updated
......@@ -108,13 +108,12 @@ drop table t1;
save_master_pos;
connection slave;
sync_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
connection master;
# test that the absence of relay logs does not make a master crash
flush logs;
-- replace_column 3 <Binlog_Ignore_DB>
query_vertical show master status;
source include/show_master_status.inc;
# Restore max_binlog_size
connection slave;
......
......@@ -13,18 +13,18 @@ connection master;
save_master_pos;
connection slave;
sync_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
stop slave;
change master to master_user='test';
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
reset slave;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
start slave;
sync_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
# test of crash with temp tables & RESET SLAVE
# (test to see if RESET SLAVE clears temp tables in memory and disk)
......
......@@ -122,7 +122,7 @@ INSERT INTO t1_nodef VALUES (1,2);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
......@@ -142,7 +142,7 @@ sync_slave_with_master;
--echo **** On Slave ****
SELECT * FROM t2;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 #
--query_vertical SHOW SLAVE STATUS
connection master;
......@@ -154,7 +154,7 @@ INSERT INTO t4 VALUES (4);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
......@@ -168,7 +168,7 @@ INSERT INTO t5 VALUES (5,10,25);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
......@@ -182,7 +182,7 @@ INSERT INTO t6 VALUES (6,12,36);
connection slave;
--source include/wait_for_slave_sql_to_stop.inc
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 #
--query_vertical SHOW SLAVE STATUS
SET GLOBAL SQL_SLAVE_SKIP_COUNTER=2;
START SLAVE;
......@@ -191,7 +191,7 @@ connection master;
INSERT INTO t9 VALUES (6);
sync_slave_with_master;
--replace_result $SLAVE_MYPORT SLAVE_PORT
--replace_column 1 # 4 # 7 # 8 # 9 # 22 # 23 # 33 #
--replace_column 1 # 4 # 7 # 8 # 9 # 20 # 22 # 23 # 33 # 40 #
--query_vertical SHOW SLAVE STATUS
# Testing some tables extra field that can be null and cannot be null
......
# show binary logs
# mask out the binlog position
-- replace_column 2 #
show binary logs;
# show master logs
# mask out the binlog position
-- replace_column 2 #
query_vertical show master logs;
# show master status
# mask out the binlog position
-- replace_column 2 # 3 <Binlog_Do_DB> 4 <Binlog_Ignore_DB>
show master status;
# Include file to show the slave status, masking out some information
# that varies depending on where the test is executed.
# masked out log positions
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 16 # 22 # 23 # 33 # 35 # 36 #
query_vertical SHOW SLAVE STATUS;
reset master;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
reset slave;
SHOW SLAVE STATUS;
change master to master_host='127.0.0.1';
......@@ -12,7 +12,7 @@ Master_User test
Master_Port 3306
Connect_Retry 7
Master_Log_File
Read_Master_Log_Pos 4
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
......@@ -27,7 +27,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -53,7 +53,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 7
Master_Log_File
Read_Master_Log_Pos 4
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
......@@ -68,7 +68,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -93,7 +93,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 7
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -108,7 +108,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 106
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -33,7 +33,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 191
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -73,7 +73,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 191
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -7,40 +7,40 @@ start slave;
**** On Master ****
CREATE USER dummy@localhost;
CREATE USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user != 'root';
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
user host
dummy localhost
dummy1 localhost
dummy2 localhost
SELECT COUNT(*) FROM mysql.user;
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
6
3
**** On Slave ****
SELECT user,host FROM mysql.user WHERE user != 'root';
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
user host
dummy localhost
dummy1 localhost
dummy2 localhost
SELECT COUNT(*) FROM mysql.user;
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
6
3
**** On Master ****
DROP USER nonexisting@localhost;
ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost'
DROP USER nonexisting@localhost, dummy@localhost;
ERROR HY000: Operation DROP USER failed for 'nonexisting'@'localhost'
DROP USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user != 'root';
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
user host
SELECT COUNT(*) FROM mysql.user;
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
3
0
**** On Slave ****
SELECT user,host FROM mysql.user WHERE user != 'root';
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
user host
SELECT COUNT(*) FROM mysql.user;
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
COUNT(*)
3
0
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
......@@ -48,7 +48,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 617
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -57,13 +57,13 @@ Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 617
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -76,7 +76,7 @@ Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno 0
Last_IO_Error
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
......@@ -4,6 +4,7 @@ reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
set global max_connections=151;
stop slave;
start slave;
show variables like 'init_slave';
......
......@@ -6,7 +6,7 @@ drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106 <Binlog_Ignore_DB>
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
stop slave;
change master to master_log_pos=75;
SHOW SLAVE STATUS;
......@@ -16,7 +16,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 75
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -31,7 +31,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 75
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -91,12 +91,12 @@ Last_SQL_Errno 0
Last_SQL_Error
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000001 106 <Binlog_Ignore_DB>
master-bin.000001 # <Binlog_Do_DB> <Binlog_Ignore_DB>
create table if not exists t1 (n int);
drop table if exists t1;
create table t1 (n int);
insert into t1 values (1),(2),(3);
change master to master_log_pos=106;
change master to master_log_pos=4;
start slave;
select * from t1 ORDER BY n;
n
......
......@@ -21,7 +21,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 60
Master_Log_File master-bin.000001
Read_Master_Log_Pos 556
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -36,7 +36,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 556
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -63,9 +63,9 @@ insert into t2 values (34),(67),(123);
flush logs;
show binary logs;
Log_name File_size
master-bin.000001 600
master-bin.000002 371
master-bin.000003 106
master-bin.000001 #
master-bin.000002 #
master-bin.000003 #
create table t3 select * from temp_table;
select * from t3;
a
......@@ -78,21 +78,22 @@ set global sql_slave_skip_counter=1;
start slave;
purge master logs to 'master-bin.000002';
show master logs;
Log_name File_size
master-bin.000002 371
master-bin.000003 415
Log_name master-bin.000002
File_size #
Log_name master-bin.000003
File_size #
purge binary logs to 'master-bin.000002';
show binary logs;
Log_name File_size
master-bin.000002 371
master-bin.000003 415
master-bin.000002 #
master-bin.000003 #
select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND)
from information_schema.tables
where TABLE_SCHEMA="test" and TABLE_NAME="t2";
purge master logs before (@time_for_purge);
show binary logs;
Log_name File_size
master-bin.000003 415
master-bin.000003 #
insert into t2 values (65);
SHOW SLAVE STATUS;
Slave_IO_State #
......@@ -101,7 +102,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 60
Master_Log_File master-bin.000003
Read_Master_Log_Pos 504
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000003
......@@ -116,7 +117,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 504
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -149,12 +150,12 @@ count(*)
create table t4 select * from temp_table;
show binary logs;
Log_name File_size
master-bin.000003 4193
master-bin.000004 4198
master-bin.000005 2040
master-bin.000003 #
master-bin.000004 #
master-bin.000005 #
show master status;
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000005 2040
master-bin.000005 # <Binlog_Do_DB> <Binlog_Ignore_DB>
select * from t4;
a
testing temporary tables part 2
......@@ -165,7 +166,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 60
Master_Log_File master-bin.000005
Read_Master_Log_Pos 2040
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000005
......@@ -180,7 +181,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 2040
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -30,7 +30,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 60268
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -45,7 +45,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 60268
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -78,7 +78,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 60268
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -93,7 +93,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 60268
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -126,7 +126,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 60268
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -141,7 +141,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 60268
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -171,7 +171,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
......@@ -186,7 +186,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -217,7 +217,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 60354
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -232,7 +232,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 60354
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -261,7 +261,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 60430
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -276,7 +276,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 60430
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -295,10 +295,8 @@ Last_SQL_Errno 0
Last_SQL_Error
flush logs;
show master status;
File master-bin.000002
Position 106
Binlog_Do_DB <Binlog_Ignore_DB>
Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000002 # <Binlog_Do_DB> <Binlog_Ignore_DB>
set global max_binlog_size= @my_max_binlog_size;
#
# End of 4.1 tests
......
......@@ -11,7 +11,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -26,7 +26,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 106
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -52,7 +52,7 @@ Master_User test
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -67,7 +67,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 106
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -92,7 +92,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
......@@ -107,7 +107,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -132,7 +132,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -147,7 +147,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 106
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -29,7 +29,43 @@ select * from t1;
a
1
2
show slave status;
Slave_IO_State Master_Host Master_User Master_Port Connect_Retry Master_Log_File Read_Master_Log_Pos Relay_Log_File Relay_Log_Pos Relay_Master_Log_File Slave_IO_Running Slave_SQL_Running Replicate_Do_DB Replicate_Ignore_DB Replicate_Do_Table Replicate_Ignore_Table Replicate_Wild_Do_Table Replicate_Wild_Ignore_Table Last_Errno Last_Error Skip_Counter Exec_Master_Log_Pos Relay_Log_Space Until_Condition Until_Log_File Until_Log_Pos Master_SSL_Allowed Master_SSL_CA_File Master_SSL_CA_Path Master_SSL_Cert Master_SSL_Cipher Master_SSL_Key Seconds_Behind_Master Master_SSL_Verify_Server_Cert Last_IO_Errno Last_IO_Error Last_SQL_Errno Last_SQL_Error
# 127.0.0.1 root MASTER_PORT 1 master-bin.000001 851 # # master-bin.000001 Yes Yes 0 0 851 # None 0 No # No 0 0
SHOW SLAVE STATUS;
Slave_IO_State #
Master_Host 127.0.0.1
Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
Slave_IO_Running Yes
Slave_SQL_Running Yes
Replicate_Do_DB
Replicate_Ignore_DB
Replicate_Do_Table
Replicate_Ignore_Table #
Replicate_Wild_Do_Table
Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
Until_Log_Pos 0
Master_SSL_Allowed No
Master_SSL_CA_File
Master_SSL_CA_Path
Master_SSL_Cert
Master_SSL_Cipher
Master_SSL_Key
Seconds_Behind_Master #
Master_SSL_Verify_Server_Cert No
Last_IO_Errno #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Error
drop table t1;
......@@ -28,7 +28,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 72960
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -43,7 +43,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 72960
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -76,7 +76,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 72960
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -91,7 +91,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 72960
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -124,7 +124,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 72960
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -139,7 +139,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 72960
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -169,7 +169,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
......@@ -184,7 +184,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -215,7 +215,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 73046
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -230,7 +230,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 73046
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -259,7 +259,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 73122
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -274,7 +274,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 73122
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -293,10 +293,8 @@ Last_SQL_Errno 0
Last_SQL_Error
flush logs;
show master status;
File master-bin.000002
Position 106
Binlog_Do_DB <Binlog_Ignore_DB>
Binlog_Ignore_DB
File Position Binlog_Do_DB Binlog_Ignore_DB
master-bin.000002 # <Binlog_Do_DB> <Binlog_Ignore_DB>
set global max_binlog_size= @my_max_binlog_size;
#
# End of 4.1 tests
......
......@@ -11,7 +11,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -26,7 +26,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 106
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -52,7 +52,7 @@ Master_User test
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -67,7 +67,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 106
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -92,7 +92,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File
Read_Master_Log_Pos 4
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File
......@@ -107,7 +107,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 0
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......@@ -132,7 +132,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 106
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -147,7 +147,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 106
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -26,7 +26,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 784
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -41,7 +41,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 327
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-bin.000001
......@@ -72,7 +72,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 784
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -87,7 +87,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 327
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-no-such-bin.000001
......@@ -116,7 +116,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 784
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -131,7 +131,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 616
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition Relay
Until_Log_File slave-relay-bin.000004
......@@ -158,7 +158,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 784
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -173,7 +173,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 784
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition Master
Until_Log_File master-bin.000001
......
......@@ -46,7 +46,7 @@ Master_User root
Master_Port MASTER_PORT
Connect_Retry 1
Master_Log_File master-bin.000001
Read_Master_Log_Pos 408
Read_Master_Log_Pos #
Relay_Log_File #
Relay_Log_Pos #
Relay_Master_Log_File master-bin.000001
......@@ -61,7 +61,7 @@ Replicate_Wild_Ignore_Table
Last_Errno 0
Last_Error
Skip_Counter 0
Exec_Master_Log_Pos 408
Exec_Master_Log_Pos #
Relay_Log_Space #
Until_Condition None
Until_Log_File
......
......@@ -9,22 +9,22 @@ connect (master,localhost,root,,test,$MASTER_MYPORT,$MASTER_MYSOCK);
connect (slave,localhost,root,,test,$SLAVE_MYPORT,$SLAVE_MYSOCK);
connection master;
reset master;
show master status;
source include/show_master_status.inc;
save_master_pos;
connection slave;
reset slave;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
change master to master_host='127.0.0.1';
# The following needs to be cleaned up when change master is fixed
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
--replace_result $MASTER_MYPORT MASTER_PORT
eval change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=$MASTER_MYPORT;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
start slave;
sync_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
connection master;
--disable_warnings
drop table if exists t1;
......
......@@ -18,13 +18,9 @@ save_master_pos;
connection slave;
--real_sleep 3 # wait for I/O thread to have read updates
stop slave;
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
query_vertical SHOW SLAVE STATUS;
source include/show_slave_status2.inc;
change master to master_user='root';
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 7 # 8 # 9 # 16 # 23 # 33 # 35 # 36 #
query_vertical SHOW SLAVE STATUS;
source include/show_slave_status2.inc;
start slave;
sync_with_master;
select * from t1;
......
......@@ -147,12 +147,14 @@ INSERT INTO t1 VALUES ("This is a test of col a.",
"This is a test of the large col c.",
"Col d");
SELECT * FROM t1;
--replace_result default DEFAULT
SHOW CREATE TABLE t1;
sync_slave_with_master slave;
--echo Insert some values and select them on slave
SELECT * FROM t1;
--replace_result default DEFAULT
SHOW CREATE TABLE t1;
......@@ -200,12 +202,14 @@ INSERT INTO t1 VALUES (
);
SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
--replace_result default DEFAULT
SHOW CREATE TABLE t1;
sync_slave_with_master slave;
--echo Insert some values and select them on master
SELECT BIN(a), BIN(b), BIN(c), BIN(d), BIN(e) FROM t1;
--replace_result default DEFAULT
SHOW CREATE TABLE t1;
--echo *** Cleanup ***
......
......@@ -9,12 +9,12 @@ connection master;
CREATE USER dummy@localhost;
CREATE USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ
SELECT COUNT(*) FROM mysql.user;
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
sync_slave_with_master;
--echo **** On Slave ****
SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ
SELECT COUNT(*) FROM mysql.user;
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
--echo **** On Master ****
connection master;
......@@ -30,13 +30,11 @@ DROP USER nonexisting@localhost, dummy@localhost;
# All users exist
DROP USER dummy1@localhost, dummy2@localhost;
SELECT user, host FROM mysql.user WHERE user != 'root'; # root host non-determ
SELECT COUNT(*) FROM mysql.user;
SELECT user, host FROM mysql.user WHERE user like 'dummy%';
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
sync_slave_with_master;
--echo **** On Slave ****
SELECT user,host FROM mysql.user WHERE user != 'root'; # root host non-determ
SELECT COUNT(*) FROM mysql.user;
SELECT user,host FROM mysql.user WHERE user like 'dummy%';
SELECT COUNT(*) FROM mysql.user WHERE user like 'dummy%';
--replace_result $MASTER_MYPORT MASTER_PORT
--replace_column 1 # 8 # 9 # 23 # 33 #
query_vertical SHOW SLAVE STATUS;
source include/show_slave_status2.inc;
......@@ -4,6 +4,8 @@ source include/master-slave.inc;
# Test of init_slave variable
#
set global max_connections=151;
connection slave;
stop slave;
source include/wait_for_slave_to_stop.inc;
......
......@@ -11,14 +11,13 @@
# Passes with rbr no problem, removed statement include [jbm]
source include/master-slave.inc;
--replace_column 3 <Binlog_Ignore_DB>
show master status;
source include/show_master_status.inc;
sync_slave_with_master;
stop slave;
--source include/wait_for_slave_to_stop.inc
change master to master_log_pos=75;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
start slave;
let $slave_param= Slave_SQL_Running;
let $slave_param_value= Yes;
......@@ -31,15 +30,14 @@ stop slave;
source include/show_slave_status.inc;
connection master;
--replace_column 3 <Binlog_Ignore_DB>
show master status;
source include/show_master_status.inc;
create table if not exists t1 (n int);
drop table if exists t1;
create table t1 (n int);
insert into t1 values (1),(2),(3);
save_master_pos;
connection slave;
change master to master_log_pos=106;
change master to master_log_pos=4;
start slave;
sync_with_master;
select * from t1 ORDER BY n;
......
......@@ -65,14 +65,14 @@ insert into temp_table values ("testing temporary tables");
create table t1 (s text);
insert into t1 values('Could not break slave'),('Tried hard');
sync_slave_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
select * from t1;
connection master;
flush logs;
create table t2(m int not null auto_increment primary key);
insert into t2 values (34),(67),(123);
flush logs;
show binary logs;
source include/show_binary_logs.inc;
create table t3 select * from temp_table;
sync_slave_with_master;
......@@ -106,10 +106,10 @@ connection master;
sync_slave_with_master;
connection master;
purge master logs to 'master-bin.000002';
show master logs;
source include/show_master_logs.inc;
# we just tests if synonyms are accepted
purge binary logs to 'master-bin.000002';
show binary logs;
source include/show_binary_logs.inc;
# Calculate time to use in "purge master logs before" by taking
# last modification time of t2 and adding 1 second
......@@ -122,10 +122,10 @@ select @time_for_purge:=DATE_ADD(UPDATE_TIME, INTERVAL 1 SECOND)
--enable_result_log
purge master logs before (@time_for_purge);
show binary logs;
source include/show_binary_logs.inc;
insert into t2 values (65);
sync_slave_with_master;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
select * from t2;
#
......@@ -148,14 +148,14 @@ while ($1)
enable_query_log;
select count(*) from t3 where n >= 4;
create table t4 select * from temp_table;
show binary logs;
show master status;
source include/show_binary_logs.inc;
source include/show_master_status.inc;
save_master_pos;
connection slave;
sync_with_master;
select * from t4;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
# because of concurrent insert, the table may not be up to date
# if we do not lock
lock tables t3 read;
......
......@@ -50,9 +50,7 @@ sync_slave_with_master;
connection slave;
select @@server_id;
select * from t1;
--replace_column 1 # 8 # 9 # 23 # 33 #
--replace_result $MASTER_MYPORT MASTER_PORT
show slave status;
source include/show_slave_status2.inc;
connection master;
drop table t1;
sync_with_master;
......
......@@ -31,20 +31,20 @@ start slave until master_log_file='master-bin.000001', master_log_pos=323;
--source include/wait_for_slave_sql_to_stop.inc
# here table should be still not deleted
select * from t1;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
# this should fail right after start
start slave until master_log_file='master-no-such-bin.000001', master_log_pos=291;
--source include/wait_for_slave_sql_to_stop.inc
# again this table should be still not deleted
select * from t1;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
# try replicate all up to and not including the second insert to t2;
start slave until relay_log_file='slave-relay-bin.000004', relay_log_pos=746;
--source include/wait_for_slave_sql_to_stop.inc
select * from t2;
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
# clean up
start slave;
......@@ -61,7 +61,7 @@ start slave until master_log_file='master-bin.000001', master_log_pos=776;
--source include/wait_for_slave_sql_to_stop.inc
# here the sql slave thread should be stopped
--replace_result bin.000005 bin.000004 bin.000006 bin.000004 bin.000007 bin.000004
source include/show_slave_status.inc;
source include/show_slave_status2.inc;
#testing various error conditions
--error 1277
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment