mirror of
https://github.com/percona/percona-toolkit.git
synced 2025-09-09 07:30:02 +00:00
Implement split_grants() instead of split(',', $grants) to handle spliting grants with column-level privs.
This commit is contained in:
10
t/pt-show-grants/samples/column-grants-separate-revoke.txt
Normal file
10
t/pt-show-grants/samples/column-grants-separate-revoke.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
-- Revoke statements for 'sally'@'%'
|
||||
REVOKE INSERT (city) ON `sakila`.`city` FROM 'sally'@'%';
|
||||
REVOKE SELECT (SANumber, DateCreated, PaymentStat, PckPrice) ON `test`.`t` FROM 'sally'@'%';
|
||||
REVOKE SELECT (city_id) ON `sakila`.`city` FROM 'sally'@'%';
|
||||
REVOKE USAGE ON *.* FROM 'sally'@'%';
|
||||
-- Grants for 'sally'@'%'
|
||||
GRANT INSERT (city) ON `sakila`.`city` TO 'sally'@'%';
|
||||
GRANT SELECT (SANumber, DateCreated, PaymentStat, PckPrice) ON `test`.`t` TO 'sally'@'%';
|
||||
GRANT SELECT (city_id) ON `sakila`.`city` TO 'sally'@'%';
|
||||
GRANT USAGE ON *.* TO 'sally'@'%';
|
5
t/pt-show-grants/samples/column-grants-separate.txt
Normal file
5
t/pt-show-grants/samples/column-grants-separate.txt
Normal file
@@ -0,0 +1,5 @@
|
||||
-- Grants for 'sally'@'%'
|
||||
GRANT INSERT (city) ON `sakila`.`city` TO 'sally'@'%';
|
||||
GRANT SELECT (SANumber, DateCreated, PaymentStat, PckPrice) ON `test`.`t` TO 'sally'@'%';
|
||||
GRANT SELECT (city_id) ON `sakila`.`city` TO 'sally'@'%';
|
||||
GRANT USAGE ON *.* TO 'sally'@'%';
|
@@ -1 +1,4 @@
|
||||
--
|
||||
-- Grants for 'sally'@'%'
|
||||
GRANT INSERT (city), 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