mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-22 11:54:54 +00:00
Simplified split_grants() and added a test for mixed table & column grants on the same table
This commit is contained in:
@@ -128,6 +128,17 @@ ok(
|
||||
"Column-level grants --separate --revoke (bug 866075)"
|
||||
);
|
||||
|
||||
diag(`/tmp/12345/use -u root -e "GRANT SELECT ON sakila.city TO 'sally'\@'%'"`);
|
||||
|
||||
ok(
|
||||
no_diff(
|
||||
sub { pt_show_grants::main('-F', $cnf, qw(--only sally --no-header)) },
|
||||
"t/pt-show-grants/samples/column-grants-combined.txt",
|
||||
stderr => 1,
|
||||
),
|
||||
"Column-level grants combined with table-level grants on the same table (bug 866075)"
|
||||
);
|
||||
|
||||
diag(`/tmp/12345/use -u root -e "DROP USER 'sally'\@'%'"`);
|
||||
|
||||
# #############################################################################
|
||||
|
4
t/pt-show-grants/samples/column-grants-combined.txt
Normal file
4
t/pt-show-grants/samples/column-grants-combined.txt
Normal file
@@ -0,0 +1,4 @@
|
||||
-- Grants for 'sally'@'%'
|
||||
GRANT INSERT (city), SELECT, SELECT (city_id) ON `sakila`.`city` TO 'sally'@'%';
|
||||
GRANT SELECT (SANumber, DateCreated, PaymentStat, PckPrice) ON `test`.`t` TO 'sally'@'%';
|
||||
GRANT USAGE ON *.* TO 'sally'@'%';
|
Reference in New Issue
Block a user