summaryrefslogtreecommitdiff
path: root/mysql-test/r/rpl_sp.result
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 /mysql-test/r/rpl_sp.result
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 'mysql-test/r/rpl_sp.result')
-rw-r--r--mysql-test/r/rpl_sp.result35
1 files changed, 29 insertions, 6 deletions
diff --git a/mysql-test/r/rpl_sp.result b/mysql-test/r/rpl_sp.result
index 6e5fccfe4e2..7b3249d553a 100644
--- a/mysql-test/r/rpl_sp.result
+++ b/mysql-test/r/rpl_sp.result
@@ -158,9 +158,6 @@ a
select * from t2;
a
3
-select if(compte<>3,"this is broken but documented","this unexpectedly works?") from (select count(*) as compte from t2) as aggreg;
-if(compte<>3,"this is broken but documented","this unexpectedly works?")
-this is broken but documented
select * from mysql.proc where name="foo4" and db='mysqltest1';
db name type specific_name language sql_data_access is_deterministic security_type param_list returns body definer created modified sql_mode comment
mysqltest1 foo4 PROCEDURE foo4 SQL CONTAINS_SQL YES INVOKER begin
@@ -197,9 +194,6 @@ a
select * from t1;
a
21
-select if(compte<>1,"this is broken but documented","this unexpectedly works?") from (select count(*) as compte from t1 where a=20) as aggreg;
-if(compte<>1,"this is broken but documented","this unexpectedly works?")
-this is broken but documented
select * from t2;
a
23
@@ -230,6 +224,35 @@ db name type specific_name language sql_data_access is_deterministic security_ty
mysqltest1 fn1 FUNCTION fn1 SQL CONTAINS_SQL YES DEFINER int(11) begin
return unix_timestamp();
end @ # #
+create trigger trg before insert on t1 for each row set new.a= 10;
+ERROR 42000: Access denied; you need the SUPER privilege for this operation
+flush logs;
+delete from t1;
+create trigger trg before insert on t1 for each row set new.a= 10;
+insert into t1 values (1);
+select * from t1;
+a
+10
+select * from t1;
+a
+10
+delete from t1;
+drop trigger t1.trg;
+insert into t1 values (1);
+select * from t1;
+a
+1
+show binlog events in 'master-bin.000002' from 98;
+Log_name Pos Event_type Server_id End_log_pos Info
+master-bin.000002 # Query 1 # use `mysqltest1`; delete from t1
+master-bin.000002 # Query 1 # use `mysqltest1`; create trigger trg before insert on t1 for each row set new.a= 10
+master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1)
+master-bin.000002 # Query 1 # use `mysqltest1`; delete from t1
+master-bin.000002 # Query 1 # use `mysqltest1`; drop trigger t1.trg
+master-bin.000002 # Query 1 # use `mysqltest1`; insert into t1 values (1)
+select * from t1;
+a
+1
drop function fn1;
drop database mysqltest1;
drop user "zedjzlcsjhd"@127.0.0.1;