mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Merge abarkov@bk-internal.mysql.com:/home/bk/mysql-5.0-rpl
into mysql.com:/home/bar/mysql-5.0.b24478
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user