Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
62f36f02
Commit
62f36f02
authored
Oct 24, 2002
by
nick@mysql.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
altered syntax from SLAVE START|STOP to START|STOP SLAVE
parent
6c22ca44
Changes
44
Show whitespace changes
Inline
Side-by-side
Showing
44 changed files
with
167 additions
and
206 deletions
+167
-206
mysql-test/include/master-slave.inc
mysql-test/include/master-slave.inc
+2
-2
mysql-test/mysql-test-run.sh
mysql-test/mysql-test-run.sh
+20
-9
mysql-test/r/rpl000001.result
mysql-test/r/rpl000001.result
+7
-7
mysql-test/r/rpl000002.result
mysql-test/r/rpl000002.result
+4
-4
mysql-test/r/rpl000003.result
mysql-test/r/rpl000003.result
+2
-2
mysql-test/r/rpl000004.result
mysql-test/r/rpl000004.result
+2
-2
mysql-test/r/rpl000005.result
mysql-test/r/rpl000005.result
+2
-2
mysql-test/r/rpl000006.result
mysql-test/r/rpl000006.result
+2
-2
mysql-test/r/rpl000007.result
mysql-test/r/rpl000007.result
+2
-2
mysql-test/r/rpl000008.result
mysql-test/r/rpl000008.result
+2
-2
mysql-test/r/rpl000009.result
mysql-test/r/rpl000009.result
+2
-2
mysql-test/r/rpl000010.result
mysql-test/r/rpl000010.result
+2
-2
mysql-test/r/rpl000011.result
mysql-test/r/rpl000011.result
+4
-4
mysql-test/r/rpl000012.result
mysql-test/r/rpl000012.result
+2
-2
mysql-test/r/rpl000013.result
mysql-test/r/rpl000013.result
+2
-2
mysql-test/r/rpl000015.result
mysql-test/r/rpl000015.result
+1
-1
mysql-test/r/rpl000017.result
mysql-test/r/rpl000017.result
+1
-1
mysql-test/r/rpl000018.result
mysql-test/r/rpl000018.result
+1
-1
mysql-test/r/rpl_alter.result
mysql-test/r/rpl_alter.result
+2
-2
mysql-test/r/rpl_empty_master_crash.result
mysql-test/r/rpl_empty_master_crash.result
+2
-2
mysql-test/r/rpl_failsafe.result
mysql-test/r/rpl_failsafe.result
+4
-4
mysql-test/r/rpl_flush_log_loop.result
mysql-test/r/rpl_flush_log_loop.result
+5
-5
mysql-test/r/rpl_get_lock.result
mysql-test/r/rpl_get_lock.result
+2
-2
mysql-test/r/rpl_log.result
mysql-test/r/rpl_log.result
+6
-6
mysql-test/r/rpl_log_pos.result
mysql-test/r/rpl_log_pos.result
+6
-6
mysql-test/r/rpl_mystery22.result
mysql-test/r/rpl_mystery22.result
+5
-5
mysql-test/r/rpl_redirect.result
mysql-test/r/rpl_redirect.result
+2
-2
mysql-test/r/rpl_rotate_logs.result
mysql-test/r/rpl_rotate_logs.result
+4
-4
mysql-test/r/rpl_skip_error.result
mysql-test/r/rpl_skip_error.result
+2
-2
mysql-test/r/rpl_sporadic_master.result
mysql-test/r/rpl_sporadic_master.result
+4
-4
mysql-test/t/rpl000001.test
mysql-test/t/rpl000001.test
+5
-5
mysql-test/t/rpl000002.test
mysql-test/t/rpl000002.test
+5
-11
mysql-test/t/rpl000011.test
mysql-test/t/rpl000011.test
+5
-11
mysql-test/t/rpl000015.test
mysql-test/t/rpl000015.test
+3
-7
mysql-test/t/rpl000017.test
mysql-test/t/rpl000017.test
+3
-7
mysql-test/t/rpl000018.test
mysql-test/t/rpl000018.test
+3
-7
mysql-test/t/rpl_failsafe.test
mysql-test/t/rpl_failsafe.test
+3
-5
mysql-test/t/rpl_flush_log_loop.test
mysql-test/t/rpl_flush_log_loop.test
+3
-3
mysql-test/t/rpl_log.test
mysql-test/t/rpl_log.test
+4
-4
mysql-test/t/rpl_log_pos.test
mysql-test/t/rpl_log_pos.test
+6
-10
mysql-test/t/rpl_mystery22.test
mysql-test/t/rpl_mystery22.test
+5
-9
mysql-test/t/rpl_rotate_logs.test
mysql-test/t/rpl_rotate_logs.test
+11
-21
mysql-test/t/rpl_sporadic_master.test
mysql-test/t/rpl_sporadic_master.test
+5
-11
sql/sql_yacc.yy
sql/sql_yacc.yy
+2
-2
No files found.
mysql-test/include/master-slave.inc
View file @
62f36f02
...
...
@@ -4,7 +4,7 @@ connect (slave,127.0.0.1,root,,test,$SLAVE_MYPORT,);
connect
(
slave1
,
127.0
.
0.1
,
root
,,
test
,
$SLAVE_MYPORT
,);
connection
slave
;
--
error
0
,
1199
!
s
lave
stop
;
!
s
top
slave
;
@
r
/
slave
-
stopped
.
result
show
status
like
'Slave_running'
;
connection
master
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
;
...
...
@@ -13,7 +13,7 @@ connection slave;
reset
slave
;
# Clean up old test tables
drop
table
if
exists
t1
,
t2
,
t3
,
t4
,
t5
,
t6
,
t7
,
t8
,
t9
;
s
lave
start
;
s
tart
slave
;
@
r
/
slave
-
running
.
result
show
status
like
'Slave_running'
;
# Set the default connection to 'master'
...
...
mysql-test/mysql-test-run.sh
View file @
62f36f02
...
...
@@ -192,6 +192,7 @@ CHARACTER_SET=latin1
DBUSER
=
""
START_WAIT_TIMEOUT
=
10
STOP_WAIT_TIMEOUT
=
10
TEST_REPLICATION
=
0
while
test
$#
-gt
0
;
do
case
"
$1
"
in
...
...
@@ -265,6 +266,9 @@ while test $# -gt 0; do
--user-test
=
*
)
USER_TEST
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--user-test=;;"
`
;;
--rpl
)
TEST_REPLICATION
=
1
;;
--mysqld
=
*
)
TMP
=
`
$ECHO
"
$1
"
|
$SED
-e
"s;--mysqld=;;"
`
EXTRA_MASTER_MYSQLD_OPT
=
"
$EXTRA_MASTER_MYSQLD_OPT
$TMP
"
...
...
@@ -1291,11 +1295,18 @@ if [ -z "$1" ] ;
then
if
[
x
$RECORD
=
x1
]
;
then
$ECHO
"Will not run in record mode without a specific test case."
else
if
[
x
$TEST_REPLICATION
=
x1
]
;
then
for
tf
in
$TESTDIR
/rpl
*
.
$TESTSUFFIX
do
run_testcase
$tf
done
else
for
tf
in
$TESTDIR
/
*
.
$TESTSUFFIX
do
run_testcase
$tf
done
fi
$RM
-f
$TIMEFILE
# Remove for full test
fi
else
...
...
mysql-test/r/rpl000001.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1,t2,t3;
create table t1 (word char(20) not null);
load data infile '../../std_data/words.dat' into table t1;
...
...
@@ -30,9 +30,9 @@ abandoned
abandoning
abandonment
abandons
s
lave stop
;
s
top slave
;
set password for root@"localhost" = password('foo');
s
lave start
;
s
tart slave
;
set password for root@"localhost" = password('');
create table t3(n int);
insert into t3 values(1),(2);
...
...
@@ -45,13 +45,13 @@ sum(length(word))
141
drop table t1,t3;
reset master;
s
lave stop
;
s
top slave
;
reset slave;
create table t1(n int);
select get_lock("hold_slave",10);
get_lock("hold_slave",10)
1
s
lave start
;
s
tart slave
;
select release_lock("hold_slave");
release_lock("hold_slave")
1
...
...
@@ -68,7 +68,7 @@ kill @id;
drop table t2;
Server shutdown in progress
set global sql_slave_skip_counter=1;
s
lave start
;
s
tart slave
;
select count(*) from t1;
count(*)
5000
...
...
mysql-test/r/rpl000002.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1;
create table t1 (n int auto_increment primary key);
set insert_id = 2000;
...
...
@@ -17,7 +17,7 @@ show slave hosts;
Server_id Host Port Rpl_recovery_rank Master_id
2 127.0.0.1 9999 2 1
drop table t1;
s
lave stop
;
s
top slave
;
drop table if exists t2;
create table t2(id int auto_increment primary key, created datetime);
set timestamp=12345;
...
...
@@ -25,7 +25,7 @@ insert into t2 set created=now();
select * from t2;
id created
1 1970-01-01 06:25:45
s
lave start
;
s
tart slave
;
select * from t2;
id created
1 1970-01-01 06:25:45
...
...
mysql-test/r/rpl000003.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1;
create table t1(n int primary key);
insert into t1 values (1),(2),(2);
...
...
mysql-test/r/rpl000004.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
set SQL_LOG_BIN=0;
drop table if exists t1;
create table t1 (word char(20) not null, index(word));
...
...
mysql-test/r/rpl000005.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1;
CREATE TABLE t1 (name varchar(64), age smallint(3));
INSERT INTO t1 SET name='Andy', age=31;
...
...
mysql-test/r/rpl000006.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
set SQL_LOG_BIN=0,timestamp=200006;
drop table if exists t1;
create table t1(t timestamp not null,a char(1));
...
...
mysql-test/r/rpl000007.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists foo;
create table foo (n int);
insert into foo values(4);
...
...
mysql-test/r/rpl000008.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
use test;
drop table if exists foo;
create table foo (n int);
...
...
mysql-test/r/rpl000009.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop database if exists foo;
create database foo;
drop database if exists bar;
...
...
mysql-test/r/rpl000010.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1;
drop table if exists t1;
create table t1 (n int not null auto_increment primary key);
...
...
mysql-test/r/rpl000011.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1;
create table t1 (n int);
insert into t1 values(1);
s
lave stop
;
s
lave start
;
s
top slave
;
s
tart slave
;
insert into t1 values(2);
select * from t1;
n
...
...
mysql-test/r/rpl000012.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1,t2,t3;
create table t2 (n int);
create temporary table t1 (n int);
...
...
mysql-test/r/rpl000013.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t2;
create table t2(n int);
create temporary table t1 (n int);
...
...
mysql-test/r/rpl000015.result
View file @
62f36f02
...
...
@@ -14,7 +14,7 @@ master_password='',master_port=MASTER_PORT;
show slave status;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 4 slave-relay-bin.001 4 No No 0 0 0 4
s
lave start
;
s
tart slave
;
show slave status;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 7 master-bin.001 79 slave-relay-bin.001 120 master-bin.001 Yes Yes 0 0 79 120
...
...
mysql-test/r/rpl000017.result
View file @
62f36f02
reset master;
grant replication slave on *.* to replicate@localhost identified by 'aaaaaaaaaaaaaaab';
grant replication slave on *.* to replicate@127.0.0.1 identified by 'aaaaaaaaaaaaaaab';
s
lave start
;
s
tart slave
;
drop table if exists t1;
create table t1(n int);
insert into t1 values(24);
...
...
mysql-test/r/rpl000018.result
View file @
62f36f02
reset slave;
s
lave start
;
s
tart slave
;
show master logs;
Log_name
master-bin.001
...
...
mysql-test/r/rpl_alter.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop database if exists d1;
create database d1;
create table d1.t1 ( n int);
...
...
mysql-test/r/rpl_empty_master_crash.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1;
show slave status;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
...
...
mysql-test/r/rpl_failsafe.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 1
...
...
@@ -17,14 +17,14 @@ rpl_recovery_rank 2
show status like 'Rpl_status';
Variable_name Value
Rpl_status ACTIVE_SLAVE
s
lave start
;
s
tart slave
;
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 3
show status like 'Rpl_status';
Variable_name Value
Rpl_status ACTIVE_SLAVE
s
lave start
;
s
tart slave
;
show variables like 'rpl_recovery_rank';
Variable_name Value
rpl_recovery_rank 4
...
...
mysql-test/r/rpl_flush_log_loop.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=MASTER_PORT;
s
lave start
;
s
lave stop
;
s
tart slave
;
s
top slave
;
change master to master_host='127.0.0.1',master_user='root',
master_password='',master_port=SLAVE_PORT;
s
lave start
;
s
tart slave
;
flush logs;
show slave status;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
...
...
mysql-test/r/rpl_get_lock.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
create table t1(n int);
insert into t1 values(get_lock("lock",2));
select get_lock("lock",2);
...
...
mysql-test/r/rpl_log.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
lave stop
;
s
tart slave
;
s
top slave
;
reset master;
reset slave;
reset master;
...
...
@@ -36,9 +36,9 @@ show binlog events from 79 limit 2,1;
Log_name Pos Event_type Server_id Orig_log_pos Info
master-bin.001 200 Query 1 200 use `test`; insert into t1 values (NULL)
flush logs;
s
lave start
;
s
tart slave
;
flush logs;
s
lave stop
;
s
top slave
;
create table t1 (n int);
insert into t1 values (1);
drop table t1;
...
...
@@ -63,7 +63,7 @@ show master logs;
Log_name
master-bin.001
master-bin.002
s
lave start
;
s
tart slave
;
show master logs;
Log_name
slave-bin.001
...
...
mysql-test/r/rpl_log_pos.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
show master status;
File Position Binlog_do_db Binlog_ignore_db
master-bin.001 79
...
...
@@ -11,17 +11,17 @@ show slave status;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.001 79 slave-relay-bin.002 120 master-bin.001 Yes Yes 0 0 79 124
change master to master_log_pos=73;
s
lave stop
;
s
top slave
;
change master to master_log_pos=73;
show slave status;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.001 73 slave-relay-bin.001 4 master-bin.001 No No 0 0 73 4
s
lave start
;
s
tart slave
;
show slave status;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.001 73 slave-relay-bin.001 4 master-bin.001 No Yes 0 0 73 4
change master to master_log_pos=173;
s
lave start
;
s
tart slave
;
show slave status;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
127.0.0.1 root MASTER_PORT 1 master-bin.001 173 slave-relay-bin.001 4 master-bin.001 No Yes 0 0 173 4
...
...
@@ -33,7 +33,7 @@ drop table if exists t1;
create table t1 (n int);
insert into t1 values (1),(2),(3);
change master to master_log_pos=79;
s
lave start
;
s
tart slave
;
select * from t1;
n
1
...
...
mysql-test/r/rpl_mystery22.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
create table t1(n int auto_increment primary key);
insert into t1 values (2);
insert into t1 values(NULL);
insert into t1 values(NULL);
delete from t1 where n = 2;
s
lave start
;
s
lave stop
;
s
tart slave
;
s
top slave
;
create table t2(n int);
drop table t2;
insert into t1 values(NULL);
s
lave start
;
s
tart slave
;
select * from t1;
n
1
...
...
mysql-test/r/rpl_redirect.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
SHOW SLAVE STATUS;
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 Last_errno Last_error Skip_counter Exec_master_log_pos Relay_log_space
SHOW SLAVE HOSTS;
...
...
mysql-test/r/rpl_rotate_logs.result
View file @
62f36f02
s
lave start
;
s
tart slave
;
Could not initialize master info structure, check permisions on master.info
s
lave start
;
s
tart slave
;
Could not initialize master info structure, check permisions on master.info
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
Could not initialize master info
reset slave;
change master to master_host='127.0.0.1',master_port=MASTER_PORT, master_user='root';
reset master;
s
lave start
;
s
tart slave
;
drop table if exists t1, t2, t3, t4;
create temporary table temp_table (a char(80) not null);
insert into temp_table values ("testing temporary tables");
...
...
@@ -39,7 +39,7 @@ insert into t2 values(1234);
set insert_id=1234;
insert into t2 values(NULL);
set global sql_slave_skip_counter=1;
s
lave start
;
s
tart slave
;
purge master logs to 'master-bin.003';
show master logs;
Log_name
...
...
mysql-test/r/rpl_skip_error.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
drop table if exists t1;
create table t1 (n int not null primary key);
insert into t1 values (1);
...
...
mysql-test/r/rpl_sporadic_master.result
View file @
62f36f02
s
lave stop
;
s
top slave
;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
s
lave start
;
s
tart slave
;
create table t2(n int);
create table t1(n int not null auto_increment primary key);
insert into t1 values (NULL),(NULL);
truncate table t1;
insert into t1 values (4),(NULL);
s
lave stop
;
s
lave start
;
s
top slave
;
s
tart slave
;
insert into t1 values (NULL),(NULL);
flush logs;
truncate table t1;
...
...
mysql-test/t/rpl000001.test
View file @
62f36f02
...
...
@@ -12,11 +12,11 @@ select * from t1;
save_master_pos
;
connection
slave
;
sync_with_master
;
s
lave
stop
;
s
top
slave
;
connection
master
;
set
password
for
root
@
"localhost"
=
password
(
'foo'
);
connection
slave
;
s
lave
start
;
s
tart
slave
;
connection
master
;
#
# Give slave time to do at last one failed connect retry
...
...
@@ -43,7 +43,7 @@ sync_with_master;
connection
master
;
reset
master
;
connection
slave
;
s
lave
stop
;
s
top
slave
;
reset
slave
;
connection
master
;
...
...
@@ -62,7 +62,7 @@ enable_query_log;
# Try to cause a large relay log lag on the slave
connection
slave
;
select
get_lock
(
"hold_slave"
,
10
);
s
lave
start
;
s
tart
slave
;
#hope this is long enough for I/O thread to fetch over 16K relay log data
sleep
3
;
select
release_lock
(
"hold_slave"
);
...
...
@@ -100,7 +100,7 @@ wait_for_slave_to_stop;
# show slave status;
set
global
sql_slave_skip_counter
=
1
;
s
lave
start
;
s
tart
slave
;
select
count
(
*
)
from
t1
;
connection
master1
;
drop
table
t1
;
...
...
mysql-test/t/rpl000002.test
View file @
62f36f02
...
...
@@ -3,18 +3,14 @@ drop table if exists t1;
create
table
t1
(
n
int
auto_increment
primary
key
);
set
insert_id
=
2000
;
insert
into
t1
values
(
NULL
),(
NULL
),(
NULL
);
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
select
*
from
t1
;
connection
master
;
--
replace_result
$SLAVE_MYPORT
9999
show
slave
hosts
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
slave
stop
;
sync_slave_with_master
;
stop
slave
;
connection
master
;
drop
table
if
exists
t2
;
create
table
t2
(
id
int
auto_increment
primary
key
,
created
datetime
);
...
...
@@ -23,11 +19,9 @@ insert into t2 set created=now();
select
*
from
t2
;
save_master_pos
;
connection
slave
;
s
lave
start
;
s
tart
slave
;
sync_with_master
;
select
*
from
t2
;
connection
master
;
drop
table
t2
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
mysql-test/t/rpl000011.test
View file @
62f36f02
...
...
@@ -2,20 +2,14 @@ source include/master-slave.inc;
drop
table
if
exists
t1
;
create
table
t1
(
n
int
);
insert
into
t1
values
(
1
);
save_master_pos
;
connection
slave
;
sync_with_master
;
slave
stop
;
slave
start
;
sync_slave_with_master
;
stop
slave
;
start
slave
;
connection
master
;
insert
into
t1
values
(
2
);
save_master_pos
;
connection
slave
;
#let slave catch up
sync_with_master
;
sync_
slave_
with_master
;
select
*
from
t1
;
connection
master
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
mysql-test/t/rpl000015.test
View file @
62f36f02
...
...
@@ -18,7 +18,7 @@ eval change master to master_host='127.0.0.1',master_user='root',
master_password
=
''
,
master_port
=
$MASTER_MYPORT
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
show
slave
status
;
s
lave
start
;
s
tart
slave
;
sync_with_master
;
--
replace_result
$MASTER_MYPORT
MASTER_PORT
show
slave
status
;
...
...
@@ -26,12 +26,8 @@ connection master;
drop
table
if
exists
t1
;
create
table
t1
(
n
int
);
insert
into
t1
values
(
10
),(
45
),(
90
);
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
select
*
from
t1
;
connection
master
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
mysql-test/t/rpl000017.test
View file @
62f36f02
...
...
@@ -5,17 +5,13 @@ reset master;
grant
replication
slave
on
*.*
to
replicate
@
localhost
identified
by
'aaaaaaaaaaaaaaab'
;
grant
replication
slave
on
*.*
to
replicate
@
127.0
.
0.1
identified
by
'aaaaaaaaaaaaaaab'
;
connection
slave
;
s
lave
start
;
s
tart
slave
;
connection
master
;
drop
table
if
exists
t1
;
create
table
t1
(
n
int
);
insert
into
t1
values
(
24
);
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
select
*
from
t1
;
connection
master
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
mysql-test/t/rpl000018.test
View file @
62f36f02
...
...
@@ -10,18 +10,14 @@ server_stop master;
server_start
master
;
connection
slave
;
reset
slave
;
s
lave
start
;
s
tart
slave
;
connection
master
;
show
master
logs
;
drop
table
if
exists
t1
;
create
table
t1
(
n
int
);
insert
into
t1
values
(
3351
);
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
select
*
from
t1
;
connection
master
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
mysql-test/t/rpl_failsafe.test
View file @
62f36f02
...
...
@@ -7,18 +7,16 @@ show variables like 'rpl_recovery_rank';
show
status
like
'Rpl_status'
;
create
table
t1
(
n
int
);
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
show
variables
like
'rpl_recovery_rank'
;
show
status
like
'Rpl_status'
;
connection
slave_sec
;
s
lave
start
;
s
tart
slave
;
sync_with_master
;
show
variables
like
'rpl_recovery_rank'
;
show
status
like
'Rpl_status'
;
connection
slave_ter
;
s
lave
start
;
s
tart
slave
;
sync_with_master
;
show
variables
like
'rpl_recovery_rank'
;
show
status
like
'Rpl_status'
;
mysql-test/t/rpl_flush_log_loop.test
View file @
62f36f02
...
...
@@ -7,13 +7,13 @@ connection slave;
--
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
;
s
lave
start
;
s
tart
slave
;
connection
master
;
s
lave
stop
;
s
top
slave
;
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
eval
change
master
to
master_host
=
'127.0.0.1'
,
master_user
=
'root'
,
master_password
=
''
,
master_port
=
$SLAVE_MYPORT
;
s
lave
start
;
s
tart
slave
;
flush
logs
;
sleep
5
;
--
replace_result
$SLAVE_MYPORT
SLAVE_PORT
...
...
mysql-test/t/rpl_log.test
View file @
62f36f02
...
...
@@ -2,7 +2,7 @@ source include/master-slave.inc;
#clean up slave binlogs
connection
slave
;
s
lave
stop
;
s
top
slave
;
reset
master
;
reset
slave
;
let
$VERSION
=
`select version()`
;
...
...
@@ -26,10 +26,10 @@ flush logs;
save_master_pos
;
connection
slave
;
s
lave
start
;
s
tart
slave
;
sync_with_master
;
flush
logs
;
s
lave
stop
;
s
top
slave
;
connection
master
;
# Create some entries for second log
...
...
@@ -43,7 +43,7 @@ show binlog events in 'master-bin.002';
show
master
logs
;
save_master_pos
;
connection
slave
;
s
lave
start
;
s
tart
slave
;
sync_with_master
;
show
master
logs
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
$VERSION
VERSION
...
...
mysql-test/t/rpl_log_pos.test
View file @
62f36f02
...
...
@@ -3,25 +3,23 @@
#
source
include
/
master
-
slave
.
inc
;
show
master
status
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
show
slave
status
;
change
master
to
master_log_pos
=
73
;
sleep
5
;
s
lave
stop
;
s
top
slave
;
change
master
to
master_log_pos
=
73
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
show
slave
status
;
s
lave
start
;
s
tart
slave
;
sleep
5
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
show
slave
status
;
change
master
to
master_log_pos
=
173
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
s
lave
start
;
s
tart
slave
;
sleep
2
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
show
slave
status
;
...
...
@@ -34,11 +32,9 @@ insert into t1 values (1),(2),(3);
save_master_pos
;
connection
slave
;
change
master
to
master_log_pos
=
79
;
s
lave
start
;
s
tart
slave
;
sync_with_master
;
select
*
from
t1
;
connection
master
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
mysql-test/t/rpl_mystery22.test
View file @
62f36f02
...
...
@@ -4,9 +4,7 @@ source include/master-slave.inc;
# first, cause a duplicate key problem on the slave
create
table
t1
(
n
int
auto_increment
primary
key
);
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
insert
into
t1
values
(
2
);
connection
master
;
insert
into
t1
values
(
NULL
);
...
...
@@ -16,11 +14,11 @@ connection slave;
sleep
3
;
# there is no way around this sleep - we have to wait until
# the slave tries to run the query, fails and aborts slave thread
delete
from
t1
where
n
=
2
;
s
lave
start
;
s
tart
slave
;
sync_with_master
;
#now the buggy slave would be confused on the offset but it can replicate
#in order to make it break, we need to stop/start the slave one more time
s
lave
stop
;
s
top
slave
;
connection
master
;
# to be able to really confuse the slave, we need some non-auto-increment
# events in the log
...
...
@@ -29,7 +27,7 @@ drop table t2;
insert
into
t1
values
(
NULL
);
save_master_pos
;
connection
slave
;
s
lave
start
;
s
tart
slave
;
#now the truth comes out - if the slave is buggy, it will never sync because
#the slave thread is not able to read events
sync_with_master
;
...
...
@@ -37,7 +35,5 @@ select * from t1;
#clean up
connection
master
;
drop
table
t1
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
mysql-test/t/rpl_rotate_logs.test
View file @
62f36f02
...
...
@@ -15,10 +15,10 @@ system cat /dev/null > var/slave-data/master.info;
system
chmod
000
var
/
slave
-
data
/
master
.
info
;
connection
slave
;
--
error
1201
s
lave
start
;
s
tart
slave
;
system
chmod
600
var
/
slave
-
data
/
master
.
info
;
--
error
1201
s
lave
start
;
s
tart
slave
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
# Will get error 13 on Unix systems becasue file is not readable
!
eval
change
master
to
master_host
=
'127.0.0.1'
,
master_port
=
$MASTER_MYPORT
,
master_user
=
'root'
;
...
...
@@ -28,7 +28,7 @@ eval change master to master_host='127.0.0.1',master_port=$MASTER_MYPORT, master
connection
master
;
reset
master
;
connection
slave
;
s
lave
start
;
s
tart
slave
;
connection
master
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
...
...
@@ -40,9 +40,7 @@ create temporary table temp_table (a char(80) not null);
insert
into
temp_table
values
(
"testing temporary tables"
);
create
table
t1
(
s
text
);
insert
into
t1
values
(
'Could not break slave'
),(
'Tried hard'
);
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
show
slave
status
;
select
*
from
t1
;
...
...
@@ -55,9 +53,7 @@ flush logs;
show
master
logs
;
create
table
t3
select
*
from
temp_table
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
select
*
from
t3
;
connection
master
;
...
...
@@ -83,21 +79,17 @@ wait_for_slave_to_stop;
#restart slave skipping one event
set
global
sql_slave_skip_counter
=
1
;
s
lave
start
;
s
tart
slave
;
connection
master
;
save_master_pos
;
#let slave catch up
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
connection
master
;
purge
master
logs
to
'master-bin.003'
;
show
master
logs
;
insert
into
t2
values
(
65
);
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
--
replace_result
3306
MASTER_PORT
9306
MASTER_PORT
3334
MASTER_PORT
3336
MASTER_PORT
show
slave
status
;
select
*
from
t2
;
...
...
@@ -125,8 +117,8 @@ show master logs;
show
master
status
;
save_master_pos
;
connection
slave
;
#s
lave stop
;
#s
lave start
;
#s
top slave
;
#s
tart slave
;
sync_with_master
;
select
*
from
t4
;
...
...
@@ -140,6 +132,4 @@ unlock tables;
#clean up
connection
master
;
drop
table
if
exists
t1
,
t2
,
t3
,
t4
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
mysql-test/t/rpl_sporadic_master.test
View file @
62f36f02
...
...
@@ -9,22 +9,16 @@ insert into t1 values (NULL),(NULL);
truncate
table
t1
;
# We have to use 4 in the following to make this test work with all table types
insert
into
t1
values
(
4
),(
NULL
);
save_master_pos
;
connection
slave
;
sync_with_master
;
slave
stop
;
slave
start
;
sync_slave_with_master
;
stop
slave
;
start
slave
;
connection
master
;
insert
into
t1
values
(
NULL
),(
NULL
);
flush
logs
;
truncate
table
t1
;
insert
into
t1
values
(
10
),(
NULL
),(
NULL
),(
NULL
),(
NULL
),(
NULL
);
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
select
*
from
t1
;
connection
master
;
drop
table
t1
,
t2
;
save_master_pos
;
connection
slave
;
sync_with_master
;
sync_slave_with_master
;
sql/sql_yacc.yy
View file @
62f36f02
...
...
@@ -1413,14 +1413,14 @@ opt_to:
| AS {};
slave:
S
LAVE START_SYM
slave_thread_opts
S
TART_SYM SLAVE
slave_thread_opts
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_START;
lex->type = 0;
}
|
S
LAVE STOP_SYM
slave_thread_opts
S
TOP_SYM SLAVE
slave_thread_opts
{
LEX *lex=Lex;
lex->sql_command = SQLCOM_SLAVE_STOP;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment