LP #916168: pt-table-checksum privilege check fails on MySQL 5.5
Description
Environment
Smart Checklist
Activity

lpjirasync January 24, 2018 at 3:04 PM
**Comment from Launchpad by: Sheeri K. Cabral on: 23-07-2012 16:08:46
Daniel , Baron - that is perfectly agreeable to me, thanx!

lpjirasync January 24, 2018 at 3:04 PM
**Comment from Launchpad by: Daniel Nichter on: 21-07-2012 15:48:46
For the record:
mysql> SHOW GRANTS FOR CURRENT_USER\G
5.1
===
*************************** 1. row ***************************
Grants for test_user@%: GRANT SELECT, PROCESS, SUPER, REPLICATION SLAVE, REPLICATION CLIENT ON . TO 'test_user'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
*************************** 2. row ***************************
Grants for test_user@%: GRANT ALL PRIVILEGES ON `percona`.* TO 'test_user'@'%'
5.5.21
======
*************************** 1. row ***************************
Grants for test_user@%: GRANT SELECT, PROCESS, SUPER, REPLICATION SLAVE, REPLICATION CLIENT ON . TO 'test_user'@'%' IDENTIFIED BY PASSWORD '*F3A2A51A9B0F2BE2468926B4132313728C250DBF'
*************************** 2. row ***************************
Grants for test_user@%: GRANT ALL PRIVILEGES ON `percona`.* TO 'test_user'@'%'
Identical grants, but:
mysql> USE percona; SHOW FULL COLUMNS FROM checksums\G
5.1
===
*************************** 1. row ***************************
Field: db
Type: char(64)
Collation: latin1_swedish_ci
Null: NO
Key: PRI
Default: NULL
Extra:
Privileges: select,insert,update,references
Comment:
5.5.21
======
*************************** 1. row ***************************
Field: db
Type: char(64)
Collation: latin1_swedish_ci
Null: NO
Key: PRI
Default: NULL
Extra:
Privileges: select
Comment:
So as Baron said in bug 916168, I'm just going to remove the privs check and let the tool either work or not, and if it doesn't, then the user will know without a doubt that they need to fix the user's privs.

lpjirasync January 24, 2018 at 3:04 PM
**Comment from Launchpad by: Daniel Nichter on: 21-07-2012 15:40:19
It's this bug: http://bugs.mysql.com/bug.php?id=61846

lpjirasync January 24, 2018 at 3:04 PM
**Comment from Launchpad by: Daniel Nichter on: 21-07-2012 00:07:50
This is a MySQL 5.5 issue because the test I just pushed works on 5.1 but fails on 5.5.

lpjirasync January 24, 2018 at 3:04 PM
**Comment from Launchpad by: Baron Schwartz on: 06-06-2012 13:23:52
Bug 1003939 is a duplicate of this one. There is some useful discussion in the comments thread on that bug.
Details
Assignee
UnassignedUnassignedReporter
lpjirasynclpjirasync(Deactivated)Priority
High
Details
Details
Assignee
Reporter

Priority
Smart Checklist
Open Smart Checklist
Smart Checklist
Open Smart Checklist
Smart Checklist

**Reported in Launchpad by Aurimas Mikalauskas last update 10-08-2012 18:13:32
If percona.checksum table exists, privileges check fails with the following error:
01-13T12:21:20 User does not have all privileges on --replicate table `percona`.`checksums`.
Here's the PTDEBUG output:
pt_table_checksum:6995 6643 Checking --replicate table `percona`.`checksums`
pt_table_checksum:7000 6643 SHOW DATABASES LIKE 'percona'
pt_table_checksum:7098 6643 use_repl_db
pt_table_checksum:7119 6643 USE `percona`
TableParser:1952 6643 Checking `percona`.`checksums`
TableParser:1956 6643 SHOW TABLES FROM `percona` LIKE 'checksums'
TableParser:1970 6643 Table exists; no privs to check
pt_table_checksum:7033 6643 --replicate table `percona`.`checksums` already exists
TableParser:1952 6643 Checking `percona`.`checksums`
TableParser:1956 6643 SHOW TABLES FROM `percona` LIKE 'checksums'
TableParser:1970 6643 Table exists; no privs to check
TableParser:1974 6643 SHOW FULL COLUMNS FROM `percona`.`checksums`
TableParser:1989 6643 DELETE FROM `percona`.`checksums` LIMIT 0
TableParser:1995 6643 User privs on `percona`.`checksums` : select delete
TableParser:2000 6643 User does not have all privs
01-13T12:21:20 User does not have all privileges on --replicate table `percona`.`checksums`.
Cxn:1514 6643 Disconnecting dbh DBI::db=HASH(0xffdb2c0) undef
Cxn:1514 6643 Disconnecting dbh DBI::db=HASH(0x1038c830) undef
When I drop the table, everything starts up just fine. I have created the following privileges:
grant select, replication slave, replication client, super, process on . to 'u'@'10.0.0.0/255.255.255.0' identified by 'p';
grant all on percona.* to 'u'@'10.0.0.0/255.255.255.0';
create database percona;
And I run check as:
perl pt-table-checksum h=10.0.0.1,u=u,p=p
On 5.5.14-55-log Percona Server (GPL), Release rel20.5, Revision 149
Aurimas