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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
bbb9054c
Commit
bbb9054c
authored
Jun 13, 2007
by
jmiller/ndbdev@ndb08.mysql.com
Browse files
Options
Browse Files
Download
Plain Diff
Merge jmiller@bk-internal.mysql.com:/home/bk/mysql-5.1-maint
into mysql.com:/data2/mysql-5.1-maint
parents
5ee2d957
af62cf80
Changes
14
Hide whitespace changes
Inline
Side-by-side
Showing
14 changed files
with
161 additions
and
26 deletions
+161
-26
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
+9
-9
mysql-test/extra/rpl_tests/rpl_loaddata.test
mysql-test/extra/rpl_tests/rpl_loaddata.test
+4
-4
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
+5
-5
mysql-test/extra/rpl_tests/rpl_stm_000001.test
mysql-test/extra/rpl_tests/rpl_stm_000001.test
+1
-1
mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
+1
-1
mysql-test/include/wait_for_slave_io_to_stop.inc
mysql-test/include/wait_for_slave_io_to_stop.inc
+33
-0
mysql-test/include/wait_for_slave_sql_to_stop.inc
mysql-test/include/wait_for_slave_sql_to_stop.inc
+30
-0
mysql-test/include/wait_for_slave_to_start.inc
mysql-test/include/wait_for_slave_to_start.inc
+35
-0
mysql-test/include/wait_for_slave_to_stop.inc
mysql-test/include/wait_for_slave_to_stop.inc
+37
-0
mysql-test/t/rpl_critical_errors.test
mysql-test/t/rpl_critical_errors.test
+1
-1
mysql-test/t/rpl_dual_pos_advance.test
mysql-test/t/rpl_dual_pos_advance.test
+1
-1
mysql-test/t/rpl_known_bugs_detection.test
mysql-test/t/rpl_known_bugs_detection.test
+2
-2
mysql-test/t/rpl_rotate_logs.test
mysql-test/t/rpl_rotate_logs.test
+1
-1
mysql-test/t/rpl_row_inexist_tbl.test
mysql-test/t/rpl_row_inexist_tbl.test
+1
-1
No files found.
mysql-test/extra/rpl_tests/rpl_extraSlave_Col.test
View file @
bbb9054c
...
@@ -138,7 +138,7 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
...
@@ -138,7 +138,7 @@ INSERT INTO t3 () VALUES(@b1,2,'Kyle, TEX'),(@b1,1,'JOE AUSTIN'),(@b1,4,'QA TEST
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
--
echo
********************************************
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -183,7 +183,7 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
...
@@ -183,7 +183,7 @@ INSERT INTO t4 () VALUES(100.22,2,'Kyle, TEX'),(200.26,1,'JOE AUSTIN'),
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
--
echo
********************************************
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -228,7 +228,7 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
...
@@ -228,7 +228,7 @@ INSERT INTO t5 () VALUES(1,'Kyle',200.23,1,'b1b1',23.00098),
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
--
echo
********************************************
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -274,7 +274,7 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
...
@@ -274,7 +274,7 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
--
echo
********************************************
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -427,7 +427,7 @@ sync_slave_with_master;
...
@@ -427,7 +427,7 @@ sync_slave_with_master;
#connection slave;
#connection slave;
#--echo *** Select from T9 ***
#--echo *** Select from T9 ***
#
wait_for_slave_to_stop;
#
--source include/wait_for_slave_sql_to_stop.inc
#--replace_result $MASTER_MYPORT MASTER_PORT
#--replace_result $MASTER_MYPORT MASTER_PORT
#--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
#--replace_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
#--query_vertical SHOW SLAVE STATUS
#--query_vertical SHOW SLAVE STATUS
...
@@ -469,7 +469,7 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
...
@@ -469,7 +469,7 @@ INSERT INTO t10 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
--
echo
********************************************
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -513,7 +513,7 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
...
@@ -513,7 +513,7 @@ INSERT INTO t11 () VALUES(1,@b1,'Kyle'),(2,@b1,'JOE'),(3,@b1,'QA');
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
--
echo
********************************************
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -723,7 +723,7 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
...
@@ -723,7 +723,7 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
--
echo
***
Expect
slave
to
fail
with
Error
1060
***
--
echo
***
Expect
slave
to
fail
with
Error
1060
***
--
echo
********************************************
--
echo
********************************************
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -832,7 +832,7 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
...
@@ -832,7 +832,7 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
--
echo
********************************************
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
...
mysql-test/extra/rpl_tests/rpl_loaddata.test
View file @
bbb9054c
...
@@ -68,7 +68,7 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
...
@@ -68,7 +68,7 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
# The SQL slave thread should be stopped now.
# The SQL slave thread should be stopped now.
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
# Skip the bad event and see if error is cleared in SHOW SLAVE STATUS by START
# Skip the bad event and see if error is cleared in SHOW SLAVE STATUS by START
# SLAVE, even though we are not executing any event (as sql_slave_skip_counter
# SLAVE, even though we are not executing any event (as sql_slave_skip_counter
...
@@ -93,7 +93,7 @@ connection slave;
...
@@ -93,7 +93,7 @@ connection slave;
# The SQL slave thread should be stopped now.
# The SQL slave thread should be stopped now.
# Exec_Master_Log_Pos should point to the start of Execute event
# Exec_Master_Log_Pos should point to the start of Execute event
# for last load data.
# for last load data.
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
# CHANGE MASTER and see if error is cleared in SHOW SLAVE STATUS.
# CHANGE MASTER and see if error is cleared in SHOW SLAVE STATUS.
stop
slave
;
stop
slave
;
...
@@ -116,7 +116,7 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
...
@@ -116,7 +116,7 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
# The SQL slave thread should be stopped now.
# The SQL slave thread should be stopped now.
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
# RESET SLAVE and see if error is cleared in SHOW SLAVE STATUS.
stop
slave
;
stop
slave
;
...
@@ -152,7 +152,7 @@ load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
...
@@ -152,7 +152,7 @@ load data infile '../std_data_ln/rpl_loaddata2.dat' into table t2 fields
terminated
by
','
optionally
enclosed
by
'%'
escaped
by
'@'
lines
terminated
by
terminated
by
','
optionally
enclosed
by
'%'
escaped
by
'@'
lines
terminated
by
'\n##\n'
starting
by
'>'
ignore
1
lines
;
'\n##\n'
starting
by
'>'
ignore
1
lines
;
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
drop
table
t2
;
drop
table
t2
;
connection
master
;
connection
master
;
drop
table
t2
;
drop
table
t2
;
...
...
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
View file @
bbb9054c
...
@@ -113,7 +113,7 @@ sync_slave_with_master;
...
@@ -113,7 +113,7 @@ sync_slave_with_master;
connection
master
;
connection
master
;
INSERT
INTO
t1_nodef
VALUES
(
1
,
2
);
INSERT
INTO
t1_nodef
VALUES
(
1
,
2
);
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -127,7 +127,7 @@ sync_slave_with_master;
...
@@ -127,7 +127,7 @@ sync_slave_with_master;
connection
master
;
connection
master
;
INSERT
INTO
t2
VALUES
(
2
,
4
);
INSERT
INTO
t2
VALUES
(
2
,
4
);
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -141,7 +141,7 @@ sync_slave_with_master;
...
@@ -141,7 +141,7 @@ sync_slave_with_master;
connection
master
;
connection
master
;
INSERT
INTO
t4
VALUES
(
4
);
INSERT
INTO
t4
VALUES
(
4
);
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -155,7 +155,7 @@ sync_slave_with_master;
...
@@ -155,7 +155,7 @@ sync_slave_with_master;
connection
master
;
connection
master
;
INSERT
INTO
t5
VALUES
(
5
,
10
,
25
);
INSERT
INTO
t5
VALUES
(
5
,
10
,
25
);
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
@@ -169,7 +169,7 @@ sync_slave_with_master;
...
@@ -169,7 +169,7 @@ sync_slave_with_master;
connection
master
;
connection
master
;
INSERT
INTO
t6
VALUES
(
6
,
12
,
36
);
INSERT
INTO
t6
VALUES
(
6
,
12
,
36
);
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
--
query_vertical
SHOW
SLAVE
STATUS
...
...
mysql-test/extra/rpl_tests/rpl_stm_000001.test
View file @
bbb9054c
...
@@ -98,7 +98,7 @@ reap;
...
@@ -98,7 +98,7 @@ reap;
connection
slave
;
connection
slave
;
# The SQL slave thread should now have stopped because the query was killed on
# The SQL slave thread should now have stopped because the query was killed on
# the master (so it has a non-zero error code in the binlog).
# the master (so it has a non-zero error code in the binlog).
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
# The following test can't be done because the result of Pos will differ
# The following test can't be done because the result of Pos will differ
# on different computers
# on different computers
...
...
mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
View file @
bbb9054c
...
@@ -24,7 +24,7 @@ insert into t1 values(1),(2);
...
@@ -24,7 +24,7 @@ insert into t1 values(1),(2);
drop
table
t1
;
drop
table
t1
;
save_master_pos
;
save_master_pos
;
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
# End of 4.1 tests
# End of 4.1 tests
mysql-test/include/wait_for_slave_io_to_stop.inc
0 → 100644
View file @
bbb9054c
###################################################
#Author: Jeb
#Date: 2007-06-11
#Purpose: used for io errors on the slave. If Slave gets an io
# error, the io trhead should stop
#Details:
# 1) Fill in and setup variables
# 2) loop through looking for
# sql threads to stop
# 3) If loops too long die.
####################################################
connection
slave
;
let
$my_show
=
SHOW
SLAVE
STATUS
;
let
$sql_running
=
Slave_IO_Running
;
let
$row_number
=
1
;
let
$run
=
1
;
let
$counter
=
300
;
while
(
$run
)
{
let
$io_result
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
$row_number
);
if
(
`SELECT '$io_result' = 'No'`
){
let
$run
=
0
;
}
sleep
0.1
;
if
(
!
$counter
){
--
echo
"Failed while waiting for slave IO thread to stop"
SHOW
SLAVE
STATUS
;
exit
;
}
dec
$counter
;
}
mysql-test/include/wait_for_slave_sql_to_stop.inc
0 → 100644
View file @
bbb9054c
###################################################
#Author: Jeb
#Date: 2007-06-11
#Purpose: used for SQL errors on the slave. If Slave gets a sql
# error, the SQL trhead should stop
#Details:
# 1) Fill in and setup variables
# 2) loop through looking for
# sql threads to stop
# 3) If loops too long die.
####################################################
connection
slave
;
let
$row_number
=
1
;
let
$run
=
1
;
let
$counter
=
300
;
while
(
$run
)
{
let
$sql_result
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_SQL_Running
,
$row_number
);
if
(
`SELECT '$sql_result' = 'No'`
){
let
$run
=
0
;
}
sleep
0.1
;
if
(
!
$counter
){
--
echo
"Failed while waiting for slave SQL thread to stop"
SHOW
SLAVE
STATUS
;
exit
;
}
dec
$counter
;
}
mysql-test/include/wait_for_slave_to_start.inc
0 → 100644
View file @
bbb9054c
###################################################
#Author: Jeb
#Date: 2007-06-11
#Purpose: To wait a brief time for slave to start
#Details:
# 1) Fill in and setup variables
# 2) loop through looking for both
# io and sql threads to start
# 3) If loops too long die.
####################################################
connection
slave
;
let
$row_number
=
1
;
let
$run
=
1
;
let
$counter
=
300
;
while
(
$run
)
{
let
$io_result
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
$row_number
);
if
(
`SELECT '$io_result' = 'Yes'`
){
let
$sql_result
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_SQL_Running
,
$row_number
);
if
(
`SELECT '$sql_result' = 'Yes'`
){
let
$run
=
0
;
}
}
sleep
0.1
;
if
(
!
$counter
){
--
echo
"Failed while waiting for slave to start"
SHOW
SLAVE
STATUS
;
exit
;
}
dec
$counter
;
}
mysql-test/include/wait_for_slave_to_stop.inc
0 → 100644
View file @
bbb9054c
###################################################
#Author: Jeb
#Date: 2007-06-11
#Purpose: To replace the mysqltest.c executable
# wait_for_slave_to_stop function and
# return this to the test language.
#Details:
# 1) Fill in and setup variables
# 2) loop through looking for both
# io and sql threads to stop
# 3) If loops too long die.
####################################################
connection
slave
;
let
$row_number
=
1
;
let
$run
=
1
;
let
$counter
=
300
;
while
(
$run
)
{
let
$io_result
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_IO_Running
,
$row_number
);
if
(
`SELECT '$io_result' = 'No'`
){
let
$sql_result
=
query_get_value
(
"SHOW SLAVE STATUS"
,
Slave_SQL_Running
,
$row_number
);
if
(
`SELECT '$sql_result' = 'No'`
){
let
$run
=
0
;
}
}
sleep
0.1
;
if
(
!
$counter
){
--
echo
"Failed while waiting for slave to stop"
SHOW
SLAVE
STATUS
;
exit
;
}
dec
$counter
;
}
mysql-test/t/rpl_critical_errors.test
View file @
bbb9054c
...
@@ -53,7 +53,7 @@ connection slave;
...
@@ -53,7 +53,7 @@ connection slave;
# Here the slave will only stop if the query above actually started
# Here the slave will only stop if the query above actually started
# inserting some rows into t2. Otherwise, it will hang forever.
# inserting some rows into t2. Otherwise, it will hang forever.
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_to_stop
.
inc
# The following should be 0
# The following should be 0
SELECT
COUNT
(
*
)
FROM
t2
;
SELECT
COUNT
(
*
)
FROM
t2
;
...
...
mysql-test/t/rpl_dual_pos_advance.test
View file @
bbb9054c
...
@@ -61,7 +61,7 @@ sync_with_master;
...
@@ -61,7 +61,7 @@ sync_with_master;
# select master_pos_wait("slave-bin.000001",137);
# select master_pos_wait("slave-bin.000001",137);
#
wait_for_slave_to_stop;
#
--source include/wait_for_slave_to_stop.inc
# then BUG#13861 causes t3 to show up below (because stopped too
# then BUG#13861 causes t3 to show up below (because stopped too
# late).
# late).
...
...
mysql-test/t/rpl_known_bugs_detection.test
View file @
bbb9054c
...
@@ -25,7 +25,7 @@ connection master;
...
@@ -25,7 +25,7 @@ connection master;
INSERT
INTO
t1
(
b
)
VALUES
(
1
),(
1
),(
2
)
ON
DUPLICATE
KEY
UPDATE
t1
.
b
=
10
;
INSERT
INTO
t1
(
b
)
VALUES
(
1
),(
1
),(
2
)
ON
DUPLICATE
KEY
UPDATE
t1
.
b
=
10
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_to_stop
.
inc
# show the error message
# show the error message
--
replace_column
1
# 4 # 7 # 8 # 9 # 23 # 33 #
--
replace_column
1
# 4 # 7 # 8 # 9 # 23 # 33 #
--
query_vertical
show
slave
status
;
--
query_vertical
show
slave
status
;
...
@@ -79,7 +79,7 @@ ON DUPLICATE KEY UPDATE
...
@@ -79,7 +79,7 @@ ON DUPLICATE KEY UPDATE
t1
.
field_3
=
t2
.
field_c
;
t1
.
field_3
=
t2
.
field_c
;
SELECT
*
FROM
t1
;
SELECT
*
FROM
t1
;
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_to_stop
.
inc
# show the error message
# show the error message
--
replace_column
1
# 4 # 7 # 8 # 9 # 23 # 33 #
--
replace_column
1
# 4 # 7 # 8 # 9 # 23 # 33 #
--
query_vertical
show
slave
status
;
--
query_vertical
show
slave
status
;
...
...
mysql-test/t/rpl_rotate_logs.test
View file @
bbb9054c
...
@@ -96,7 +96,7 @@ connection master;
...
@@ -96,7 +96,7 @@ connection master;
set
insert_id
=
1234
;
set
insert_id
=
1234
;
insert
into
t2
values
(
NULL
);
insert
into
t2
values
(
NULL
);
connection
slave
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
#restart slave skipping one event
#restart slave skipping one event
set
global
sql_slave_skip_counter
=
1
;
set
global
sql_slave_skip_counter
=
1
;
...
...
mysql-test/t/rpl_row_inexist_tbl.test
View file @
bbb9054c
...
@@ -23,7 +23,7 @@ insert into t1 values (1);
...
@@ -23,7 +23,7 @@ insert into t1 values (1);
connection
slave
;
connection
slave
;
# slave should have stopped because can't find table t1
# slave should have stopped because can't find table t1
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
# see if we have a good error message:
# see if we have a good error message:
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_column
1
# 7 # 8 # 9 # 23 # 33 #
--
replace_column
1
# 7 # 8 # 9 # 23 # 33 #
...
...
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