summaryrefslogtreecommitdiff
path: root/sql/sql_trigger.h
diff options
context:
space:
mode:
authorunknown <gbichot@quadita2.mysql.com>2005-05-06 18:52:19 +0200
committerunknown <gbichot@quadita2.mysql.com>2005-05-06 18:52:19 +0200
commit6f83de163b311f05aa95c5d79879425fa1326535 (patch)
tree4f486a352732a6b1f04e190b6cf3f4d62fc3a5df /sql/sql_trigger.h
parentf1def25a89e3dc2ed191335e9d5f7843de245e0a (diff)
downloadmariadb-git-6f83de163b311f05aa95c5d79879425fa1326535.tar.gz
Dmitri please review. Fix for BUG#10417 "CREATE TRIGGER not written to binlog":
writing DROP and CREATE TRIGGER to binlog, disabling binlogging of substatements, testing. mysql-test/r/rpl_sp.result: result update mysql-test/t/rpl_sp.test: removing useless lines, plus testing replication of triggers sql/sql_trigger.cc: trigger can be used to destroy slave, so only SUPER can create it by default. If create|drop goes ok, binlog CREATE TRIGGER and DROP TRIGGER. sql/sql_trigger.h: disable binlogging of substatements of triggers (even if now triggers can't do updates)
Diffstat (limited to 'sql/sql_trigger.h')
-rw-r--r--sql/sql_trigger.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/sql/sql_trigger.h b/sql/sql_trigger.h
index 7dd6734eb89..26cfb114cde 100644
--- a/sql/sql_trigger.h
+++ b/sql/sql_trigger.h
@@ -52,7 +52,15 @@ public:
FIXME: We should juggle with security context here (because trigger
should be invoked with creator rights).
*/
+ /*
+ Guilhem puts code to disable binlogging, as in SP/functions, even
+ though currently triggers can't do updates. When triggers can do
+ updates, someone should add such a trigger to rpl_sp.test to verify
+ that the update does NOT go into binlog.
+ */
+ tmp_disable_binlog(thd);
res= bodies[event][time_type]->execute_function(thd, 0, 0, 0);
+ reenable_binlog(thd);
#ifndef EMBEDDED_LIBRARY
thd->net.no_send_ok= nsok;