Below is the list of changes that have just been committed into a local
5.1 repository of cbell. When cbell does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html
ChangeSet@stripped, 2006-12-22 11:40:08-05:00, cbell@mysql_cab. +22 -0
WL#3629 - Replication of Invocation and Invoked Features
This changeset adds replication of events and user-defined functions.
There are several bug reports involved in this change:
BUG#16421, BUG#17857, BUG#20384:
This patch modifies the mysql.events table to permit the addition of
another enum value for the status column. The column now has values
of ('DISABLED','SLAVESIDE_DISABLED','ENABLED'). A status of
SLAVESIDE_DISABLED is set on the slave during replication of events.
This enables users to determine which events werereplicated from the
master and to later enable them if they promote the slave to a master.
The CREATE, ALTER, and DROP statements are binlogged.
A new test was added for replication of events (rpl_events).
BUG#17671:
This patch modifies the code to permit logging of user-defined functions.
Note: this is the CREATE FUNCTION ... SONAME variety. A more friendly error
message to be displayed should a replicated user-defined function not be
found in the loadable library or if the library is missing from the
slave.The CREATE and DROP statements are binlogged. A new test was added
for replication of user-defined functions (rpl_udf).
mysql-test/include/rpl_events.inc@stripped, 2006-12-22 11:39:58-05:00, cbell@mysql_cab. +78 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test that tests for replication of events.
This test also covers BUG#16421, BUG#17857, and BUG#20384.
mysql-test/include/rpl_events.inc@stripped, 2006-12-22 11:39:58-05:00, cbell@mysql_cab. +0 -0
mysql-test/include/rpl_udf.inc@stripped, 2006-12-22 11:39:59-05:00, cbell@mysql_cab. +192 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test that tests for replication of user-defined
functions. This test also covers BUG#7671.
mysql-test/include/rpl_udf.inc@stripped, 2006-12-22 11:39:59-05:00, cbell@mysql_cab. +0 -0
mysql-test/lib/init_db.sql@stripped, 2006-12-22 11:39:47-05:00, cbell@mysql_cab. +1 -1
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the mysql.events table to permit the addition of
another enum value for the status column. The column now has values
of ('DISABLED','SLAVESIDE_DISABLED','ENABLED').
mysql-test/r/rpl_events.result@stripped, 2006-12-22 11:39:57-05:00, cbell@mysql_cab. +99 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test that tests for replication of events.
This test also covers BUG#16421, BUG#17857, and BUG#20384.
mysql-test/r/rpl_events.result@stripped, 2006-12-22 11:39:57-05:00, cbell@mysql_cab. +0 -0
mysql-test/r/rpl_events.warnings@stripped, 2006-12-22 11:39:57-05:00, cbell@mysql_cab. +6 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test that tests for replication of events.
This test also covers BUG#16421, BUG#17857, and BUG#20384.
mysql-test/r/rpl_events.warnings@stripped, 2006-12-22 11:39:57-05:00, cbell@mysql_cab. +0 -0
mysql-test/r/rpl_udf.result@stripped, 2006-12-22 11:39:57-05:00, cbell@mysql_cab. +310 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test that tests for replication of user-defined
functions. This test also covers BUG#7671.
mysql-test/r/rpl_udf.result@stripped, 2006-12-22 11:39:57-05:00, cbell@mysql_cab. +0 -0
mysql-test/r/system_mysql_db.result@stripped, 2006-12-22 11:39:47-05:00, cbell@mysql_cab. +1 -1
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the mysql.events table to permit the addition of
another enum value for the status column. The column now has values
of ('DISABLED','SLAVESIDE_DISABLED','ENABLED').
mysql-test/t/rpl_events.test@stripped, 2006-12-22 11:39:58-05:00, cbell@mysql_cab. +24 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test that tests for replication of events.
This test also covers BUG#16421, BUG#17857, and BUG#20384.
mysql-test/t/rpl_events.test@stripped, 2006-12-22 11:39:58-05:00, cbell@mysql_cab. +0 -0
mysql-test/t/rpl_udf.test@stripped, 2006-12-22 11:39:58-05:00, cbell@mysql_cab. +18 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch adds a new test that tests for replication of user-defined
functions. This test also covers BUG#7671.
mysql-test/t/rpl_udf.test@stripped, 2006-12-22 11:39:58-05:00, cbell@mysql_cab. +0 -0
scripts/mysql_create_system_tables.sh@stripped, 2006-12-22 11:39:48-05:00, cbell@mysql_cab. +1 -1
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the mysql.events table to permit the addition of
another enum value for the status column. The column now has values
of ('DISABLED','SLAVESIDE_DISABLED','ENABLED').
scripts/mysql_fix_privilege_tables.sql@stripped, 2006-12-22 11:39:49-05:00, cbell@mysql_cab. +1 -1
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the mysql.events table to permit the addition of
another enum value for the status column. The column now has values
of ('DISABLED','SLAVESIDE_DISABLED','ENABLED').
sql/event_data_objects.cc@stripped, 2006-12-22 11:39:49-05:00, cbell@mysql_cab. +19 -3
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events. This enables users to determine which events were
replicated from the master and to later enable them if they
promote the slave to a master.
sql/event_data_objects.h@stripped, 2006-12-22 11:39:50-05:00, cbell@mysql_cab. +12 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events. This enables users to determine which events were
replicated from the master and to later enable them if they
promote the slave to a master.
sql/event_db_repository.cc@stripped, 2006-12-22 11:39:50-05:00, cbell@mysql_cab. +10 -1
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events. This enables users to determine which events were
replicated from the master and to later enable them if they
promote the slave to a master.
sql/event_queue.cc@stripped, 2006-12-22 11:39:51-05:00, cbell@mysql_cab. +12 -2
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events. This enables users to determine which events were
replicated from the master and to later enable them if they
promote the slave to a master.
sql/events.cc@stripped, 2006-12-22 11:39:52-05:00, cbell@mysql_cab. +17 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit logging events. The
CREATE, ALTER, and DROP statements are binlogged.
sql/lex.h@stripped, 2006-12-22 11:39:53-05:00, cbell@mysql_cab. +1 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events. This enables users to determine which events were
replicated from the master and to later enable them if they
promote the slave to a master.
sql/slave.cc@stripped, 2006-12-22 11:39:53-05:00, cbell@mysql_cab. +17 -2
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit a more friendly error message
to be displayed should a replicated user-defined function not be
found in the loadable library or if the library is missing from the
slave.
sql/sql_parse.cc@stripped, 2006-12-22 11:39:54-05:00, cbell@mysql_cab. +0 -1
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit logging of user-defined functions.
Note: this is the CREATE FUNCTION ... SONAME variety. The CREATE and
DROP statements are binlogged.
sql/sql_show.cc@stripped, 2006-12-22 11:39:55-05:00, cbell@mysql_cab. +6 -2
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit processing of the new enum
SLAVESIDE_DISABLED which is set on the slave during replication
of events. This enables users to determine which events were
replicated from the master and to later enable them if they
promote the slave to a master.
sql/sql_udf.cc@stripped, 2006-12-22 11:39:55-05:00, cbell@mysql_cab. +18 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the code to permit logging of user-defined functions.
Note: this is the CREATE FUNCTION ... SONAME variety. The CREATE and
DROP statements are binlogged.
sql/sql_yacc.yy@stripped, 2006-12-22 11:39:56-05:00, cbell@mysql_cab. +8 -0
WL#3629 - Replication of Invocation and Invoked Features
This patch modifies the mysql.events table to permit the addition of
another enum value for the status column. The column now has values
of ('DISABLED','SLAVESIDE_DISABLED','ENABLED').
# This is a BitKeeper patch. What follows are the unified diffs for the
# set of deltas contained in the patch. The rest of the patch, the part
# that BitKeeper cares about, is below these diffs.
# User: cbell
# Host: mysql_cab.
# Root: C:/source/c++/mysql-5.1_WL_3629
--- 1.166/sql/lex.h 2006-12-22 11:40:37 -05:00
+++ 1.167/sql/lex.h 2006-12-22 11:40:37 -05:00
@@ -463,6 +463,7 @@ static SYMBOL symbols[] = {
{ "SIGNED", SYM(SIGNED_SYM)},
{ "SIMPLE", SYM(SIMPLE_SYM)},
{ "SLAVE", SYM(SLAVE)},
+ { "SLAVESIDE_DISABLE", SYM(SLAVESIDE_DISABLE_SYM)}, /* WL#3629 */
{ "SNAPSHOT", SYM(SNAPSHOT_SYM)},
{ "SMALLINT", SYM(SMALLINT)},
{ "SOME", SYM(ANY_SYM)},
--- 1.296/sql/slave.cc 2006-12-22 11:40:37 -05:00
+++ 1.297/sql/slave.cc 2006-12-22 11:40:37 -05:00
@@ -2389,10 +2389,25 @@ Slave SQL thread aborted. Can't execute
/* Print any warnings issued */
List_iterator_fast<MYSQL_ERROR> it(thd->warn_list);
MYSQL_ERROR *err;
+ /*
+ WL#3629: added controlled slave thread cancel for replication
+ of user-defined variables.
+ */
+ bool udf_error = false;
while ((err= it++))
+ {
+ if (err->code == ER_CANT_OPEN_LIBRARY)
+ udf_error = true;
sql_print_warning("Slave: %s Error_code: %d",err->msg, err->code);
-
- sql_print_error("\
+ }
+ if (udf_error)
+ sql_print_error("\Error loading user-defined library, slave SQL "
+ "thread aborted. Install the missing library, and restart the "
+ "slave SQL thread with \"SLAVE START\". We stopped at log '%s' "
+ "position %s", RPL_LOG_NAME, llstr(rli->group_master_log_pos,
+ llbuff));
+ else
+ sql_print_error("\
Error running query, slave SQL thread aborted. Fix the problem, and restart \
the slave SQL thread with \"SLAVE START\". We stopped at log \
'%s' position %s", RPL_LOG_NAME, llstr(rli->group_master_log_pos, llbuff));
--- 1.596/sql/sql_parse.cc 2006-12-22 11:40:37 -05:00
+++ 1.597/sql/sql_parse.cc 2006-12-22 11:40:38 -05:00
@@ -4787,7 +4787,6 @@ end_with_restore_list:
if (check_access(thd, DELETE_ACL, "mysql", 0, 1, 0, 0))
goto error;
- /* Does NOT write to binlog */
if (!(res = mysql_drop_function(thd, &lex->spname->m_name)))
{
send_ok(thd);
--- 1.374/sql/sql_show.cc 2006-12-22 11:40:38 -05:00
+++ 1.375/sql/sql_show.cc 2006-12-22 11:40:38 -05:00
@@ -4345,6 +4345,10 @@ copy_event_to_schema_table(THD *thd, TAB
/* status */
if (et.status == Event_timed::ENABLED)
sch_table->field[ISE_STATUS]->store(STRING_WITH_LEN("ENABLED"), scs);
+ /* WL#3629 */
+ else if (et.status == Event_timed::SLAVESIDE_DISABLED)
+ sch_table->field[ISE_STATUS]->store(STRING_WITH_LEN("SLAVESIDE_DISABLED"),
+ scs);
else
sch_table->field[ISE_STATUS]->store(STRING_WITH_LEN("DISABLED"), scs);
@@ -4835,7 +4839,7 @@ int mysql_schema_table(THD *thd, LEX *le
{
TABLE *table;
DBUG_ENTER("mysql_schema_table");
- if (!(table= table_list->schema_table->create_table(thd, table_list)))
+ if (!(table= table_list->schema_table->create_table(thd, table_list)))
{
DBUG_RETURN(1);
}
@@ -5319,7 +5323,7 @@ ST_FIELD_INFO events_fields_info[]=
{"SQL_MODE", 65535, MYSQL_TYPE_STRING, 0, 0, 0},
{"STARTS", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Starts"},
{"ENDS", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, "Ends"},
- {"STATUS", 8, MYSQL_TYPE_STRING, 0, 0, "Status"},
+ {"STATUS", 18, MYSQL_TYPE_STRING, 0, 0, "Status"}, /* WL#3629 */
{"ON_COMPLETION", 12, MYSQL_TYPE_STRING, 0, 0, 0},
{"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
{"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
--- 1.68/sql/sql_udf.cc 2006-12-22 11:40:38 -05:00
+++ 1.69/sql/sql_udf.cc 2006-12-22 11:40:38 -05:00
@@ -467,6 +467,15 @@ int mysql_create_function(THD *thd,udf_f
goto err;
}
rw_unlock(&THR_LOCK_udf);
+
+ /* WL#3629 : Binlog the create function. */
+ if (mysql_bin_log.is_open())
+ {
+ thd->clear_error();
+ thd->binlog_query(THD::MYSQL_QUERY_TYPE,
+ thd->query, thd->query_length, FALSE, FALSE);
+ }
+
DBUG_RETURN(0);
err:
@@ -522,6 +531,15 @@ int mysql_drop_function(THD *thd,const L
close_thread_tables(thd);
rw_unlock(&THR_LOCK_udf);
+
+ /* WL#3629 : Binlog the drop function. */
+ if (mysql_bin_log.is_open())
+ {
+ thd->clear_error();
+ thd->binlog_query(THD::MYSQL_QUERY_TYPE,
+ thd->query, thd->query_length, FALSE, FALSE);
+ }
+
DBUG_RETURN(0);
err:
rw_unlock(&THR_LOCK_udf);
--- 1.514/sql/sql_yacc.yy 2006-12-22 11:40:38 -05:00
+++ 1.515/sql/sql_yacc.yy 2006-12-22 11:40:38 -05:00
@@ -595,6 +595,7 @@ bool my_yyoverflow(short **a, YYSTYPE **
%token SIGNED_SYM
%token SIMPLE_SYM /* SQL-2003-N */
%token SLAVE
+%token SLAVESIDE_DISABLE_SYM /* WL#3629 */
%token SMALLINT /* SQL-2003-R */
%token SNAPSHOT_SYM
%token SONAME_SYM
@@ -1361,6 +1362,12 @@ opt_ev_status: /* empty */ { $$= 0; }
Lex->event_parse_data->status= Event_parse_data::ENABLED;
$$= 1;
}
+ /* WL#3629 */
+ | SLAVESIDE_DISABLE_SYM
+ {
+ Lex->event_parse_data->status= Event_parse_data::SLAVESIDE_DISABLED;
+ $$= 1;
+ }
| DISABLE_SYM
{
Lex->event_parse_data->status= Event_parse_data::DISABLED;
@@ -9478,6 +9485,7 @@ keyword_sp:
| SIMPLE_SYM {}
| SHARE_SYM {}
| SHUTDOWN {}
+ | SLAVESIDE_DISABLE_SYM {} /* WL#3629 */
| SNAPSHOT_SYM {}
| SOUNDS_SYM {}
| SQL_CACHE_SYM {}
--- 1.65/sql/events.cc 2006-12-22 11:40:38 -05:00
+++ 1.66/sql/events.cc 2006-12-22 11:40:38 -05:00
@@ -407,6 +407,15 @@ Events::update_event(THD *thd, Event_par
DBUG_ASSERT(ret == OP_LOAD_ERROR);
my_error(ER_EVENT_MODIFY_QUEUE_ERROR, MYF(0));
}
+ else /* WL#3629 : Binlog the alter event. */
+ {
+ if (mysql_bin_log.is_open())
+ {
+ thd->clear_error();
+ thd->binlog_query(THD::MYSQL_QUERY_TYPE,
+ thd->query, thd->query_length, FALSE, FALSE);
+ }
+ }
}
pthread_mutex_unlock(&LOCK_event_metadata);
@@ -452,6 +461,14 @@ Events::drop_event(THD *thd, LEX_STRING
{
if (!only_from_disk)
event_queue->drop_event(thd, dbname, name);
+
+ /* WL#3629 : Binlog the drop event. */
+ if (mysql_bin_log.is_open())
+ {
+ thd->clear_error();
+ thd->binlog_query(THD::MYSQL_QUERY_TYPE,
+ thd->query, thd->query_length, FALSE, FALSE);
+ }
}
pthread_mutex_unlock(&LOCK_event_metadata);
DBUG_RETURN(ret);
--- 1.18/sql/event_db_repository.cc 2006-12-22 11:40:38 -05:00
+++ 1.19/sql/event_db_repository.cc 2006-12-22 11:40:38 -05:00
@@ -95,7 +95,8 @@ const TABLE_FIELD_W_TYPE event_table_fie
},
{
{ C_STRING_WITH_LEN("status") },
- { C_STRING_WITH_LEN("enum('ENABLED','DISABLED')") },
+ /* WL#3629 */
+ { C_STRING_WITH_LEN("enum('ENABLED','SLAVESIDE_DISABLED','DISABLED')") },
{NULL, 0}
},
{
@@ -529,6 +530,14 @@ Event_db_repository::create_event(THD *t
if (check_parse_params(thd, parse_data))
goto err;
+
+ /* WL#3629 - Disable replicated events on slave. */
+ if ((thd->system_thread == SYSTEM_THREAD_SLAVE_SQL) ||
+ (thd->system_thread == SYSTEM_THREAD_SLAVE_IO))
+ {
+ DBUG_PRINT("info", ("Invoked object status set to SLAVESIDE_DISABLED."));
+ parse_data->status = Event_parse_data::SLAVESIDE_DISABLED;
+ }
DBUG_PRINT("info", ("open mysql.event for update"));
if (open_event_table(thd, TL_WRITE, &table))
--- 1.18/sql/event_queue.cc 2006-12-22 11:40:38 -05:00
+++ 1.19/sql/event_queue.cc 2006-12-22 11:40:38 -05:00
@@ -222,7 +222,9 @@ Event_queue::create_event(THD *thd, LEX_
new_element= new Event_queue_element();
res= db_repository->load_named_event(thd, dbname, name, new_element);
- if (res || new_element->status == Event_queue_element::DISABLED)
+ /* WL#3629 */
+ if (res || new_element->status == Event_queue_element::DISABLED
+ || new_element->status == Event_queue_element::SLAVESIDE_DISABLED)
delete new_element;
else
{
@@ -234,6 +236,13 @@ Event_queue::create_event(THD *thd, LEX_
dbug_dump_queue(thd->query_start());
pthread_cond_broadcast(&COND_queue_state);
UNLOCK_QUEUE_DATA();
+ /* WL#3629 : Binlog the create event. */
+ if (mysql_bin_log.is_open())
+ {
+ thd->clear_error();
+ thd->binlog_query(THD::MYSQL_QUERY_TYPE,
+ thd->query, thd->query_length, FALSE, FALSE);
+ }
}
DBUG_RETURN(res);
@@ -275,7 +284,8 @@ Event_queue::update_event(THD *thd, LEX_
delete new_element;
goto end;
}
- else if (new_element->status == Event_queue_element::DISABLED)
+ /* WL#3629 */
+ else if (new_element->status != Event_queue_element::ENABLED)
{
DBUG_PRINT("info", ("The event is disabled."));
/*
--- 1.78/sql/event_data_objects.cc 2006-12-22 11:40:38 -05:00
+++ 1.79/sql/event_data_objects.cc 2006-12-22 11:40:38 -05:00
@@ -919,8 +919,20 @@ Event_queue_element::load_from_row(TABLE
goto error;
DBUG_PRINT("load_from_row", ("Event [%s] is [%s]", name.str, ptr));
- status= (ptr[0]=='E'? Event_queue_element::ENABLED:
- Event_queue_element::DISABLED);
+
+ /* WL#3629 : set event status (ENABLED | SLAVESIDE_DISABLED | DISABLED) */
+ switch (ptr[0])
+ {
+ case 'E' :
+ status = Event_queue_element::ENABLED;
+ break;
+ case 'S' :
+ status = Event_queue_element::SLAVESIDE_DISABLED;
+ break;
+ case 'D' :
+ status = Event_queue_element::DISABLED;
+ break;
+ }
/* ToDo : Andrey . Find a way not to allocate ptr on event_mem_root */
if ((ptr= get_field(&mem_root,
@@ -1190,7 +1202,8 @@ Event_queue_element::compute_next_execut
TIME_to_ulonglong_datetime(&ends),
TIME_to_ulonglong_datetime(&last_executed), this));
- if (status == Event_queue_element::DISABLED)
+ /* WL#3629 */
+ if (status != Event_queue_element::ENABLED)
{
DBUG_PRINT("compute_next_execution_time",
("Event %s is DISABLED", name.str));
@@ -1589,6 +1602,9 @@ Event_timed::get_create_event(THD *thd,
if (status == Event_timed::ENABLED)
buf->append(STRING_WITH_LEN("ENABLE"));
+ /* WL#3629 */
+ else if (status == Event_timed::SLAVESIDE_DISABLED)
+ buf->append(STRING_WITH_LEN("SLAVESIDE_DISABLE"));
else
buf->append(STRING_WITH_LEN("DISABLE"));
--- 1.13/sql/event_data_objects.h 2006-12-22 11:40:38 -05:00
+++ 1.14/sql/event_data_objects.h 2006-12-22 11:40:38 -05:00
@@ -58,9 +58,15 @@ protected:
bool last_executed_changed;
public:
+ /*
+ ENABLED = feature can function normally (is turned on)
+ SLAVESIDE_DISABLED = feature is turned off on slave
+ DISABLED = feature is turned off
+ */
enum enum_status
{
ENABLED = 1,
+ SLAVESIDE_DISABLED = 2, /* WL#3629 */
DISABLED
};
@@ -195,9 +201,15 @@ private:
class Event_parse_data : public Sql_alloc
{
public:
+ /*
+ ENABLED = feature can function normally (is turned on)
+ SLAVESIDE_DISABLED = feature is turned off on slave
+ DISABLED = feature is turned off
+ */
enum enum_status
{
ENABLED = 1,
+ SLAVESIDE_DISABLED = 2, /* WL#3629 */
DISABLED
};
--- New file ---
+++ mysql-test/include/rpl_events.inc 06/12/22 11:39:58
##################################################################
# Author: Giuseppe #
# Date: 2006-12-20 #
# Purpose: To test that event effects are replicated #
# in both row based and statement based format #
##################################################################
--disable_warnings
drop event if exists justonce;
drop table if exists t1,t2;
--enable_warnings
# first, we need a table to record something from an event
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,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into t1 (c) values ('manually');
# then, we create the event
create event justonce on schedule at now() + interval 2 second do insert into t1
(c) values ('from justonce');
# wait 3 seconds, so the event can trigger
--real_sleep 3
# check that table t1 contains something
--echo "in the master"
--enable_info
--replace_column 3 TIMESTAMP
select * from t1;
--disable_info
sync_slave_with_master;
connection slave;
--echo "in the slave"
--enable_info
--replace_column 3 TIMESTAMP
select * from t1;
--disable_info
connection master;
# BUG#20384 - disable events on slave
drop event if exists test.justonce;
create event test.er on schedule every 3 second do insert into t1
(c) values ('from er');
select db, name, status from mysql.event where db = 'test' and name = 'er';
sync_slave_with_master;
connection slave;
--echo "in the slave"
--replace column 8 DATETIME
select db, name, status from mysql.event where db = 'test' and name = 'er';
connection master;
--echo "in the master"
drop event test.er;
--replace column 8 DATETIME
select db, name, status from mysql.event where db = 'test' and name = 'er';
--disable_info
sync_slave_with_master;
connection slave;
--echo "in the slave"
--replace column 8 DATETIME
select db, name, status from mysql.event where db = 'test' and name = 'er';
--echo "in the master"
connection master;
drop table t1;
--- New file ---
+++ mysql-test/include/rpl_udf.inc 06/12/22 11:39:59
#####################################################################
# Author: Chuck Bell #
# Date: 2006-12-21 #
# Purpose: To test that UDFs are replicated in both row based and #
# statement based format. This tests work completed in WL#3629. #
# #
# This test is designed to exercise two of the three types of UDFs: #
# 1) UDFs via loadable libraries, and 2) UDFs with a SQL body. #
#####################################################################
--source include/have_udf.inc
#
# To run this tests the "sql/udf_example.c" need to be compiled into
# udf_example.so and LD_LIBRARY_PATH should be setup to point out where
# the library are.
#
connection master;
--disable_warnings
drop table if exists t1;
--enable_warnings
#
# Test 1) Test UDFs via loadable libraries
#
--echo "*** Test 1) Test UDFs via loadable libraries ***
--echo "Running on the master"
--enable_info
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
eval CREATE FUNCTION myfunc_double RETURNS REAL SONAME "$UDF_EXAMPLE_LIB";
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
eval CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
--replace_result $UDF_EXAMPLE_LIB UDF_EXAMPLE_LIB
--error ER_CANT_FIND_DL_ENTRY
eval CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "$UDF_EXAMPLE_LIB";
select * from mysql.func;
--disable_info
sync_slave_with_master;
connection slave;
# Check to see that UDF CREATE statements were replicated
--echo "Running on the slave"
--enable_info
select * from mysql.func;
--disable_info
connection master;
# Use the UDFs to do something
--echo "Running on the master"
--enable_info
create table t1(sum int, price float(24));
insert into t1 values(myfunc_int(100), myfunc_double(50.00));
insert into t1 values(myfunc_int(10), myfunc_double(5.00));
insert into t1 values(myfunc_int(200), myfunc_double(25.00));
insert into t1 values(myfunc_int(1), myfunc_double(500.00));
select * from t1;
--disable_info
sync_slave_with_master;
connection slave;
# Check to see if data was replicated
--echo "Running on the slave"
--enable_info
select * from t1;
# Check to see that the functions are available for execution on the slave
select myfunc_int(25);
select myfunc_double(75.00);
--disable_info
connection master;
# Drop the functions
--echo "Running on the master"
--enable_info
DROP FUNCTION myfunc_double;
DROP FUNCTION myfunc_int;
select * from mysql.func;
--disable_info
sync_slave_with_master;
connection slave;
# Check to see if the UDFs were dropped on the slave
--echo "Running on the slave"
--enable_info
select * from mysql.func;
--disable_info
connection master;
# Cleanup
--echo "Running on the master"
--enable_info
DROP TABLE t1;
--disable_info
#
# Test 2) Test UDFs with SQL body
#
--echo "*** Test 2) Test UDFs with SQL body ***
--echo "Running on the master"
--enable_info
CREATE FUNCTION myfuncsql_int(i int) RETURNS INTEGER DETERMINISTIC RETURN i;
CREATE FUNCTION myfuncsql_double(d double) RETURNS INTEGER DETERMINISTIC RETURN d * 0.95;
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
--disable_info
sync_slave_with_master;
connection slave;
# Check to see that UDF CREATE statements were replicated
--echo "Running on the slave"
--enable_info
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
--disable_info
connection master;
# Use the UDFs to do something
--echo "Running on the master"
--enable_info
create table t1(sum int, price float(24));
insert into t1 values(myfuncsql_int(100), myfuncsql_double(50.00));
insert into t1 values(myfuncsql_int(10), myfuncsql_double(5.00));
insert into t1 values(myfuncsql_int(200), myfuncsql_double(25.00));
insert into t1 values(myfuncsql_int(1), myfuncsql_double(500.00));
select * from t1;
--disable_info
sync_slave_with_master;
connection slave;
# Check to see if data was replicated
--echo "Running on the slave"
--enable_info
select * from t1;
--disable_info
connection master;
# Modify the UDFs to add a comment
--echo "Running on the master"
--enable_info
ALTER FUNCTION myfuncsql_int COMMENT "This was altered.";
ALTER FUNCTION myfuncsql_double COMMENT "This was altered.";
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
--disable_info
sync_slave_with_master;
connection slave;
# Check to see if data was replicated
--echo "Running on the slave"
--enable_info
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
# Check to see that the functions are available for execution on the slave
select myfuncsql_int(25);
select myfuncsql_double(75.00);
--disable_info
connection master;
# Drop the functions
--echo "Running on the master"
--enable_info
DROP FUNCTION myfuncsql_double;
DROP FUNCTION myfuncsql_int;
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
--disable_info
sync_slave_with_master;
connection slave;
# Check to see if the UDFs were dropped on the slave
--echo "Running on the slave"
--enable_info
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
--disable_info
connection master;
# Cleanup
--echo "Running on the master"
--enable_info
DROP TABLE t1;
--disable_info
--- New file ---
+++ mysql-test/r/rpl_events.result 06/12/22 11:39:57
set global event_scheduler=1;
set binlog_format=row;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
drop event if exists justonce;
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,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into t1 (c) values ('manually');
create event justonce on schedule at now() + interval 2 second do insert into t1
(c) values ('from justonce');
"in the master"
select * from t1;
id c ts
1 manually TIMESTAMP
2 from justonce TIMESTAMP
affected rows: 2
"in the slave"
select * from t1;
id c ts
1 manually TIMESTAMP
2 from justonce TIMESTAMP
affected rows: 2
drop event if exists test.justonce;
Warnings:
Note 1305 Event justonce does not exist
create event test.er on schedule every 3 second do insert into t1
(c) values ('from er');
select db, name, status from mysql.event where db = 'test' and name = 'er';
db name status
test er ENABLED
"in the slave"
select db, name, status from mysql.event where db = 'test' and name = 'er';
db name status
test er SLAVESIDE_DISABLED
"in the master"
drop event test.er;
select db, name, status from mysql.event where db = 'test' and name = 'er';
db name status
"in the slave"
select db, name, status from mysql.event where db = 'test' and name = 'er';
db name status
"in the master"
drop table t1;
set binlog_format=statement;
drop event if exists justonce;
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,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
insert into t1 (c) values ('manually');
create event justonce on schedule at now() + interval 2 second do insert into t1
(c) values ('from justonce');
"in the master"
select * from t1;
id c ts
1 manually TIMESTAMP
2 from justonce TIMESTAMP
affected rows: 2
"in the slave"
select * from t1;
id c ts
1 manually TIMESTAMP
2 from justonce TIMESTAMP
affected rows: 2
drop event if exists test.justonce;
Warnings:
Note 1305 Event justonce does not exist
create event test.er on schedule every 3 second do insert into t1
(c) values ('from er');
select db, name, status from mysql.event where db = 'test' and name = 'er';
db name status
test er ENABLED
"in the slave"
select db, name, status from mysql.event where db = 'test' and name = 'er';
db name status
test er SLAVESIDE_DISABLED
"in the master"
drop event test.er;
select db, name, status from mysql.event where db = 'test' and name = 'er';
db name status
"in the slave"
select db, name, status from mysql.event where db = 'test' and name = 'er';
db name status
"in the master"
drop table t1;
--- New file ---
+++ mysql-test/r/rpl_events.warnings 06/12/22 11:39:57
mysqltest: Warning detected in included file .\include\rpl_events.inc at line 58:
mysqltest: Warning detected in included file .\include\rpl_events.inc at line 64:
mysqltest: Warning detected in included file .\include\rpl_events.inc at line 72:
mysqltest: Warning detected in included file .\include\rpl_events.inc at line 58:
mysqltest: Warning detected in included file .\include\rpl_events.inc at line 64:
mysqltest: Warning detected in included file .\include\rpl_events.inc at line 72:
--- New file ---
+++ mysql-test/r/rpl_udf.result 06/12/22 11:39:57
set binlog_format=row;
stop slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
reset master;
reset slave;
drop table if exists t1,t2,t3,t4,t5,t6,t7,t8,t9;
start slave;
drop table if exists t1;
"*** Test 1) Test UDFs via loadable libraries ***
"Running on the master"
CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
affected rows: 0
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
affected rows: 0
CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
ERROR HY000: Can't find symbol 'myfunc_nonexist' in library
select * from mysql.func;
name ret dl type
myfunc_double 1 udf_example.dll function
myfunc_int 2 udf_example.dll function
affected rows: 2
"Running on the slave"
select * from mysql.func;
name ret dl type
myfunc_double 1 udf_example.dll function
myfunc_int 2 udf_example.dll function
affected rows: 2
"Running on the master"
create table t1(sum int, price float(24));
affected rows: 0
insert into t1 values(myfunc_int(100), myfunc_double(50.00));
affected rows: 1
insert into t1 values(myfunc_int(10), myfunc_double(5.00));
affected rows: 1
insert into t1 values(myfunc_int(200), myfunc_double(25.00));
affected rows: 1
insert into t1 values(myfunc_int(1), myfunc_double(500.00));
affected rows: 1
select * from t1;
sum price
100 48.6
10 48.75
200 49
1 48.5
affected rows: 4
"Running on the slave"
select * from t1;
sum price
100 48.6
10 48.75
200 49
1 48.5
affected rows: 4
select myfunc_int(25);
myfunc_int(25)
25
affected rows: 1
select myfunc_double(75.00);
myfunc_double(75.00)
50.00
affected rows: 1
"Running on the master"
DROP FUNCTION myfunc_double;
affected rows: 0
DROP FUNCTION myfunc_int;
affected rows: 0
select * from mysql.func;
name ret dl type
affected rows: 0
"Running on the slave"
select * from mysql.func;
name ret dl type
affected rows: 0
"Running on the master"
DROP TABLE t1;
affected rows: 0
"*** Test 2) Test UDFs with SQL body ***
"Running on the master"
CREATE FUNCTION myfuncsql_int(i int) RETURNS INTEGER DETERMINISTIC RETURN i;
affected rows: 0
CREATE FUNCTION myfuncsql_double(d double) RETURNS INTEGER DETERMINISTIC RETURN d * 0.95;
affected rows: 0
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
test myfuncsql_double FUNCTION d double RETURN d * 0.95
test myfuncsql_int FUNCTION i int RETURN i
affected rows: 2
"Running on the slave"
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
test myfuncsql_double FUNCTION d double RETURN d * 0.95
test myfuncsql_int FUNCTION i int RETURN i
affected rows: 2
"Running on the master"
create table t1(sum int, price float(24));
affected rows: 0
insert into t1 values(myfuncsql_int(100), myfuncsql_double(50.00));
affected rows: 1
insert into t1 values(myfuncsql_int(10), myfuncsql_double(5.00));
affected rows: 1
insert into t1 values(myfuncsql_int(200), myfuncsql_double(25.00));
affected rows: 1
insert into t1 values(myfuncsql_int(1), myfuncsql_double(500.00));
affected rows: 1
select * from t1;
sum price
100 47
10 5
200 24
1 475
affected rows: 4
"Running on the slave"
select * from t1;
sum price
100 47
10 5
200 24
1 475
affected rows: 4
"Running on the master"
ALTER FUNCTION myfuncsql_int COMMENT "This was altered.";
affected rows: 0
ALTER FUNCTION myfuncsql_double COMMENT "This was altered.";
affected rows: 0
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
test myfuncsql_double FUNCTION d double RETURN d * 0.95 This was altered.
test myfuncsql_int FUNCTION i int RETURN i This was altered.
affected rows: 2
"Running on the slave"
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
test myfuncsql_double FUNCTION d double RETURN d * 0.95 This was altered.
test myfuncsql_int FUNCTION i int RETURN i This was altered.
affected rows: 2
select myfuncsql_int(25);
myfuncsql_int(25)
25
affected rows: 1
select myfuncsql_double(75.00);
myfuncsql_double(75.00)
71
affected rows: 1
"Running on the master"
DROP FUNCTION myfuncsql_double;
affected rows: 0
DROP FUNCTION myfuncsql_int;
affected rows: 0
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
affected rows: 0
"Running on the slave"
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
affected rows: 0
"Running on the master"
DROP TABLE t1;
affected rows: 0
set binlog_format=statement;
drop table if exists t1;
"*** Test 1) Test UDFs via loadable libraries ***
"Running on the master"
CREATE FUNCTION myfunc_double RETURNS REAL SONAME "UDF_EXAMPLE_LIB";
affected rows: 0
CREATE FUNCTION myfunc_int RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
affected rows: 0
CREATE FUNCTION myfunc_nonexist RETURNS INTEGER SONAME "UDF_EXAMPLE_LIB";
ERROR HY000: Can't find symbol 'myfunc_nonexist' in library
select * from mysql.func;
name ret dl type
myfunc_int 2 udf_example.dll function
myfunc_double 1 udf_example.dll function
affected rows: 2
"Running on the slave"
select * from mysql.func;
name ret dl type
myfunc_int 2 udf_example.dll function
myfunc_double 1 udf_example.dll function
affected rows: 2
"Running on the master"
create table t1(sum int, price float(24));
affected rows: 0
insert into t1 values(myfunc_int(100), myfunc_double(50.00));
affected rows: 1
insert into t1 values(myfunc_int(10), myfunc_double(5.00));
affected rows: 1
insert into t1 values(myfunc_int(200), myfunc_double(25.00));
affected rows: 1
insert into t1 values(myfunc_int(1), myfunc_double(500.00));
affected rows: 1
select * from t1;
sum price
100 48.6
10 48.75
200 49
1 48.5
affected rows: 4
"Running on the slave"
select * from t1;
sum price
100 48.6
10 48.75
200 49
1 48.5
affected rows: 4
select myfunc_int(25);
myfunc_int(25)
25
affected rows: 1
select myfunc_double(75.00);
myfunc_double(75.00)
50.00
affected rows: 1
"Running on the master"
DROP FUNCTION myfunc_double;
affected rows: 0
DROP FUNCTION myfunc_int;
affected rows: 0
select * from mysql.func;
name ret dl type
affected rows: 0
"Running on the slave"
select * from mysql.func;
name ret dl type
affected rows: 0
"Running on the master"
DROP TABLE t1;
affected rows: 0
"*** Test 2) Test UDFs with SQL body ***
"Running on the master"
CREATE FUNCTION myfuncsql_int(i int) RETURNS INTEGER DETERMINISTIC RETURN i;
affected rows: 0
CREATE FUNCTION myfuncsql_double(d double) RETURNS INTEGER DETERMINISTIC RETURN d * 0.95;
affected rows: 0
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
test myfuncsql_double FUNCTION d double RETURN d * 0.95
test myfuncsql_int FUNCTION i int RETURN i
affected rows: 2
"Running on the slave"
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
test myfuncsql_double FUNCTION d double RETURN d * 0.95
test myfuncsql_int FUNCTION i int RETURN i
affected rows: 2
"Running on the master"
create table t1(sum int, price float(24));
affected rows: 0
insert into t1 values(myfuncsql_int(100), myfuncsql_double(50.00));
affected rows: 1
insert into t1 values(myfuncsql_int(10), myfuncsql_double(5.00));
affected rows: 1
insert into t1 values(myfuncsql_int(200), myfuncsql_double(25.00));
affected rows: 1
insert into t1 values(myfuncsql_int(1), myfuncsql_double(500.00));
affected rows: 1
select * from t1;
sum price
100 47
10 5
200 24
1 475
affected rows: 4
"Running on the slave"
select * from t1;
sum price
100 47
10 5
200 24
1 475
affected rows: 4
"Running on the master"
ALTER FUNCTION myfuncsql_int COMMENT "This was altered.";
affected rows: 0
ALTER FUNCTION myfuncsql_double COMMENT "This was altered.";
affected rows: 0
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
test myfuncsql_double FUNCTION d double RETURN d * 0.95 This was altered.
test myfuncsql_int FUNCTION i int RETURN i This was altered.
affected rows: 2
"Running on the slave"
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
test myfuncsql_double FUNCTION d double RETURN d * 0.95 This was altered.
test myfuncsql_int FUNCTION i int RETURN i This was altered.
affected rows: 2
select myfuncsql_int(25);
myfuncsql_int(25)
25
affected rows: 1
select myfuncsql_double(75.00);
myfuncsql_double(75.00)
71
affected rows: 1
"Running on the master"
DROP FUNCTION myfuncsql_double;
affected rows: 0
DROP FUNCTION myfuncsql_int;
affected rows: 0
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
affected rows: 0
"Running on the slave"
select db, name, type, param_list, body, comment from mysql.proc where db = 'test' AND name like 'myfuncsql%';
db name type param_list body comment
affected rows: 0
"Running on the master"
DROP TABLE t1;
affected rows: 0
--- New file ---
+++ mysql-test/t/rpl_events.test 06/12/22 11:39:58
##################################################################
# Author: Giuseppe #
# Date: 2006-12-20 #
# Purpose: To test that event effects are replicated #
# in both row based and statement based format #
##################################################################
set global event_scheduler=1;
set binlog_format=row;
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
-- source include/master-slave.inc
--source include/rpl_events.inc
set binlog_format=statement;
# Embedded server doesn't support binlogging
-- source include/not_embedded.inc
## -- source include/master-slave.inc
--source include/rpl_events.inc
--- New file ---
+++ mysql-test/t/rpl_udf.test 06/12/22 11:39:58
###################################################################
# Author: Chuck Bell #
# Date: 2006-12-21 #
# Purpose: To test that UDFs are replicated in both row based and #
# statement based format. This tests work completed in WL#3629. #
###################################################################
set binlog_format=row;
# Embedded server doesn't support binlogging
--source include/not_embedded.inc
--source include/master-slave.inc
--source include/rpl_udf.inc
set binlog_format=statement;
# Embedded server doesn't support binlogging
--source include/not_embedded.inc
--source include/rpl_udf.inc
--- 1.27/mysql-test/lib/init_db.sql 2006-12-22 11:40:38 -05:00
+++ 1.28/mysql-test/lib/init_db.sql 2006-12-22 11:40:38 -05:00
@@ -596,7 +596,7 @@ CREATE TABLE event (
last_executed DATETIME default NULL,
starts DATETIME default NULL,
ends DATETIME default NULL,
- status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',
+ status ENUM('ENABLED','SLAVESIDE_DISABLED','DISABLED') NOT NULL default 'ENABLED',
on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',
sql_mode set(
'REAL_AS_FLOAT',
--- 1.45/scripts/mysql_fix_privilege_tables.sql 2006-12-22 11:40:38 -05:00
+++ 1.46/scripts/mysql_fix_privilege_tables.sql 2006-12-22 11:40:38 -05:00
@@ -587,7 +587,7 @@ CREATE TABLE event (
last_executed DATETIME default NULL,
starts DATETIME default NULL,
ends DATETIME default NULL,
- status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',
+ status ENUM('ENABLED','SLAVESIDE_DISABLED','DISABLED') NOT NULL default 'ENABLED',
on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',
sql_mode set(
'REAL_AS_FLOAT',
--- 1.42/mysql-test/r/system_mysql_db.result 2006-12-22 11:40:38 -05:00
+++ 1.43/mysql-test/r/system_mysql_db.result 2006-12-22 11:40:38 -05:00
@@ -204,7 +204,7 @@ event CREATE TABLE `event` (
`last_executed` datetime DEFAULT NULL,
`starts` datetime DEFAULT NULL,
`ends` datetime DEFAULT NULL,
- `status` enum('ENABLED','DISABLED') NOT NULL DEFAULT 'ENABLED',
+ `status` enum('ENABLED','SLAVESIDE_DISABLED','DISABLED') NOT NULL DEFAULT 'ENABLED',
`on_completion` enum('DROP','PRESERVE') NOT NULL DEFAULT 'DROP',
`sql_mode` set('REAL_AS_FLOAT','PIPES_AS_CONCAT','ANSI_QUOTES','IGNORE_SPACE','NOT_USED','ONLY_FULL_GROUP_BY','NO_UNSIGNED_SUBTRACTION','NO_DIR_IN_CREATE','POSTGRESQL','ORACLE','MSSQL','DB2','MAXDB','NO_KEY_OPTIONS','NO_TABLE_OPTIONS','NO_FIELD_OPTIONS','MYSQL323','MYSQL40','ANSI','NO_AUTO_VALUE_ON_ZERO','NO_BACKSLASH_ESCAPES','STRICT_TRANS_TABLES','STRICT_ALL_TABLES','NO_ZERO_IN_DATE','NO_ZERO_DATE','INVALID_DATES','ERROR_FOR_DIVISION_BY_ZERO','TRADITIONAL','NO_AUTO_CREATE_USER','HIGH_NOT_PRECEDENCE') NOT NULL DEFAULT '',
`comment` char(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL DEFAULT '',
--- 1.40/scripts/mysql_create_system_tables.sh 2006-12-22 11:40:38 -05:00
+++ 1.41/scripts/mysql_create_system_tables.sh 2006-12-22 11:40:38 -05:00
@@ -792,7 +792,7 @@ then
c_ev="$c_ev last_executed DATETIME default NULL,"
c_ev="$c_ev starts DATETIME default NULL,"
c_ev="$c_ev ends DATETIME default NULL,"
- c_ev="$c_ev status ENUM('ENABLED','DISABLED') NOT NULL default 'ENABLED',"
+ c_ev="$c_ev status ENUM('ENABLED','SLAVESIDE_DISABLED','DISABLED') NOT NULL default 'ENABLED',"
c_ev="$c_ev on_completion ENUM('DROP','PRESERVE') NOT NULL default 'DROP',"
c_ev="$c_ev sql_mode set("
c_ev="$c_ev 'REAL_AS_FLOAT',"
| Thread |
|---|
| • bk commit into 5.1 tree (cbell:1.2377) BUG#16421 | cbell | 22 Dec |