mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
Merge branch '10.3' into 10.4
This commit is contained in:
@ -221,31 +221,31 @@ connect user5_2, localhost, user_2, , db_storedproc_1;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
connection default;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
grant insert on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
connection user5_2;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
connection default;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
connection user5_2;
|
||||
@ -276,9 +276,9 @@ inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
@ -294,11 +294,11 @@ connection user5_2;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
disconnect user5_2;
|
||||
connection default;
|
||||
|
||||
@ -348,9 +348,9 @@ user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
@ -390,10 +390,10 @@ connect user6_4, localhost, user_2, , db_storedproc_1;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_ins();
|
||||
CALL sp3166_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
disconnect user6_4;
|
||||
connection default;
|
||||
CALL sp3166_s_i();
|
||||
|
@ -99,7 +99,7 @@ test_noprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
@ -135,7 +135,7 @@ Testcase 3.5.3.6:
|
||||
connection no_privs;
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
@ -688,7 +688,7 @@ insert into t2 values (new.f1);
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (4);
|
||||
ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
@ -706,7 +706,7 @@ update t2 set f2=new.f1-1;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (2);
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
@ -725,7 +725,7 @@ select f2 into @aaa from t2 where f2=new.f1;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
@ -748,7 +748,7 @@ delete from t2;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
|
@ -31,7 +31,7 @@ no trigger privilege on db level for create:
|
||||
use priv_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
@ -107,7 +107,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -117,7 +117,7 @@ use priv_db;
|
||||
no trigger privilege at activation time:
|
||||
----------------------------------------
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
@ -155,7 +155,7 @@ Grants for test_yesprivs@localhost
|
||||
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
|
||||
takes effect after use priv_db:
|
||||
-------------------------------
|
||||
@ -195,14 +195,14 @@ test_yesprivs@localhost
|
||||
use no_priv_db;
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use priv_db;
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-yes';
|
||||
use no_priv_db;
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use priv_db;
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
@ -302,7 +302,7 @@ Tables_in_priv_db
|
||||
t1
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -376,7 +376,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
|
||||
no trigger privilege at activation time:
|
||||
----------------------------------------
|
||||
@ -385,7 +385,7 @@ select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
insert into t1 (f1) values ('insert5-no');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert1-yes
|
||||
@ -476,12 +476,12 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-yes';
|
||||
create trigger trg2_2 before UPDATE on t2 for each row
|
||||
set new.f1 = 'trig 2_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
show triggers;
|
||||
@ -615,7 +615,7 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie
|
||||
select * from information_schema.triggers;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
drop trigger trg1_1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -635,7 +635,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -671,11 +671,11 @@ set new.f1 = 'trig 1_2-yes';
|
||||
create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
|
||||
for each row
|
||||
set new.f1 = 'trig 1_9-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use no_priv_db;
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
|
||||
for each row
|
||||
set new.f1 = 'trig 1_9-yes';
|
||||
@ -699,7 +699,7 @@ select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
drop trigger priv_db.trg1_9;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -708,7 +708,7 @@ drop trigger priv_db.trg1_9;
|
||||
revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
@ -728,7 +728,7 @@ test_yesprivs@localhost
|
||||
use no_priv_db;
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -843,7 +843,7 @@ set new.f1 = 'trig 2_1-yes';
|
||||
use priv2_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig1_1-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -918,7 +918,7 @@ test_yesprivs@localhost
|
||||
use priv1_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -945,7 +945,7 @@ create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -986,7 +986,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
|
||||
use priv1_db;
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-yes';
|
||||
@ -1110,7 +1110,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1122,7 +1122,7 @@ current_user
|
||||
test_useprivs@localhost
|
||||
prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1173,7 +1173,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1185,7 +1185,7 @@ select current_user;
|
||||
current_user
|
||||
test_useprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1240,7 +1240,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1255,7 +1255,7 @@ select current_user;
|
||||
current_user
|
||||
test_useprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1323,11 +1323,11 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-no');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
drop trigger trg1_0;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -1638,12 +1638,12 @@ update t1 set f1 = 'update6_no'
|
||||
where f1 like '%insert%';
|
||||
update t2 set f1 = 'update6_no'
|
||||
where f1 like '%insert%';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
update t1 set f1 = 'update7_no'
|
||||
where f1 like '%insert%';
|
||||
update t2 set f1 = 'update7_no'
|
||||
where f1 like '%insert%';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1669,7 +1669,7 @@ test_noprivs@localhost
|
||||
update t1 set f1 = 'update8-no',
|
||||
f2 = 'update8-no'
|
||||
where f2 like '%yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select * from t1 order by f1,f2,f3;
|
||||
f1 f2 f3
|
||||
trig 1_1-yes NULL NULL
|
||||
@ -1743,7 +1743,7 @@ current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
update t1 set f3= f3+1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f3 from t1 order by f3;
|
||||
f3
|
||||
NULL
|
||||
|
@ -170,7 +170,7 @@ Field Type Null Key Default Extra
|
||||
f1 char(10) YES MUL NULL
|
||||
f2 text YES NULL
|
||||
SHOW COLUMNS FROM db_datadict.t2;
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 't2'
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `db_datadict`.`t2`
|
||||
SHOW COLUMNS FROM db_datadict.v1;
|
||||
Field Type Null Key Default Extra
|
||||
f2 int(1) NO 0
|
||||
@ -182,13 +182,13 @@ TABLE_CATALOG TABLE_SCHEMA TABLE_NAME COLUMN_NAME ORDINAL_POSITION COLUMN_DEFAUL
|
||||
def db_datadict t2 f1 1 NULL NO char 10 10 NULL NULL NULL latin1 latin1_swedish_ci char(10) PRI insert NEVER NULL
|
||||
def db_datadict t2 f2 2 NULL YES text 65535 65535 NULL NULL NULL latin1 latin1_swedish_ci text insert NEVER NULL
|
||||
SHOW COLUMNS FROM db_datadict.t1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 't1'
|
||||
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `db_datadict`.`t1`
|
||||
SHOW COLUMNS FROM db_datadict.t2;
|
||||
Field Type Null Key Default Extra
|
||||
f1 char(10) NO PRI NULL
|
||||
f2 text YES NULL
|
||||
SHOW COLUMNS FROM db_datadict.v1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'v1'
|
||||
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `db_datadict`.`v1`
|
||||
connection default;
|
||||
disconnect testuser1;
|
||||
disconnect testuser2;
|
||||
|
@ -150,7 +150,7 @@ t1 0 my_idx1 1 f6 ### ### ### ### ### ### ###
|
||||
t1 0 my_idx1 2 f1 ### ### ### ### ### ### ###
|
||||
t1 0 my_idx2 1 f3 ### ### ### ### ### ### ###
|
||||
SHOW INDEXES FROM db_datadict.t2;
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 't2'
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `db_datadict`.`t2`
|
||||
connection default;
|
||||
disconnect testuser1;
|
||||
DROP USER 'testuser1'@'localhost';
|
||||
|
@ -172,9 +172,9 @@ Grants for testuser4@localhost
|
||||
GRANT TRIGGER ON *.* TO `testuser4`@`localhost`
|
||||
# TRIGGER Privilege + no SELECT Privilege on t1 --> result for query
|
||||
SELECT * FROM db_datadict.t1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table 't1'
|
||||
ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table `db_datadict`.`t1`
|
||||
DESC db_datadict.t1;
|
||||
ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table 't1'
|
||||
ERROR 42000: SELECT command denied to user 'testuser4'@'localhost' for table `db_datadict`.`t1`
|
||||
SELECT * FROM information_schema.triggers
|
||||
WHERE trigger_name = 'trg1';
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
|
@ -349,7 +349,7 @@ PRIVILEGE_TYPE UPDATE
|
||||
IS_GRANTABLE NO
|
||||
SELECT host,user,json_detailed(priv) FROM mysql.global_priv
|
||||
WHERE user LIKE 'testuser%' ORDER BY host, user;
|
||||
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table 'global_priv'
|
||||
ERROR 42000: SELECT command denied to user 'testuser2'@'localhost' for table `mysql`.`global_priv`
|
||||
SHOW GRANTS;
|
||||
Grants for testuser2@localhost
|
||||
GRANT INSERT, UPDATE ON *.* TO `testuser2`@`localhost`
|
||||
@ -363,7 +363,7 @@ PRIVILEGE_TYPE USAGE
|
||||
IS_GRANTABLE NO
|
||||
SELECT host,user,json_detailed(priv) FROM mysql.global_priv
|
||||
WHERE user LIKE 'testuser%' ORDER BY host, user;
|
||||
ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table 'global_priv'
|
||||
ERROR 42000: SELECT command denied to user 'testuser3'@'localhost' for table `mysql`.`global_priv`
|
||||
SHOW GRANTS;
|
||||
Grants for testuser3@localhost
|
||||
GRANT USAGE ON *.* TO `testuser3`@`localhost`
|
||||
@ -426,12 +426,12 @@ PRIVILEGE_TYPE USAGE
|
||||
IS_GRANTABLE NO
|
||||
SELECT host,user,json_detailed(priv) FROM mysql.global_priv
|
||||
WHERE user LIKE 'testuser%' ORDER BY host, user;
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`global_priv`
|
||||
SHOW GRANTS;
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
CREATE TABLE db_datadict.tb_55 ( c1 TEXT );
|
||||
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_55'
|
||||
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_55`
|
||||
SELECT * FROM information_schema.user_privileges
|
||||
WHERE grantee LIKE '''testuser%'''
|
||||
ORDER BY grantee, table_catalog, privilege_type;
|
||||
@ -441,12 +441,12 @@ PRIVILEGE_TYPE USAGE
|
||||
IS_GRANTABLE NO
|
||||
SELECT host,user,json_detailed(priv) FROM mysql.global_priv
|
||||
WHERE user LIKE 'testuser%' ORDER BY host, user;
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`global_priv`
|
||||
SHOW GRANTS;
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
CREATE TABLE db_datadict.tb_66 ( c1 TEXT );
|
||||
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_66'
|
||||
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_66`
|
||||
|
||||
# Add ALL on db_datadict.* (and select on mysql.global_priv) to testuser1;
|
||||
connection default;
|
||||
@ -537,7 +537,7 @@ GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
GRANT ALL PRIVILEGES ON `db_datadict`.* TO `testuser1`@`localhost` WITH GRANT OPTION
|
||||
GRANT SELECT ON `mysql`.`global_priv` TO `testuser1`@`localhost`
|
||||
CREATE TABLE db_datadict.tb_56 ( c1 TEXT );
|
||||
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table 'tb_56'
|
||||
ERROR 42000: CREATE command denied to user 'testuser1'@'localhost' for table `db_datadict`.`tb_56`
|
||||
USE db_datadict;
|
||||
SELECT * FROM information_schema.user_privileges
|
||||
WHERE grantee LIKE '''testuser%'''
|
||||
@ -638,7 +638,7 @@ PRIVILEGE_TYPE USAGE
|
||||
IS_GRANTABLE NO
|
||||
SELECT host,user,json_detailed(priv) FROM mysql.global_priv
|
||||
WHERE user LIKE 'testuser%' ORDER BY host, user;
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table 'global_priv'
|
||||
ERROR 42000: SELECT command denied to user 'testuser1'@'localhost' for table `mysql`.`global_priv`
|
||||
SHOW GRANTS;
|
||||
Grants for testuser1@localhost
|
||||
GRANT USAGE ON *.* TO `testuser1`@`localhost`
|
||||
|
@ -221,31 +221,31 @@ connect user5_2, localhost, user_2, , db_storedproc_1;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
connection default;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
grant insert on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
connection user5_2;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
connection default;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
connection user5_2;
|
||||
@ -276,9 +276,9 @@ inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
@ -294,11 +294,11 @@ connection user5_2;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
disconnect user5_2;
|
||||
connection default;
|
||||
|
||||
@ -348,9 +348,9 @@ user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
@ -390,10 +390,10 @@ connect user6_4, localhost, user_2, , db_storedproc_1;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_ins();
|
||||
CALL sp3166_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
disconnect user6_4;
|
||||
connection default;
|
||||
CALL sp3166_s_i();
|
||||
|
@ -99,7 +99,7 @@ test_noprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
@ -135,7 +135,7 @@ Testcase 3.5.3.6:
|
||||
connection no_privs;
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
@ -688,7 +688,7 @@ insert into t2 values (new.f1);
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (4);
|
||||
ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
@ -706,7 +706,7 @@ update t2 set f2=new.f1-1;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (2);
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
@ -725,7 +725,7 @@ select f2 into @aaa from t2 where f2=new.f1;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
@ -748,7 +748,7 @@ delete from t2;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
|
@ -32,7 +32,7 @@ no trigger privilege on db level for create:
|
||||
use priv_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
@ -108,7 +108,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -118,7 +118,7 @@ use priv_db;
|
||||
no trigger privilege at activation time:
|
||||
----------------------------------------
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
@ -156,7 +156,7 @@ Grants for test_yesprivs@localhost
|
||||
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
|
||||
takes effect after use priv_db:
|
||||
-------------------------------
|
||||
@ -196,14 +196,14 @@ test_yesprivs@localhost
|
||||
use no_priv_db;
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use priv_db;
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-yes';
|
||||
use no_priv_db;
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use priv_db;
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
@ -303,7 +303,7 @@ Tables_in_priv_db
|
||||
t1
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -377,7 +377,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
|
||||
no trigger privilege at activation time:
|
||||
----------------------------------------
|
||||
@ -386,7 +386,7 @@ select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
insert into t1 (f1) values ('insert5-no');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert1-yes
|
||||
@ -477,12 +477,12 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-yes';
|
||||
create trigger trg2_2 before UPDATE on t2 for each row
|
||||
set new.f1 = 'trig 2_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
show triggers;
|
||||
@ -616,7 +616,7 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie
|
||||
select * from information_schema.triggers;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
drop trigger trg1_1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -636,7 +636,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -672,11 +672,11 @@ set new.f1 = 'trig 1_2-yes';
|
||||
create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
|
||||
for each row
|
||||
set new.f1 = 'trig 1_9-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use no_priv_db;
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
|
||||
for each row
|
||||
set new.f1 = 'trig 1_9-yes';
|
||||
@ -700,7 +700,7 @@ select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
drop trigger priv_db.trg1_9;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -709,7 +709,7 @@ drop trigger priv_db.trg1_9;
|
||||
revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
@ -729,7 +729,7 @@ test_yesprivs@localhost
|
||||
use no_priv_db;
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -844,7 +844,7 @@ set new.f1 = 'trig 2_1-yes';
|
||||
use priv2_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig1_1-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -919,7 +919,7 @@ test_yesprivs@localhost
|
||||
use priv1_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -946,7 +946,7 @@ create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -987,7 +987,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
|
||||
use priv1_db;
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-yes';
|
||||
@ -1111,7 +1111,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1123,7 +1123,7 @@ current_user
|
||||
test_useprivs@localhost
|
||||
prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1174,7 +1174,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1186,7 +1186,7 @@ select current_user;
|
||||
current_user
|
||||
test_useprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1241,7 +1241,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1256,7 +1256,7 @@ select current_user;
|
||||
current_user
|
||||
test_useprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1324,11 +1324,11 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-no');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
drop trigger trg1_0;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -1577,12 +1577,12 @@ update t1 set f1 = 'update6_no'
|
||||
where f1 like '%insert%';
|
||||
update t2 set f1 = 'update6_no'
|
||||
where f1 like '%insert%';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
update t1 set f1 = 'update7_no'
|
||||
where f1 like '%insert%';
|
||||
update t2 set f1 = 'update7_no'
|
||||
where f1 like '%insert%';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1608,7 +1608,7 @@ test_noprivs@localhost
|
||||
update t1 set f1 = 'update8-no',
|
||||
f2 = 'update8-no'
|
||||
where f2 like '%yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select * from t1 order by f1,f2,f3;
|
||||
f1 f2 f3
|
||||
trig 1_1-yes NULL NULL
|
||||
@ -1682,7 +1682,7 @@ current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
update t1 set f3= f3+1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f3 from t1 order by f3;
|
||||
f3
|
||||
NULL
|
||||
|
@ -221,31 +221,31 @@ connect user5_2, localhost, user_2, , db_storedproc_1;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
connection default;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
grant insert on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
connection user5_2;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
connection default;
|
||||
|
||||
root@localhost db_storedproc_1
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
grant SELECT on db_storedproc_1.* to 'user_1'@'localhost';
|
||||
flush privileges;
|
||||
connection user5_2;
|
||||
@ -276,9 +276,9 @@ inserted outside of SP NULL
|
||||
inserted from sp5_ins 2000-10-00
|
||||
inserted from sp5_s_i 2000-10-00
|
||||
inserted from sp5_ins 2000-10-00
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
c1 c2 c3
|
||||
inserted outside of SP NULL
|
||||
@ -294,11 +294,11 @@ connection user5_2;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp5_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
CALL sp5_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table 't3165'
|
||||
ERROR 42000: SELECT command denied to user 'user_1'@'localhost' for table `db_storedproc_1`.`t3165`
|
||||
disconnect user5_2;
|
||||
connection default;
|
||||
|
||||
@ -348,9 +348,9 @@ user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
c1
|
||||
inserted outside SP
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_ins();
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: INSERT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_sel();
|
||||
c1
|
||||
inserted outside SP
|
||||
@ -390,10 +390,10 @@ connect user6_4, localhost, user_2, , db_storedproc_1;
|
||||
|
||||
user_2@localhost db_storedproc_1
|
||||
CALL sp3166_s_i();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
CALL sp3166_ins();
|
||||
CALL sp3166_sel();
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table 't3166'
|
||||
ERROR 42000: SELECT command denied to user 'user_2'@'localhost' for table `db_storedproc_1`.`t3166`
|
||||
disconnect user6_4;
|
||||
connection default;
|
||||
CALL sp3166_s_i();
|
||||
|
@ -99,7 +99,7 @@ test_noprivs@localhost
|
||||
use priv_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 3.5.3.2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.2-no');
|
||||
@ -135,7 +135,7 @@ Testcase 3.5.3.6:
|
||||
connection no_privs;
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert 3.5.3.6-yes');
|
||||
@ -688,7 +688,7 @@ insert into t2 values (new.f1);
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (4);
|
||||
ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: INSERT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant INSERT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (4);
|
||||
@ -706,7 +706,7 @@ update t2 set f2=new.f1-1;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (2);
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: UPDATE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke INSERT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant UPDATE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (2);
|
||||
@ -725,7 +725,7 @@ select f2 into @aaa from t2 where f2=new.f1;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: SELECT command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke UPDATE on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant SELECT on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
@ -748,7 +748,7 @@ delete from t2;
|
||||
connection default;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values (1);
|
||||
ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: DELETE command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
revoke SELECT on priv_db.t2 from test_yesprivs@localhost;
|
||||
grant DELETE on priv_db.t2 to test_yesprivs@localhost;
|
||||
insert into t1 (f1) values (1);
|
||||
|
@ -32,7 +32,7 @@ no trigger privilege on db level for create:
|
||||
use priv_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connect no_privs,localhost,test_noprivs,PWD,test,$MASTER_MYPORT,$MASTER_MYSOCK;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
@ -108,7 +108,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -118,7 +118,7 @@ use priv_db;
|
||||
no trigger privilege at activation time:
|
||||
----------------------------------------
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
@ -156,7 +156,7 @@ Grants for test_yesprivs@localhost
|
||||
GRANT USAGE ON *.* TO `test_yesprivs`@`localhost` IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
|
||||
GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO `test_yesprivs`@`localhost`
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
|
||||
takes effect after use priv_db:
|
||||
-------------------------------
|
||||
@ -196,14 +196,14 @@ test_yesprivs@localhost
|
||||
use no_priv_db;
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use priv_db;
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-yes';
|
||||
use no_priv_db;
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use priv_db;
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
@ -303,7 +303,7 @@ Tables_in_priv_db
|
||||
t1
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -377,7 +377,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
drop trigger trg1_2;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
|
||||
no trigger privilege at activation time:
|
||||
----------------------------------------
|
||||
@ -386,7 +386,7 @@ select current_user;
|
||||
current_user
|
||||
test_noprivs@localhost
|
||||
insert into t1 (f1) values ('insert5-no');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert1-yes
|
||||
@ -477,12 +477,12 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
create trigger trg1_3 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_3-yes';
|
||||
create trigger trg2_2 before UPDATE on t2 for each row
|
||||
set new.f1 = 'trig 2_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
create trigger trg1_4 before UPDATE on t1 for each row
|
||||
set new.f1 = 'trig 1_4-yes';
|
||||
show triggers;
|
||||
@ -616,7 +616,7 @@ Trigger Event Table Statement Timing Created sql_mode Definer character_set_clie
|
||||
select * from information_schema.triggers;
|
||||
TRIGGER_CATALOG TRIGGER_SCHEMA TRIGGER_NAME EVENT_MANIPULATION EVENT_OBJECT_CATALOG EVENT_OBJECT_SCHEMA EVENT_OBJECT_TABLE ACTION_ORDER ACTION_CONDITION ACTION_STATEMENT ACTION_ORIENTATION ACTION_TIMING ACTION_REFERENCE_OLD_TABLE ACTION_REFERENCE_NEW_TABLE ACTION_REFERENCE_OLD_ROW ACTION_REFERENCE_NEW_ROW CREATED SQL_MODE DEFINER CHARACTER_SET_CLIENT COLLATION_CONNECTION DATABASE_COLLATION
|
||||
drop trigger trg1_1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -636,7 +636,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -672,11 +672,11 @@ set new.f1 = 'trig 1_2-yes';
|
||||
create trigger no_priv_db.trg1_9 before insert on no_priv_db.t1
|
||||
for each row
|
||||
set new.f1 = 'trig 1_9-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
use no_priv_db;
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
create trigger priv_db.trg1_9 before UPDATE on priv_db.t1
|
||||
for each row
|
||||
set new.f1 = 'trig 1_9-yes';
|
||||
@ -700,7 +700,7 @@ select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
drop trigger priv_db.trg1_9;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_noprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -709,7 +709,7 @@ drop trigger priv_db.trg1_9;
|
||||
revoke TRIGGER on priv_db.* from test_yesprivs@localhost;
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-yes');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
insert-yes
|
||||
@ -729,7 +729,7 @@ test_yesprivs@localhost
|
||||
use no_priv_db;
|
||||
create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `no_priv_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -844,7 +844,7 @@ set new.f1 = 'trig 2_1-yes';
|
||||
use priv2_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig1_1-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv2_db`.`t1`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -919,7 +919,7 @@ test_yesprivs@localhost
|
||||
use priv1_db;
|
||||
create trigger trg1_1 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -946,7 +946,7 @@ create trigger trg1_2 before INSERT on t1 for each row
|
||||
set new.f1 = 'trig 1_2-yes';
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-no';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
|
||||
connection no_privs;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -987,7 +987,7 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv1_db`.`t2`
|
||||
use priv1_db;
|
||||
create trigger trg2_1 before INSERT on t2 for each row
|
||||
set new.f1 = 'trig 2_1-yes';
|
||||
@ -1111,7 +1111,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1123,7 +1123,7 @@ current_user
|
||||
test_useprivs@localhost
|
||||
prepare ins1 from 'insert into t1 (f1) values (''insert5-no'')';
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1174,7 +1174,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1186,7 +1186,7 @@ select current_user;
|
||||
current_user
|
||||
test_useprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1241,7 +1241,7 @@ select current_user;
|
||||
current_user
|
||||
test_yesprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1256,7 +1256,7 @@ select current_user;
|
||||
current_user
|
||||
test_useprivs@localhost
|
||||
execute ins1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1324,11 +1324,11 @@ current_user
|
||||
test_yesprivs@localhost
|
||||
use priv_db;
|
||||
insert into t1 (f1) values ('insert-no');
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
drop trigger trg1_0;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
connection default;
|
||||
select current_user;
|
||||
current_user
|
||||
@ -1577,12 +1577,12 @@ update t1 set f1 = 'update6_no'
|
||||
where f1 like '%insert%';
|
||||
update t2 set f1 = 'update6_no'
|
||||
where f1 like '%insert%';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
update t1 set f1 = 'update7_no'
|
||||
where f1 like '%insert%';
|
||||
update t2 set f1 = 'update7_no'
|
||||
where f1 like '%insert%';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't2'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t2`
|
||||
select f1 from t1 order by f1;
|
||||
f1
|
||||
trig 1_1-yes
|
||||
@ -1608,7 +1608,7 @@ test_noprivs@localhost
|
||||
update t1 set f1 = 'update8-no',
|
||||
f2 = 'update8-no'
|
||||
where f2 like '%yes';
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select * from t1 order by f1,f2,f3;
|
||||
f1 f2 f3
|
||||
trig 1_1-yes NULL NULL
|
||||
@ -1682,7 +1682,7 @@ current_user
|
||||
test_noprivs@localhost
|
||||
use priv_db;
|
||||
update t1 set f3= f3+1;
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
|
||||
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table `priv_db`.`t1`
|
||||
select f3 from t1 order by f3;
|
||||
f3
|
||||
NULL
|
||||
|
@ -1849,7 +1849,7 @@ connection u_1;
|
||||
user_1@localhost db_storedproc
|
||||
USE db_storedproc;
|
||||
CALL sp11();
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table 't1'
|
||||
ERROR 42000: INSERT command denied to user 'user_1'@'localhost' for table `mysql`.`t1`
|
||||
commit work;
|
||||
disconnect u_1;
|
||||
connection default;
|
||||
|
Reference in New Issue
Block a user