diff options
author | unknown <bar@mysql.com> | 2007-02-27 12:46:50 +0400 |
---|---|---|
committer | unknown <bar@mysql.com> | 2007-02-27 12:46:50 +0400 |
commit | e91d2738716b70c7375d0453f13d4c6c0a81dc53 (patch) | |
tree | 41b01787d0980a57b66e1361332118e7475bfa91 /sql/sql_parse.cc | |
parent | 1636d00fa7fd6ff2b8d5a0117efc44d7997860fb (diff) | |
parent | 7d883c0defe80a210a4b3cb2a9d1b2195497f5b8 (diff) | |
download | mariadb-git-e91d2738716b70c7375d0453f13d4c6c0a81dc53.tar.gz |
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into mysql.com:/home/bar/mysql-5.0.b24478
sql/sql_parse.cc:
Auto merged
sql/sql_trigger.cc:
Auto merged
sql/sql_trigger.h:
Auto merged
Diffstat (limited to 'sql/sql_parse.cc')
-rw-r--r-- | sql/sql_parse.cc | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/sql/sql_parse.cc b/sql/sql_parse.cc index 614e2ce7b72..4c250092ba6 100644 --- a/sql/sql_parse.cc +++ b/sql/sql_parse.cc @@ -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 @@ mysql_execute_command(THD *thd) #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 |