summaryrefslogtreecommitdiff
path: root/sql
diff options
context:
space:
mode:
authorunknown <cbell/Chuck@mysql_cab_desk.>2007-03-29 08:17:19 -0400
committerunknown <cbell/Chuck@mysql_cab_desk.>2007-03-29 08:17:19 -0400
commit75686dc73f0e2d5af85a9cd77fccbf2896189a42 (patch)
tree157f613c7aa4768e5233e69907a9c1b9d8a61441 /sql
parentff1d6b2252b8502596e2f7365b9935a4c3b59112 (diff)
downloadmariadb-git-75686dc73f0e2d5af85a9cd77fccbf2896189a42.tar.gz
WL#3629 - Replication of Invocation and Invoked Features
This patch corrects errors that occurred in a local manual merge as a result of updating the local repository and includes changes necessary to correct problems found during the recalculation of next execution of events in RBR. mysql-test/include/rpl_events.inc: WL#3629 - Replication of Invocation and Invoked Features This patch changes the rpl_events test to be more comprehensive in catching errors as a result of RBR. Changes include clarification of SELECTs with WHERE clauses and synchronization with master and slave. mysql-test/r/rpl_events.result: WL#3629 - Replication of Invocation and Invoked Features This patch changes the results for the rpl_events test to accomodate the changes in the test. scripts/mysql_system_tables.sql: WL#3629 - Replication of Invocation and Invoked Features This patch adds the originator column and a new enum value to the mysql.event table. This change was necessary to accomodate changes as a result of other patches. sql/event_data_objects.cc: WL#3629 - Replication of Invocation and Invoked Features This patch corrects an error in merging that occurred during manual merge. The status check was changed to include either ENABLED or DISABLED in the gate to change the status to SLAVESIDE_DISABLED for events replicated to the slave. This patch also includes an update to correct a problem encountered during testing after the local merge. The update_timing_fields method is replicating the timing changes in RBR to the slave thereby over writing the change to the status column in the process. This code includes a check to turn off the next binlog event if in RBR. sql/event_queue.cc: WL#3629 - Replication of Invocation and Invoked Features This patch corrects an error in merging that occurred during manual merge. The code was corrected to include both types of disabled status enums (DISABLED, SLAVESIDE_DISABLED) in the create_event and update_event methods. sql/sql_show.cc: WL#3629 - Replication of Invocation and Invoked Features This patch corrects an error in merging that occurred during manual merge. It corrects the order in which the originator column appears in the show structures. The error caused incorrect output on SHOW EVENTS commands.
Diffstat (limited to 'sql')
-rw-r--r--sql/event_data_objects.cc10
-rw-r--r--sql/event_queue.cc7
-rw-r--r--sql/sql_show.cc2
3 files changed, 14 insertions, 5 deletions
diff --git a/sql/event_data_objects.cc b/sql/event_data_objects.cc
index a639ff89fbe..7f54ac0dfe7 100644
--- a/sql/event_data_objects.cc
+++ b/sql/event_data_objects.cc
@@ -658,7 +658,8 @@ void Event_parse_data::check_originator_id(THD *thd)
(thd->system_thread == SYSTEM_THREAD_SLAVE_IO))
{
DBUG_PRINT("info", ("Invoked object status set to SLAVESIDE_DISABLED."));
- if (status == Event_basic::ENABLED)
+ if ((status == Event_basic::ENABLED) ||
+ (status == Event_basic::DISABLED))
status = Event_basic::SLAVESIDE_DISABLED;
originator = thd->server_id;
}
@@ -1590,6 +1591,13 @@ Event_queue_element::update_timing_fields(THD *thd)
status_changed= FALSE;
}
+ /*
+ Turn off row binlogging of event timing updates. These are not used
+ for RBR of events replicated to the slave.
+ */
+ if (thd->current_stmt_binlog_row_based)
+ thd->clear_current_stmt_binlog_row_based();
+
if ((table->file->ha_update_row(table->record[1], table->record[0])))
ret= TRUE;
diff --git a/sql/event_queue.cc b/sql/event_queue.cc
index c0f3166777c..4858becdf0d 100644
--- a/sql/event_queue.cc
+++ b/sql/event_queue.cc
@@ -197,8 +197,8 @@ Event_queue::create_event(THD *thd, Event_queue_element *new_element)
DBUG_PRINT("enter", ("thd: 0x%lx et=%s.%s", (long) thd,
new_element->dbname.str, new_element->name.str));
- if (res || new_element->status == Event_queue_element::DISABLED
- || new_element->status == Event_queue_element::SLAVESIDE_DISABLED)
+ if ((new_element->status == Event_queue_element::DISABLED)
+ || (new_element->status == Event_queue_element::SLAVESIDE_DISABLED))
delete new_element;
else
{
@@ -234,7 +234,8 @@ Event_queue::update_event(THD *thd, LEX_STRING dbname, LEX_STRING name,
DBUG_ENTER("Event_queue::update_event");
DBUG_PRINT("enter", ("thd: 0x%lx et=[%s.%s]", (long) thd, dbname.str, name.str));
- if (new_element->status == Event_queue_element::DISABLED)
+ if ((new_element->status == Event_queue_element::DISABLED) ||
+ (new_element->status == Event_queue_element::SLAVESIDE_DISABLED))
{
DBUG_PRINT("info", ("The event is disabled."));
/*
diff --git a/sql/sql_show.cc b/sql/sql_show.cc
index bb3f4a82e1b..2e2b661f932 100644
--- a/sql/sql_show.cc
+++ b/sql/sql_show.cc
@@ -5447,8 +5447,8 @@ ST_FIELD_INFO events_fields_info[]=
{"CREATED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
{"LAST_ALTERED", 0, MYSQL_TYPE_TIMESTAMP, 0, 0, 0},
{"LAST_EXECUTED", 0, MYSQL_TYPE_TIMESTAMP, 0, 1, 0},
- {"ORIGINATOR", 10, MYSQL_TYPE_LONG, 0, 0, "Originator"},
{"EVENT_COMMENT", NAME_LEN, MYSQL_TYPE_STRING, 0, 0, 0},
+ {"ORIGINATOR", 10, MYSQL_TYPE_LONG, 0, 0, "Originator"},
{0, 0, MYSQL_TYPE_STRING, 0, 0, 0}
};