Skip to content

Commit c655515

Browse files
author
V S Murthy Sidagam
committed
Bug #20683237 BACKPORT 19817663 TO 5.1 and 5.5
Restrict when user table hashes can be viewed. Require SUPER privileges.
1 parent eb79ead commit c655515

10 files changed

+87
-80
lines changed

mysql-test/r/ps_grant.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ current_user()
1818
second_user@localhost
1919
show grants for current_user();
2020
Grants for second_user@localhost
21-
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
21+
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD <secret>
2222
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
2323
prepare s_t9 from 'select c1 as my_col
2424
from t9 where c1= 1' ;
@@ -42,7 +42,7 @@ GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
4242
GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost'
4343
show grants for second_user@localhost ;
4444
Grants for second_user@localhost
45-
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
45+
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD <secret>
4646
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
4747
GRANT SELECT ON `mysqltest`.`t1` TO 'second_user'@'localhost'
4848
prepare s_t1 from 'select a as my_col from t1' ;
@@ -63,7 +63,7 @@ GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE
6363
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
6464
show grants for second_user@localhost ;
6565
Grants for second_user@localhost
66-
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD '*13843FE600B19A81E32AF50D4A6FED25875FF1F3'
66+
GRANT USAGE ON *.* TO 'second_user'@'localhost' IDENTIFIED BY PASSWORD <secret>
6767
GRANT SELECT ON `mysqltest`.`t9` TO 'second_user'@'localhost'
6868
execute s_t1 ;
6969
ERROR 42000: SELECT command denied to user 'second_user'@'localhost' for table 't1'

mysql-test/suite/funcs_1/r/innodb_trig_03.result

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ current_user
189189
test_yesprivs@localhost
190190
show grants;
191191
Grants for test_yesprivs@localhost
192-
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
192+
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
193193
create trigger trg4a_2 before INSERT on t1 for each row
194194
set new.f1 = 'trig 3.5.3.7-2a';
195195
insert into t1 (f1) values ('insert 3.5.3.7-2b');
@@ -220,7 +220,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49
220220
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
221221
show grants;
222222
Grants for test_noprivs@localhost
223-
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
223+
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
224224
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
225225
use priv_db;
226226
create trigger trg4b_1 before UPDATE on t1 for each row
@@ -247,7 +247,7 @@ trig 3.5.3.7-2a
247247
drop trigger trg4b_1;
248248
show grants;
249249
Grants for test_yesprivs@localhost
250-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
250+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
251251
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
252252
use priv_db;
253253
create trigger trg4b_2 before UPDATE on t1 for each row
@@ -292,7 +292,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49
292292
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
293293
show grants;
294294
Grants for test_noprivs@localhost
295-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
295+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
296296
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
297297
use priv_db;
298298
create trigger trg4c_1 before INSERT on t1 for each row
@@ -311,7 +311,7 @@ trig 3.5.3.7-2b
311311
drop trigger trg4c_1;
312312
show grants;
313313
Grants for test_yesprivs@localhost
314-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
314+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
315315
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
316316
use priv_db;
317317
create trigger trg4c_2 before INSERT on t1 for each row
@@ -345,7 +345,7 @@ Grants for test_noprivs@%
345345
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
346346
show grants;
347347
Grants for test_noprivs@localhost
348-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
348+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
349349
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
350350
use priv_db;
351351
create trigger trg4d_1 before INSERT on t1 for each row
@@ -365,7 +365,7 @@ trig 3.5.3.7-2c
365365
drop trigger trg4d_1;
366366
show grants;
367367
Grants for test_yesprivs@localhost
368-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
368+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
369369
GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
370370
use priv_db;
371371
create trigger trg4d_2 before INSERT on t1 for each row
@@ -422,7 +422,7 @@ current_user
422422
test_yesprivs@localhost
423423
show grants;
424424
Grants for test_yesprivs@localhost
425-
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
425+
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
426426
create trigger trg5a_2 before INSERT on t1 for each row
427427
set @test_var= new.f1;
428428
set @test_var= 'before trig 3.5.3.8-2a';
@@ -454,7 +454,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49
454454
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
455455
show grants;
456456
Grants for test_noprivs@localhost
457-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
457+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
458458
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
459459
use priv_db;
460460
create trigger trg5b_1 before UPDATE on t1 for each row
@@ -472,7 +472,7 @@ before trig 3.5.3.8-1b
472472
drop trigger trg5b_1;
473473
show grants;
474474
Grants for test_yesprivs@localhost
475-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
475+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
476476
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
477477
use priv_db;
478478
create trigger trg5b_2 before UPDATE on t1 for each row
@@ -507,7 +507,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49
507507
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
508508
show grants;
509509
Grants for test_noprivs@localhost
510-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
510+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
511511
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
512512
use priv_db;
513513
create trigger trg5c_1 before INSERT on t1 for each row
@@ -521,7 +521,7 @@ before trig 3.5.3.8-1c
521521
drop trigger trg5c_1;
522522
show grants;
523523
Grants for test_yesprivs@localhost
524-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
524+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
525525
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
526526
use priv_db;
527527
create trigger trg5c_2 before INSERT on t1 for each row
@@ -551,7 +551,7 @@ GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C497
551551
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
552552
show grants;
553553
Grants for test_noprivs@localhost
554-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
554+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
555555
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
556556
use priv_db;
557557
create trigger trg5d_1 before INSERT on t1 for each row
@@ -565,7 +565,7 @@ before trig 3.5.3.8-1d
565565
drop trigger trg5d_1;
566566
show grants;
567567
Grants for test_yesprivs@localhost
568-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
568+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
569569
GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
570570
use priv_db;
571571
create trigger trg5d_2 before INSERT on t1 for each row

