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
bfc73f2c
Commit
bfc73f2c
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
6a0d5c01
c0b96432
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 @
bfc73f2c
...
@@ -15,8 +15,7 @@ drop table if exists t1,t2;
...
@@ -15,8 +15,7 @@ drop table if exists t1,t2;
eval
CREATE
TABLE
`t1`
(
eval
CREATE
TABLE
`t1`
(
`id`
INT
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`id`
INT
(
10
)
UNSIGNED
NOT
NULL
AUTO_INCREMENT
,
`c`
VARCHAR
(
50
)
NOT
NULL
,
`c`
VARCHAR
(
50
)
NOT
NULL
,
`ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
`ts`
TIMESTAMP
NOT
NULL
DEFAULT
CURRENT_TIMESTAMP
ON
UPDATE
CURRENT_TIMESTAMP
,
CURRENT_TIMESTAMP
,
PRIMARY
KEY
(
`id`
)
PRIMARY
KEY
(
`id`
)
)
ENGINE
=
$engine_type
DEFAULT
CHARSET
=
utf8
;
)
ENGINE
=
$engine_type
DEFAULT
CHARSET
=
utf8
;
...
@@ -99,6 +98,21 @@ sync_slave_with_master;
...
@@ -99,6 +98,21 @@ sync_slave_with_master;
--
echo
"in the slave"
--
echo
"in the slave"
SELECT
db
,
name
,
status
,
originator
FROM
mysql
.
event
WHERE
db
=
'test'
;
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"
--
echo
"in the master"
connection
master
;
connection
master
;
DROP
TABLE
t1
;
DROP
TABLE
t1
;
...
...
mysql-test/r/rpl_events.result
View file @
bfc73f2c
...
@@ -11,8 +11,7 @@ drop table if exists t1,t2;
...
@@ -11,8 +11,7 @@ drop table if exists t1,t2;
CREATE TABLE `t1` (
CREATE TABLE `t1` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`c` VARCHAR(50) NOT NULL,
`c` VARCHAR(50) NOT NULL,
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 (c) VALUES ('manually');
INSERT INTO t1 (c) VALUES ('manually');
...
@@ -69,6 +68,18 @@ db name status originator
...
@@ -69,6 +68,18 @@ db name status originator
"in the slave"
"in the slave"
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
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"
"in the master"
DROP TABLE t1;
DROP TABLE t1;
set binlog_format=statement;
set binlog_format=statement;
...
@@ -77,8 +88,7 @@ drop table if exists t1,t2;
...
@@ -77,8 +88,7 @@ drop table if exists t1,t2;
CREATE TABLE `t1` (
CREATE TABLE `t1` (
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`id` INT(10) UNSIGNED NOT NULL AUTO_INCREMENT,
`c` VARCHAR(50) NOT NULL,
`c` VARCHAR(50) NOT NULL,
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE
`ts` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
INSERT INTO t1 (c) VALUES ('manually');
INSERT INTO t1 (c) VALUES ('manually');
...
@@ -135,5 +145,17 @@ db name status originator
...
@@ -135,5 +145,17 @@ db name status originator
"in the slave"
"in the slave"
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
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"
"in the master"
DROP TABLE t1;
DROP TABLE t1;
sql/lex.h
View file @
bfc73f2c
...
@@ -467,7 +467,6 @@ static SYMBOL symbols[] = {
...
@@ -467,7 +467,6 @@ static SYMBOL symbols[] = {
{
"SIGNED"
,
SYM
(
SIGNED_SYM
)},
{
"SIGNED"
,
SYM
(
SIGNED_SYM
)},
{
"SIMPLE"
,
SYM
(
SIMPLE_SYM
)},
{
"SIMPLE"
,
SYM
(
SIMPLE_SYM
)},
{
"SLAVE"
,
SYM
(
SLAVE
)},
{
"SLAVE"
,
SYM
(
SLAVE
)},
{
"SLAVESIDE_DISABLE"
,
SYM
(
SLAVESIDE_DISABLE_SYM
)},
{
"SNAPSHOT"
,
SYM
(
SNAPSHOT_SYM
)},
{
"SNAPSHOT"
,
SYM
(
SNAPSHOT_SYM
)},
{
"SMALLINT"
,
SYM
(
SMALLINT
)},
{
"SMALLINT"
,
SYM
(
SMALLINT
)},
{
"SOCKET"
,
SYM
(
SOCKET_SYM
)},
{
"SOCKET"
,
SYM
(
SOCKET_SYM
)},
...
...
sql/sql_yacc.yy
View file @
bfc73f2c
...
@@ -1774,7 +1774,7 @@ opt_ev_status: /* empty */ { $$= 0; }
...
@@ -1774,7 +1774,7 @@ opt_ev_status: /* empty */ { $$= 0; }
Lex->event_parse_data->status= Event_basic::ENABLED;
Lex->event_parse_data->status= Event_basic::ENABLED;
$$= 1;
$$= 1;
}
}
|
SLAVESIDE_DISABLE_SYM
|
DISABLE_SYM ON SLAVE
{
{
Lex->event_parse_data->status= Event_basic::SLAVESIDE_DISABLED;
Lex->event_parse_data->status= Event_basic::SLAVESIDE_DISABLED;
$$= 1;
$$= 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