pt-show-grant doesn't support column-level grants
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Low
|
Daniel Nichter | ||
1.0 |
Won't Fix
|
Undecided
|
Unassigned | ||
2.0 |
Won't Fix
|
Undecided
|
Unassigned | ||
2.1 |
Fix Released
|
Low
|
Daniel Nichter |
Bug Description
[In:<strong class="
Good day,
show-grant outputs incorrect Sql format when access to the table is on selected fields only.
consider the ff. table
Code: [Select all] [Show/ hide]
CREATE TABLE IF NOT EXISTS `table3` (
`SOrNum` mediumint(9) unsigned NOT NULL auto_increment,
`SPNum` mediumint(9) unsigned NOT NULL,
`DateCreated` timestamp NOT NULL default CURRENT_TIMESTAMP,
`DateRelease` timestamp NOT NULL default '0000-00-00 00:00:00',
`ActualReleas
`PckPrice` decimal(10,2) NOT NULL default '0.00',
`Status` varchar(20) NOT NULL,
`PaymentStat` varchar(20) NOT NULL default 'Unpaid',
`CusCode` int(9) unsigned NOT NULL,
`SANumber` mediumint(9) unsigned NOT NULL default '0',
`SpecialInstr
PRIMARY KEY (`SOrNum`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;
if the user have only access to the following fields: DateCreated, PckPrice, PaymentStat, SANumber
the ouput of
Code: [Select all] [Show/ hide]
pt-show-grants --user=root --ask-pass --only=user
is the ff. which is invalid
GRANT DateCreated, PaymentStat, PckPrice), SELECT (SANumber ON `inventory`
mysql-server-
percona-
Regards,
Related branches
- Brian Fraser (community): Approve
- Daniel Nichter: Approve
-
Diff: 258 lines (+139/-11)7 files modifiedbin/pt-show-grants (+46/-7)
t/pt-show-grants/basics.t (+52/-4)
t/pt-show-grants/samples/column-grants-combined.txt (+4/-0)
t/pt-show-grants/samples/column-grants-separate-revoke.txt (+10/-0)
t/pt-show-grants/samples/column-grants-separate.txt (+5/-0)
t/pt-show-grants/samples/column-grants.sql (+18/-0)
t/pt-show-grants/samples/column-grants.txt (+4/-0)
tags: |
added: pt-show-grants removed: pt-show-grant |
tags: | added: wrong-ouput |
tags: |
added: wrong-output removed: wrong-ouput |
Changed in percona-toolkit: | |
status: | New → Triaged |
importance: | Undecided → Low |
Changed in percona-toolkit: | |
importance: | Low → Undecided |
summary: |
- pt-show-grant shows incorrect SQL format output + pt-show-grant doesn't support column-level grants |
Thank you for the bug report. We (unofficially) don't support column-level grants. I don't know whether we will add support for them, or whether we will just make the tool output valid grants that ignore the column-level grants. But we will solve this in a future release.