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
f361b632
Commit
f361b632
authored
Apr 03, 2008
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge bk-internal:/home/bk/mysql-5.1-rpl
into pilot.mysql.com:/data/msvensson/mysql/mysql-5.1-rpl
parents
7674605d
1ed79b8b
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
12 deletions
+20
-12
mysql-test/include/rpl_events.inc
mysql-test/include/rpl_events.inc
+12
-4
mysql-test/suite/rpl/r/rpl_events.result
mysql-test/suite/rpl/r/rpl_events.result
+8
-8
No files found.
mysql-test/include/rpl_events.inc
View file @
f361b632
...
@@ -63,7 +63,9 @@ SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name
...
@@ -63,7 +63,9 @@ SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name
DROP
EVENT
IF
EXISTS
test
.
slave_once
;
DROP
EVENT
IF
EXISTS
test
.
slave_once
;
--
enable_warnings
--
enable_warnings
CREATE
EVENT
test
.
slave_once
ON
SCHEDULE
EVERY
5
MINUTE
DO
# Create an event on slave and check its state. An event shouldn't be executed
# so set start time in 1 hour.
CREATE
EVENT
test
.
slave_once
ON
SCHEDULE
EVERY
5
MINUTE
STARTS
CURRENT_TIMESTAMP
+
INTERVAL
1
HOUR
DO
INSERT
IGNORE
INTO
t1
(
id
,
c
)
VALUES
(
3
,
'from slave_once'
);
INSERT
IGNORE
INTO
t1
(
id
,
c
)
VALUES
(
3
,
'from slave_once'
);
--
echo
"Checking event status on the slave for originator value = slave's server_id"
--
echo
"Checking event status on the slave for originator value = slave's server_id"
...
@@ -82,8 +84,11 @@ connection master;
...
@@ -82,8 +84,11 @@ connection master;
DROP
EVENT
IF
EXISTS
test
.
justonce
;
DROP
EVENT
IF
EXISTS
test
.
justonce
;
--
enable_warnings
--
enable_warnings
# Create an event on master and check its state on slave. An event shouldn't be executed
# so set start time in 1 hour. Check that changes of event statement replicated to slave
--
echo
"Creating event test.er on the master"
--
echo
"Creating event test.er on the master"
CREATE
EVENT
test
.
er
ON
SCHEDULE
EVERY
3
SECOND
DO
CREATE
EVENT
test
.
er
ON
SCHEDULE
EVERY
3
SECOND
STARTS
CURRENT_TIMESTAMP
+
INTERVAL
1
HOUR
DO
INSERT
IGNORE
INTO
t1
(
id
,
c
)
VALUES
(
4
,
'from er'
);
INSERT
IGNORE
INTO
t1
(
id
,
c
)
VALUES
(
4
,
'from er'
);
--
echo
"Checking event status on the master"
--
echo
"Checking event status on the master"
...
@@ -96,7 +101,7 @@ SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND
...
@@ -96,7 +101,7 @@ SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND
connection
master
;
connection
master
;
--
echo
"Altering event test.er on the master"
--
echo
"Altering event test.er on the master"
ALTER
EVENT
test
.
er
ON
SCHEDULE
EVERY
5
SECOND
DO
ALTER
EVENT
test
.
er
ON
SCHEDULE
EVERY
5
SECOND
STARTS
CURRENT_TIMESTAMP
+
INTERVAL
1
HOUR
DO
INSERT
IGNORE
INTO
t1
(
id
,
c
)
VALUES
(
5
,
'from alter er'
);
INSERT
IGNORE
INTO
t1
(
id
,
c
)
VALUES
(
5
,
'from alter er'
);
--
echo
"Checking event status on the master"
--
echo
"Checking event status on the master"
...
@@ -124,8 +129,11 @@ SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
...
@@ -124,8 +129,11 @@ SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
# test the DISABLE ON SLAVE for setting event SLAVESIDE_DISABLED as status
# test the DISABLE ON SLAVE for setting event SLAVESIDE_DISABLED as status
# on CREATE EVENT
# on CREATE EVENT
# Create an event on slave and check its status. An event shouldn't be executed
# so set start time in 1 hour.
--
echo
"Creating event test.slave_terminate on the slave"
--
echo
"Creating event test.slave_terminate on the slave"
CREATE
EVENT
test
.
slave_terminate
ON
SCHEDULE
EVERY
3
SECOND
DO
CREATE
EVENT
test
.
slave_terminate
ON
SCHEDULE
EVERY
3
SECOND
STARTS
CURRENT_TIMESTAMP
+
INTERVAL
1
HOUR
DO
INSERT
IGNORE
INTO
t1
(
id
,
c
)
VALUES
(
6
,
'from slave_terminate'
);
INSERT
IGNORE
INTO
t1
(
id
,
c
)
VALUES
(
6
,
'from slave_terminate'
);
--
echo
"Checking event status on the slave"
--
echo
"Checking event status on the slave"
...
...
mysql-test/suite/rpl/r/rpl_events.result
View file @
f361b632
...
@@ -40,7 +40,7 @@ db name status originator
...
@@ -40,7 +40,7 @@ db name status originator
test justonce SLAVESIDE_DISABLED 1
test justonce SLAVESIDE_DISABLED 1
"Dropping event test.slave_once on the slave"
"Dropping event test.slave_once on the slave"
DROP EVENT IF EXISTS test.slave_once;
DROP EVENT IF EXISTS test.slave_once;
CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO
CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE
STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once');
INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once');
"Checking event status on the slave for originator value = slave's server_id"
"Checking event status on the slave for originator value = slave's server_id"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
...
@@ -51,7 +51,7 @@ DROP EVENT IF EXISTS test.slave_once;
...
@@ -51,7 +51,7 @@ DROP EVENT IF EXISTS test.slave_once;
"Dropping event test.justonce on the master"
"Dropping event test.justonce on the master"
DROP EVENT IF EXISTS test.justonce;
DROP EVENT IF EXISTS test.justonce;
"Creating event test.er on the master"
"Creating event test.er on the master"
CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO
CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND
STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er');
INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er');
"Checking event status on the master"
"Checking event status on the master"
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
...
@@ -62,7 +62,7 @@ SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND
...
@@ -62,7 +62,7 @@ SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND
db name status originator body
db name status originator body
test er SLAVESIDE_DISABLED 1 INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er')
test er SLAVESIDE_DISABLED 1 INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er')
"Altering event test.er on the master"
"Altering event test.er on the master"
ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO
ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND
STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er');
INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er');
"Checking event status on the master"
"Checking event status on the master"
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
...
@@ -81,7 +81,7 @@ db name status originator
...
@@ -81,7 +81,7 @@ db name status originator
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
db name status originator
db name status originator
"Creating event test.slave_terminate on the slave"
"Creating event test.slave_terminate on the slave"
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DO
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND
STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate');
INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate');
"Checking event status on the slave"
"Checking event status on the slave"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
...
@@ -135,7 +135,7 @@ db name status originator
...
@@ -135,7 +135,7 @@ db name status originator
test justonce SLAVESIDE_DISABLED 1
test justonce SLAVESIDE_DISABLED 1
"Dropping event test.slave_once on the slave"
"Dropping event test.slave_once on the slave"
DROP EVENT IF EXISTS test.slave_once;
DROP EVENT IF EXISTS test.slave_once;
CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE DO
CREATE EVENT test.slave_once ON SCHEDULE EVERY 5 MINUTE
STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once');
INSERT IGNORE INTO t1(id, c) VALUES (3, 'from slave_once');
"Checking event status on the slave for originator value = slave's server_id"
"Checking event status on the slave for originator value = slave's server_id"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_once';
...
@@ -146,7 +146,7 @@ DROP EVENT IF EXISTS test.slave_once;
...
@@ -146,7 +146,7 @@ DROP EVENT IF EXISTS test.slave_once;
"Dropping event test.justonce on the master"
"Dropping event test.justonce on the master"
DROP EVENT IF EXISTS test.justonce;
DROP EVENT IF EXISTS test.justonce;
"Creating event test.er on the master"
"Creating event test.er on the master"
CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND DO
CREATE EVENT test.er ON SCHEDULE EVERY 3 SECOND
STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er');
INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er');
"Checking event status on the master"
"Checking event status on the master"
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
...
@@ -157,7 +157,7 @@ SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND
...
@@ -157,7 +157,7 @@ SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND
db name status originator body
db name status originator body
test er SLAVESIDE_DISABLED 1 INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er')
test er SLAVESIDE_DISABLED 1 INSERT IGNORE INTO t1(id, c) VALUES (4, 'from er')
"Altering event test.er on the master"
"Altering event test.er on the master"
ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND DO
ALTER EVENT test.er ON SCHEDULE EVERY 5 SECOND
STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er');
INSERT IGNORE INTO t1(id, c) VALUES (5, 'from alter er');
"Checking event status on the master"
"Checking event status on the master"
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
SELECT db, name, status, originator, body FROM mysql.event WHERE db = 'test' AND name = 'er';
...
@@ -176,7 +176,7 @@ db name status originator
...
@@ -176,7 +176,7 @@ db name status originator
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
db name status originator
db name status originator
"Creating event test.slave_terminate on the slave"
"Creating event test.slave_terminate on the slave"
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND DO
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND
STARTS CURRENT_TIMESTAMP + INTERVAL 1 HOUR
DO
INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate');
INSERT IGNORE INTO t1(id, c) VALUES (6, 'from slave_terminate');
"Checking event status on the slave"
"Checking event status on the slave"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
...
...
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