1 #======================================================================
4 # test cases for TRIGGER privilege on db, table and column level
5 #======================================================================
7 --disable_abort_on_error
9 ###########################################
10 ################ Section 3.5.3 ############
11 # Check for Triggers in transactions #
12 ###########################################
14 # General setup to be used in all testcases
15 let $message= ######### Testcase
for transactions: ########;
16 --source include/show_msg.inc
19 drop database
if exists priv_db;
21 create database priv_db;
23 eval create
table t1 (f1
char(20)) engine= $engine_type;
25 create User test_yesprivs@localhost;
26 set password for test_yesprivs@localhost = password('PWD');
28 revoke ALL PRIVILEGES, GRANT OPTION FROM test_yesprivs@localhost;
30 connect (yes_privs,localhost,test_yesprivs,PWD,
test,$MASTER_MYPORT,$MASTER_MYSOCK);
34 grant select, insert, update ,trigger
35 on priv_db.t1
to test_yesprivs@localhost;
36 show grants for test_yesprivs@localhost;
42 create definer=current_user trigger trg1_1
43 before INSERT on t1 for each row
44 set new.f1 = 'trig 1_1-yes';
46 insert into t1 (f1) values ('insert-no');
47 select f1 from t1 order by f1;
49 create definer=test_yesprivs@localhost trigger trg1_2
50 before UPDATE on t1 for each row
51 set new.f1 = 'trig 1_2-yes';
53 update t1 set f1 = 'update-yes' where f1 like '%trig%';
54 select f1 from t1 order by f1;
58 --error ER_TRG_DOES_NOT_EXIST
78 drop database
if exists priv_db;
79 drop user test_yesprivs@localhost;