Below is the list of changes that have just been committed into a local
5.0 repository of bar. When bar 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
1.2425 07/02/27 12:46:50 bar@stripped +3 -0
Merge abarkov@stripped:/home/bk/mysql-5.0-rpl
into mysql.com:/home/bar/mysql-5.0.b24478
sql/sql_trigger.h
1.26 07/02/27 12:46:45 bar@stripped +0 -0
Auto merged
sql/sql_trigger.cc
1.64 07/02/27 12:46:45 bar@stripped +0 -0
Auto merged
sql/sql_parse.cc
1.605 07/02/27 12:46:45 bar@stripped +0 -0
Auto merged
# 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: bar
# Host: bar.myoffice.izhnet.ru
# Root: /home/bar/mysql-5.0.b24478/RESYNC
--- 1.604/sql/sql_parse.cc 2007-02-21 15:05:02 +04:00
+++ 1.605/sql/sql_parse.cc 2007-02-27 12:46:45 +04:00
@@ -32,6 +32,7 @@
#include "sp_head.h"
#include "sp.h"
#include "sp_cache.h"
+#include "sql_trigger.h"
#ifdef HAVE_OPENSSL
/*
@@ -2491,6 +2492,30 @@
#ifdef HAVE_REPLICATION
if (unlikely(thd->slave_thread))
{
+ if (lex->sql_command == SQLCOM_DROP_TRIGGER)
+ {
+ /*
+ When dropping a trigger, we need to load its table name
+ before checking slave filter rules.
+ */
+ add_table_for_trigger(thd, thd->lex->spname, 1, &all_tables);
+
+ if (!all_tables)
+ {
+ /*
+ If table name cannot be loaded,
+ it means the trigger does not exists possibly because
+ CREATE TRIGGER was previously skipped for this trigger
+ according to slave filtering rules.
+ Returning success without producing any errors in this case.
+ */
+ DBUG_RETURN(0);
+ }
+
+ // force searching in slave.cc:tables_ok()
+ all_tables->updating= 1;
+ }
+
/*
Check if statment should be skipped because of slave filtering
rules
--- 1.63/sql/sql_trigger.cc 2007-01-22 16:10:42 +04:00
+++ 1.64/sql/sql_trigger.cc 2007-02-27 12:46:45 +04:00
@@ -106,10 +106,6 @@
};
-static int
-add_table_for_trigger(THD *thd, sp_name *trig, bool if_exists,
- TABLE_LIST ** table);
-
class Handle_old_incorrect_sql_modes_hook: public Unknown_key_hook
{
private:
@@ -1182,7 +1178,7 @@
1 Error
*/
-static int
+int
add_table_for_trigger(THD *thd, sp_name *trig, bool if_exists,
TABLE_LIST **table)
{
--- 1.25/sql/sql_trigger.h 2007-01-22 16:10:42 +04:00
+++ 1.26/sql/sql_trigger.h 2007-02-27 12:46:45 +04:00
@@ -139,3 +139,7 @@
extern const LEX_STRING trg_action_time_type_names[];
extern const LEX_STRING trg_event_type_names[];
+
+int
+add_table_for_trigger(THD *thd, sp_name *trig, bool if_exists,
+ TABLE_LIST **table);
| Thread |
|---|
| • bk commit into 5.0 tree (bar:1.2425) | bar | 27 Feb |