Commit bfc73f2c authored by unknown's avatar unknown
Browse files

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
Loading
Loading
Loading
Loading
+16 −2
Original line number Diff line number Diff line
@@ -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;
+26 −4
Original line number Diff line number Diff line
@@ -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;
+0 −1
Original line number Diff line number Diff line
@@ -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)},
+1 −1
Original line number Diff line number Diff line
@@ -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;