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
a2b6a710
Commit
a2b6a710
authored
Mar 30, 2007
by
unknown
Browse files
Options
Browse Files
Download
Plain Diff
Merge mysql_cab_desk.:C:/source/c++/mysql-5.1-new-rpl
into mysql_cab_desk.:C:/source/c++/mysql-5.1_WL_3629_kostja
parents
1dc8c102
6ebd6ebd
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
43 additions
and
8 deletions
+43
-8
mysql-test/include/rpl_events.inc
mysql-test/include/rpl_events.inc
+16
-2
mysql-test/r/rpl_events.result
mysql-test/r/rpl_events.result
+26
-4
sql/lex.h
sql/lex.h
+0
-1
sql/sql_yacc.yy
sql/sql_yacc.yy
+1
-1
No files found.
mysql-test/include/rpl_events.inc
View file @
a2b6a710
...
...
@@ -15,8 +15,7 @@ drop table if exists t1,t2;
eval
CREATE
TABLE
`t1`
(
`id`
INT
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`c`
VARCHAR
(
50
)
NOT
NULL
,
`ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
`ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
$engine_type
DEFAULT
CHARSET
=
utf8
;
...
...
@@ -99,6 +98,21 @@ sync_slave_with_master;
--
echo
"in the slave"
SELECT
db
,
name
,
status
,
originator
FROM
mysql
.
event
WHERE
db
=
'test'
;
# test the DISABLE ON SLAVE for setting event SLAVESIDE_DISABLED as status
# on CREATE EVENT
CREATE
EVENT
test
.
slave_terminate
ON
SCHEDULE
EVERY
3
SECOND
DO
INSERT
INTO
t1
(
c
)
VALUES
(
'from slave_terminate'
);
SELECT
db
,
name
,
status
,
originator
FROM
mysql
.
event
WHERE
db
=
'test'
AND
name
=
'slave_terminate'
;
DROP
EVENT
test
.
slave_terminate
;
CREATE
EVENT
test
.
slave_terminate
ON
SCHEDULE
EVERY
3
SECOND
DISABLE
ON
SLAVE
DO
INSERT
INTO
t1
(
c
)
VALUES
(
'from slave_terminate'
);
SELECT
db
,
name
,
status
,
originator
FROM
mysql
.
event
WHERE
db
=
'test'
AND
name
=
'slave_terminate'
;
DROP
EVENT
test
.
slave_terminate
;
--
echo
"in the master"
connection
master
;
DROP
TABLE
t1
;
...
...
mysql-test/r/rpl_events.result
View file @
a2b6a710
...
...
@@ -11,8 +11,7 @@ drop table if exists t1,t2;
CREATE TABLE `t1` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`c` VARCHAR(50) NOT NULL,
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP,
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 (c) VALUES ('manually');
...
...
@@ -69,6 +68,18 @@ db name status originator
"in the slave"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
db name status originator
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND
DO INSERT INTO t1(c) VALUES ('from slave_terminate');
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
db name status originator
test slave_terminate ENABLED 2
DROP EVENT test.slave_terminate;
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND
DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate');
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
db name status originator
test slave_terminate SLAVESIDE_DISABLED 2
DROP EVENT test.slave_terminate;
"in the master"
DROP TABLE t1;
set binlog_format=statement;
...
...
@@ -77,8 +88,7 @@ drop table if exists t1,t2;
CREATE TABLE `t1` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`c` VARCHAR(50) NOT NULL,
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
CURRENT_TIMESTAMP,
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 (c) VALUES ('manually');
...
...
@@ -135,5 +145,17 @@ db name status originator
"in the slave"
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test';
db name status originator
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND
DO INSERT INTO t1(c) VALUES ('from slave_terminate');
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
db name status originator
test slave_terminate ENABLED 2
DROP EVENT test.slave_terminate;
CREATE EVENT test.slave_terminate ON SCHEDULE EVERY 3 SECOND
DISABLE ON SLAVE DO INSERT INTO t1(c) VALUES ('from slave_terminate');
SELECT db, name, status, originator FROM mysql.event WHERE db = 'test' AND name = 'slave_terminate';
db name status originator
test slave_terminate SLAVESIDE_DISABLED 2
DROP EVENT test.slave_terminate;
"in the master"
DROP TABLE t1;
sql/lex.h
View file @
a2b6a710
...
...
@@ -467,7 +467,6 @@ static SYMBOL symbols[] = {
{
"SIGNED"
,
SYM
(
SIGNED_SYM
)},
{
"SIMPLE"
,
SYM
(
SIMPLE_SYM
)},
{
"SLAVE"
,
SYM
(
SLAVE
)},
{
"SLAVESIDE_DISABLE"
,
SYM
(
SLAVESIDE_DISABLE_SYM
)},
{
"SNAPSHOT"
,
SYM
(
SNAPSHOT_SYM
)},
{
"SMALLINT"
,
SYM
(
SMALLINT
)},
{
"SOCKET"
,
SYM
(
SOCKET_SYM
)},
...
...
sql/sql_yacc.yy
View file @
a2b6a710
...
...
@@ -1774,7 +1774,7 @@ opt_ev_status: /* empty */ { $$= 0; }
Lex->event_parse_data->status= Event_basic::ENABLED;
$$= 1;
}
|
SLAVESIDE_DISABLE_SYM
|
DISABLE_SYM ON SLAVE
{
Lex->event_parse_data->status= Event_basic::SLAVESIDE_DISABLED;
$$= 1;
...
...
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