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
c148eb94
Commit
c148eb94
authored
Jun 13, 2007
by
unknown
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
2cbe8812
b55468d7
Changes
14
Show 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 @
c148eb94
...
...
@@ -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
********************************************
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -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
********************************************
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -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
********************************************
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -274,7 +274,7 @@ INSERT INTO t6 () VALUES(1,'Kyle',200.23,1),
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -427,7 +427,7 @@ sync_slave_with_master;
#connection slave;
#--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_column 1 # 7 # 8 # 9 # 22 # 23 # 33 #
#--query_vertical SHOW SLAVE STATUS
...
...
@@ -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
********************************************
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -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
********************************************
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -723,7 +723,7 @@ ALTER TABLE t15 ADD COLUMN c6 INT AFTER c5;
--
echo
***
Expect
slave
to
fail
with
Error
1060
***
--
echo
********************************************
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -832,7 +832,7 @@ INSERT INTO t17 () VALUES(9223372036854775807,2,'Kyle, TEX');
--
echo
***
Expect
slave
to
fail
with
Error
1522
***
--
echo
********************************************
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
mysql-test/extra/rpl_tests/rpl_loaddata.test
View file @
c148eb94
...
...
@@ -68,7 +68,7 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
save_master_pos
;
connection
slave
;
# 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
# SLAVE, even though we are not executing any event (as sql_slave_skip_counter
...
...
@@ -93,7 +93,7 @@ connection slave;
# The SQL slave thread should be stopped now.
# Exec_Master_Log_Pos should point to the start of Execute event
# 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.
stop
slave
;
...
...
@@ -116,7 +116,7 @@ load data infile '../std_data_ln/rpl_loaddata.dat' into table t1;
save_master_pos
;
connection
slave
;
# 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.
stop
slave
;
...
...
@@ -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
'\n##\n'
starting
by
'>'
ignore
1
lines
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
drop
table
t2
;
connection
master
;
drop
table
t2
;
...
...
mysql-test/extra/rpl_tests/rpl_row_tabledefs.test
View file @
c148eb94
...
...
@@ -113,7 +113,7 @@ sync_slave_with_master;
connection
master
;
INSERT
INTO
t1_nodef
VALUES
(
1
,
2
);
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -127,7 +127,7 @@ sync_slave_with_master;
connection
master
;
INSERT
INTO
t2
VALUES
(
2
,
4
);
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -141,7 +141,7 @@ sync_slave_with_master;
connection
master
;
INSERT
INTO
t4
VALUES
(
4
);
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -155,7 +155,7 @@ sync_slave_with_master;
connection
master
;
INSERT
INTO
t5
VALUES
(
5
,
10
,
25
);
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
@@ -169,7 +169,7 @@ sync_slave_with_master;
connection
master
;
INSERT
INTO
t6
VALUES
(
6
,
12
,
36
);
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
--
replace_result
$MASTER_MYPORT
MASTER_PORT
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 33 #
--
query_vertical
SHOW
SLAVE
STATUS
...
...
mysql-test/extra/rpl_tests/rpl_stm_000001.test
View file @
c148eb94
...
...
@@ -98,7 +98,7 @@ reap;
connection
slave
;
# 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).
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
# on different computers
...
...
mysql-test/extra/rpl_tests/rpl_stm_EE_err2.test
View file @
c148eb94
...
...
@@ -24,7 +24,7 @@ insert into t1 values(1),(2);
drop
table
t1
;
save_master_pos
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
# End of 4.1 tests
mysql-test/include/wait_for_slave_io_to_stop.inc
0 → 100644
View file @
c148eb94
###################################################
#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 @
c148eb94
###################################################
#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 @
c148eb94
###################################################
#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 @
c148eb94
###################################################
#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 @
c148eb94
...
...
@@ -53,7 +53,7 @@ connection slave;
# Here the slave will only stop if the query above actually started
# 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
SELECT
COUNT
(
*
)
FROM
t2
;
...
...
mysql-test/t/rpl_dual_pos_advance.test
View file @
c148eb94
...
...
@@ -61,7 +61,7 @@ sync_with_master;
# 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
# late).
...
...
mysql-test/t/rpl_known_bugs_detection.test
View file @
c148eb94
...
...
@@ -25,7 +25,7 @@ connection master;
INSERT
INTO
t1
(
b
)
VALUES
(
1
),(
1
),(
2
)
ON
DUPLICATE
KEY
UPDATE
t1
.
b
=
10
;
SELECT
*
FROM
t1
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_to_stop
.
inc
# show the error message
--
replace_column
1
# 4 # 7 # 8 # 9 # 23 # 33 #
--
query_vertical
show
slave
status
;
...
...
@@ -79,7 +79,7 @@ ON DUPLICATE KEY UPDATE
t1
.
field_3
=
t2
.
field_c
;
SELECT
*
FROM
t1
;
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_to_stop
.
inc
# show the error message
--
replace_column
1
# 4 # 7 # 8 # 9 # 23 # 33 #
--
query_vertical
show
slave
status
;
...
...
mysql-test/t/rpl_rotate_logs.test
View file @
c148eb94
...
...
@@ -96,7 +96,7 @@ connection master;
set
insert_id
=
1234
;
insert
into
t2
values
(
NULL
);
connection
slave
;
wait_for_slave_to_stop
;
--
source
include
/
wait_for_slave_sql_to_stop
.
inc
#restart slave skipping one event
set
global
sql_slave_skip_counter
=
1
;
...
...
mysql-test/t/rpl_row_inexist_tbl.test
View file @
c148eb94
...
...
@@ -23,7 +23,7 @@ insert into t1 values (1);
connection
slave
;
# 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:
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
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