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
aa70d952
Commit
aa70d952
authored
Apr 07, 2008
by
skozlov/ksm@mysql.com/virtop.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
rpl_slave_status.test
Added waiting start/stop slave via primitives.
parent
a5d13561
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
49 additions
and
45 deletions
+49
-45
mysql-test/suite/rpl/r/rpl_slave_status.result
mysql-test/suite/rpl/r/rpl_slave_status.result
+16
-16
mysql-test/suite/rpl/t/rpl_slave_status.test
mysql-test/suite/rpl/t/rpl_slave_status.test
+33
-29
No files found.
mysql-test/suite/rpl/r/rpl_slave_status.result
View file @
aa70d952
...
@@ -4,21 +4,21 @@ reset master;
...
@@ -4,21 +4,21 @@ reset master;
reset slave;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
start slave;
grant replication slave on *.* to rpl@127.0.0.1 identified by
'rpl';
GRANT REPLICATION SLAVE ON *.* TO rpl@127.0.0.1 IDENTIFIED BY
'rpl';
stop slave
;
STOP SLAVE
;
change master to
master_user='rpl',master_password='rpl';
CHANGE MASTER TO
master_user='rpl',master_password='rpl';
start slave
;
START SLAVE
;
drop table if exists
t1;
DROP TABLE IF EXISTS
t1;
create table
t1 (n int);
CREATE TABLE
t1 (n int);
insert into t1 values
(1);
INSERT INTO t1 VALUES
(1);
select * from
t1;
SELECT * FROM
t1;
n
n
1
1
delete from mysql.user where
user='rpl';
DELETE FROM mysql.user WHERE
user='rpl';
flush privileges
;
FLUSH PRIVILEGES
;
stop slave
;
STOP SLAVE
;
start slave
;
START SLAVE
;
show slave status
;
SHOW SLAVE STATUS
;
Slave_IO_State #
Slave_IO_State #
Master_Host 127.0.0.1
Master_Host 127.0.0.1
Master_User rpl
Master_User rpl
...
@@ -57,6 +57,6 @@ Last_IO_Errno #
...
@@ -57,6 +57,6 @@ Last_IO_Errno #
Last_IO_Error #
Last_IO_Error #
Last_SQL_Errno 0
Last_SQL_Errno 0
Last_SQL_Error
Last_SQL_Error
drop table
t1;
DROP TABLE
t1;
delete from mysql.user where
user='rpl';
DELETE FROM mysql.user WHERE
user='rpl';
drop table
t1;
DROP TABLE
t1;
mysql-test/suite/rpl/t/rpl_slave_status.test
View file @
aa70d952
--
source
include
/
master
-
slave
.
inc
############################################################################
############################################################################
# Test case for BUG#10780
# Test case for BUG#10780
#
#
# REQUIREMENT
# REQUIREMENT
# A slave without replication privileges should have Slave_IO_Running = No
# A slave without replication privileges should have Slave_IO_Running = No
############################################################################
--
source
include
/
master
-
slave
.
inc
# 1. Create new replication user
# 1. Create new replication user
connection
master
;
--
connection
master
grant
replication
slave
on
*.*
to
rpl
@
127.0
.
0.1
identified
by
'rpl'
;
GRANT
REPLICATION
SLAVE
ON
*.*
TO
rpl
@
127.0
.
0.1
IDENTIFIED
BY
'rpl'
;
connection
slave
;
--
connection
slave
stop
slave
;
STOP
SLAVE
;
change
master
to
master_user
=
'rpl'
,
master_password
=
'rpl'
;
--
source
include
/
wait_for_slave_to_stop
.
inc
start
slave
;
CHANGE
MASTER
TO
master_user
=
'rpl'
,
master_password
=
'rpl'
;
START
SLAVE
;
--
source
include
/
wait_for_slave_to_start
.
inc
# 2. Do replication as new user
# 2. Do replication as new user
connection
master
;
--
connection
master
--
disable_warnings
--
disable_warnings
drop
table
if
exists
t1
;
DROP
TABLE
IF
EXISTS
t1
;
--
enable_warnings
--
enable_warnings
create
table
t1
(
n
int
);
CREATE
TABLE
t1
(
n
int
);
insert
into
t1
values
(
1
);
INSERT
INTO
t1
VALUES
(
1
);
save_master_pos
;
--
sync_slave_with_master
connection
slave
;
SELECT
*
FROM
t1
;
sync_with_master
;
select
*
from
t1
;
# 3. Delete new replication user
# 3. Delete new replication user
connection
master
;
--
connection
master
delete
from
mysql
.
user
where
user
=
'rpl'
;
DELETE
FROM
mysql
.
user
WHERE
user
=
'rpl'
;
flush
privileges
;
FLUSH
PRIVILEGES
;
connection
slave
;
--
connection
slave
# 4. Restart slave without privileges
# 4. Restart slave without privileges
# (slave.err will contain access denied error for this START SLAVE command)
# (slave.err will contain access denied error for this START SLAVE command)
stop
slave
;
STOP
SLAVE
;
start
slave
;
--
source
include
/
wait_for_slave_to_stop
.
inc
START
SLAVE
;
--
let
$slave_param
=
Slave_SQL_Running
--
let
$slave_param_value
=
Yes
--
source
include
/
wait_for_slave_param
.
inc
# 5. Make sure Slave_IO_Running = No
# 5. Make sure Slave_IO_Running = No
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
--
replace_result
$MASTER_MYPORT
MASTER_MYPORT
...
@@ -44,16 +48,16 @@ start slave;
...
@@ -44,16 +48,16 @@ start slave;
# "Connecting to master" or "Waiting for master update"
# "Connecting to master" or "Waiting for master update"
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 35 # 36 #
--
replace_column
1
# 7 # 8 # 9 # 22 # 23 # 35 # 36 #
--
vertical_results
--
vertical_results
show
slave
status
;
SHOW
SLAVE
STATUS
;
# Cleanup (Note that slave IO thread is not running)
# Cleanup (Note that slave IO thread is not running)
connection
slave
;
--
connection
slave
drop
table
t1
;
DROP
TABLE
t1
;
delete
from
mysql
.
user
where
user
=
'rpl'
;
DELETE
FROM
mysql
.
user
WHERE
user
=
'rpl'
;
# cleanup: slave io thread has been stopped "irrecoverably"
# cleanup: slave io thread has been stopped "irrecoverably"
# so we clean up mess manually
# so we clean up mess manually
connection
master
;
--
connection
master
drop
table
t1
;
DROP
TABLE
t1
;
#
e
nd of 4.1 tests
#
E
nd of 4.1 tests
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