From 27bb6c6f10968f4abb51d14c683908f623665512 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 14 Apr 2007 17:05:41 -0400 Subject: [PATCH] Fix rpl_trigger.test failure in the runtime tree. sql/sql_trigger.cc: Fix a failure of rpl_trigger.test: triggers are not SUID on replication slaves. --- sql/sql_trigger.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sql/sql_trigger.cc b/sql/sql_trigger.cc index 8da1137ff36..7b4deba527a 100644 --- a/sql/sql_trigger.cc +++ b/sql/sql_trigger.cc @@ -1544,10 +1544,11 @@ bool Table_triggers_list::process_triggers(THD *thd, trg_event_type event, } #ifndef NO_EMBEDDED_ACCESS_CHECKS Security_context *sctx= &sp_trigger->m_security_ctx; - Security_context *save_ctx; + Security_context *save_ctx= NULL; - if (sctx->change_security_context(thd, + if (sp_trigger->m_chistics->suid != SP_IS_NOT_SUID && + sctx->change_security_context(thd, &sp_trigger->m_definer_user, &sp_trigger->m_definer_host, &sp_trigger->m_db,