mysql-test/suite/funcs_1/r/innodb_trig_03e.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ current_user
139139
test_yesprivs@localhost
140140
show grants for test_yesprivs@localhost;
141141
Grants for test_yesprivs@localhost
142-
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
142+
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
143143
GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost'
144144
drop trigger trg1_2;
145145
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
@@ -387,7 +387,7 @@ current_user
387387
test_yesprivs@localhost
388388
show grants for test_yesprivs@localhost;
389389
Grants for test_yesprivs@localhost
390-
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
390+
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
391391
GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
392392
drop trigger trg1_2;
393393
select current_user;
@@ -1265,7 +1265,7 @@ current_user
12651265
test_yesprivs@localhost
12661266
show grants;
12671267
Grants for test_yesprivs@localhost
1268-
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
1268+
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
12691269
GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION
12701270
GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
12711271
create definer=not_ex_user@localhost trigger trg1_3

mysql-test/suite/funcs_1/r/memory_trig_03.result

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ current_user
190190
test_yesprivs@localhost
191191
show grants;
192192
Grants for test_yesprivs@localhost
193-
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
193+
GRANT UPDATE, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
194194
create trigger trg4a_2 before INSERT on t1 for each row
195195
set new.f1 = 'trig 3.5.3.7-2a';
196196
insert into t1 (f1) values ('insert 3.5.3.7-2b');
@@ -221,7 +221,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49
221221
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
222222
show grants;
223223
Grants for test_noprivs@localhost
224-
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
224+
GRANT USAGE ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
225225
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
226226
use priv_db;
227227
create trigger trg4b_1 before UPDATE on t1 for each row
@@ -248,7 +248,7 @@ trig 3.5.3.7-2a
248248
drop trigger trg4b_1;
249249
show grants;
250250
Grants for test_yesprivs@localhost
251-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
251+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
252252
GRANT UPDATE ON `priv_db`.* TO 'test_yesprivs'@'localhost'
253253
use priv_db;
254254
create trigger trg4b_2 before UPDATE on t1 for each row
@@ -293,7 +293,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49
293293
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
294294
show grants;
295295
Grants for test_noprivs@localhost
296-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
296+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
297297
GRANT SELECT, INSERT, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
298298
use priv_db;
299299
create trigger trg4c_1 before INSERT on t1 for each row
@@ -312,7 +312,7 @@ trig 3.5.3.7-2b
312312
drop trigger trg4c_1;
313313
show grants;
314314
Grants for test_yesprivs@localhost
315-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
315+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
316316
GRANT UPDATE ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
317317
use priv_db;
318318
create trigger trg4c_2 before INSERT on t1 for each row
@@ -346,7 +346,7 @@ Grants for test_noprivs@%
346346
GRANT TRIGGER ON *.* TO 'test_noprivs'@'%'
347347
show grants;
348348
Grants for test_noprivs@localhost
349-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
349+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
350350
GRANT SELECT (f1), INSERT (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
351351
use priv_db;
352352
create trigger trg4d_1 before INSERT on t1 for each row
@@ -366,7 +366,7 @@ trig 3.5.3.7-2c
366366
drop trigger trg4d_1;
367367
show grants;
368368
Grants for test_yesprivs@localhost
369-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
369+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
370370
GRANT UPDATE (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
371371
use priv_db;
372372
create trigger trg4d_2 before INSERT on t1 for each row
@@ -423,7 +423,7 @@ current_user
423423
test_yesprivs@localhost
424424
show grants;
425425
Grants for test_yesprivs@localhost
426-
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
426+
GRANT SELECT, TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
427427
create trigger trg5a_2 before INSERT on t1 for each row
428428
set @test_var= new.f1;
429429
set @test_var= 'before trig 3.5.3.8-2a';
@@ -455,7 +455,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49
455455
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
456456
show grants;
457457
Grants for test_noprivs@localhost
458-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
458+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
459459
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE TEMPORARY TABLES, LOCK TABLES, EXECUTE, CREATE VIEW, SHOW VIEW, CREATE ROUTINE, ALTER ROUTINE, EVENT, TRIGGER ON `priv_db`.* TO 'test_noprivs'@'localhost'
460460
use priv_db;
461461
create trigger trg5b_1 before UPDATE on t1 for each row
@@ -473,7 +473,7 @@ before trig 3.5.3.8-1b
473473
drop trigger trg5b_1;
474474
show grants;
475475
Grants for test_yesprivs@localhost
476-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
476+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
477477
GRANT SELECT ON `priv_db`.* TO 'test_yesprivs'@'localhost'
478478
use priv_db;
479479
create trigger trg5b_2 before UPDATE on t1 for each row
@@ -508,7 +508,7 @@ GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49
508508
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
509509
show grants;
510510
Grants for test_noprivs@localhost
511-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
511+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
512512
GRANT INSERT, UPDATE, DELETE, CREATE, DROP, REFERENCES, INDEX, ALTER, CREATE VIEW, SHOW VIEW, TRIGGER ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
513513
use priv_db;
514514
create trigger trg5c_1 before INSERT on t1 for each row
@@ -522,7 +522,7 @@ before trig 3.5.3.8-1c
522522
drop trigger trg5c_1;
523523
show grants;
524524
Grants for test_yesprivs@localhost
525-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
525+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
526526
GRANT SELECT ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
527527
use priv_db;
528528
create trigger trg5c_2 before INSERT on t1 for each row
@@ -552,7 +552,7 @@ GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C497
552552
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
553553
show grants;
554554
Grants for test_noprivs@localhost
555-
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
555+
GRANT TRIGGER ON *.* TO 'test_noprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
556556
GRANT INSERT (f1), UPDATE (f1) ON `priv_db`.`t1` TO 'test_noprivs'@'localhost'
557557
use priv_db;
558558
create trigger trg5d_1 before INSERT on t1 for each row
@@ -566,7 +566,7 @@ before trig 3.5.3.8-1d
566566
drop trigger trg5d_1;
567567
show grants;
568568
Grants for test_yesprivs@localhost
569-
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
569+
GRANT TRIGGER ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
570570
GRANT SELECT (f1) ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
571571
use priv_db;
572572
create trigger trg5d_2 before INSERT on t1 for each row

mysql-test/suite/funcs_1/r/memory_trig_03e.result

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ current_user
140140
test_yesprivs@localhost
141141
show grants for test_yesprivs@localhost;
142142
Grants for test_yesprivs@localhost
143-
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
143+
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
144144
GRANT SELECT, UPDATE, TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost'
145145
drop trigger trg1_2;
146146
ERROR 42000: TRIGGER command denied to user 'test_yesprivs'@'localhost' for table 't1'
@@ -388,7 +388,7 @@ current_user
388388
test_yesprivs@localhost
389389
show grants for test_yesprivs@localhost;
390390
Grants for test_yesprivs@localhost
391-
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
391+
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
392392
GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
393393
drop trigger trg1_2;
394394
select current_user;
@@ -1266,7 +1266,7 @@ current_user
12661266
test_yesprivs@localhost
12671267
show grants;
12681268
Grants for test_yesprivs@localhost
1269-
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD '*C49735D016A099C0CF104EF9183F374A54CA2576'
1269+
GRANT USAGE ON *.* TO 'test_yesprivs'@'localhost' IDENTIFIED BY PASSWORD <secret>
12701270
GRANT TRIGGER ON `priv_db`.* TO 'test_yesprivs'@'localhost' WITH GRANT OPTION
12711271
GRANT SELECT, INSERT, UPDATE, TRIGGER ON `priv_db`.`t1` TO 'test_yesprivs'@'localhost'
12721272
create definer=not_ex_user@localhost trigger trg1_3

0 commit comments

Comments
 (0)