summaryrefslogtreecommitdiff
path: root/mysql-test/r/rpl_trigger.result
diff options
context:
space:
mode:
authorunknown <anozdrin@mysql.com>2006-03-01 14:13:07 +0300
committerunknown <anozdrin@mysql.com>2006-03-01 14:13:07 +0300
commita44a924a407ae1f1135a14ee750468e6fc88d9b0 (patch)
treebaf54f335b2a6ccc3c2d1da9406e0832ddb6c26b /mysql-test/r/rpl_trigger.result
parent2efabfd11a6fa5621c851a472c076e4ef5184d6d (diff)
downloadmariadb-git-a44a924a407ae1f1135a14ee750468e6fc88d9b0.tar.gz
Fix for BUG#16266: Definer is not fully qualified error during replication.
The idea of the fix is to extend support of non-SUID triggers for backward compatibility. Formerly non-SUID triggers were appeared when "new" server is being started against "old" database. Now, they are also created when "new" slave receives updates from "old" master. mysql-test/r/rpl_trigger.result: Updated the result file with the results of the test for BUG#16266. mysql-test/t/rpl_trigger.test: Added the test case for BUG#16266. sql/mysql_priv.h: Added an utility operation to be used from sql_yacc.yy. sql/sql_parse.cc: Add a utility operation to be used from sql_yacc.yy. sql/sql_trigger.cc: Extend support of non-SUID triggers. sql/sql_view.cc: Initialize LEX::definer if DEFINER-clause is missing. sql/sql_yacc.yy: Extended support of non-SUID triggers. mysql-test/std_data/bug16266.000001: A new binlog file for testing a patch for BUG#16266.
Diffstat (limited to 'mysql-test/r/rpl_trigger.result')
-rw-r--r--mysql-test/r/rpl_trigger.result41
1 files changed, 41 insertions, 0 deletions
diff --git a/mysql-test/r/rpl_trigger.result b/mysql-test/r/rpl_trigger.result
index ccd880c1e07..185862097bc 100644
--- a/mysql-test/r/rpl_trigger.result
+++ b/mysql-test/r/rpl_trigger.result
@@ -855,3 +855,44 @@ f3
drop trigger trg11;
drop table t21,t31;
drop table t11;
+STOP SLAVE;
+FLUSH LOGS;
+RESET SLAVE;
+START SLAVE;
+SELECT MASTER_POS_WAIT('master-bin.000001', 513) >= 0;
+MASTER_POS_WAIT('master-bin.000001', 513) >= 0
+1
+SHOW TABLES;
+Tables_in_test
+t1
+t2
+SHOW TRIGGERS;
+Trigger Event Table Statement Timing Created sql_mode Definer
+trg1 INSERT t1 INSERT INTO t2 VALUES(CURRENT_USER()) AFTER NULL
+SELECT * FROM t1;
+c
+1
+SELECT * FROM t2;
+s
+@
+INSERT INTO t1 VALUES(2);
+SELECT * FROM t1;
+c
+1
+2
+SELECT * FROM t2;
+s
+@
+root@localhost
+DROP TRIGGER trg1;
+Warnings:
+Warning 1454 No definer attribute for trigger 'test'.'trg1'. The trigger will be activated under the authorization of the invoker, which may have insufficient privileges. Please recreate the trigger.
+DROP TABLE t1;
+DROP TABLE t2;
+STOP SLAVE;
+RESET SLAVE;
+SHOW TABLES;
+Tables_in_test
+SHOW TRIGGERS;
+Trigger Event Table Statement Timing Created sql_mode Definer
+RESET MASTER;