# pt-show-grant

**URL:** <https://forums.percona.com/t/pt-show-grant/2393>\
**Category:** Other Tools\
**Created:** [October 2, 2011, 11:29pm UTC](https://forums.percona.com/t/pt-show-grant/2393 "2011-10-02T23:29:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![none.enon](https://avatars.discourse-cdn.com/v4/letter/n/7bcc69/32.png) [@none.enon](https://forums.percona.com/u/none.enon)\
**Post date:** [October 2, 2011, 11:29pm UTC](https://forums.percona.com/t/pt-show-grant/2393/1 "2011-10-02T23:29:42Z")

</div>

Good day,

show-grant outputs incorrect Sql format when access to the table is on selected fields only.

consider the ff. table

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’, `ActualReleasedDate` timestamp NULL default NULL, `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’, `SpecialInstruction` varchar(500) default NULL, 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

pt-show-grants --user=root --ask-pass --only=user

is the ff. which is invalid  
GRANT DateCreated, PaymentStat, PckPrice), SELECT (SANumber ON `inventory`.`table3` TO ‘user’@‘%’;

Regards,

---

<div class="post-metadata">

**Author:** ![xaprb](https://avatars.discourse-cdn.com/v4/letter/x/49beb7/32.png) [@xaprb](https://forums.percona.com/u/xaprb)\
**Post date:** [October 3, 2011, 9:24am UTC](https://forums.percona.com/t/pt-show-grant/2393/2 "2011-10-03T09:24:49Z")

</div>

Please file a bug report.
