← Back to team overview

enterprise-support team mailing list archive

[Bug 809635] Re: SHOW FULL COLUMNS displays incorrect privileges for table

 

I couldn't able to repeat same problem with Percona Server 5.6 It work
as expected.

mysql [localhost] {root} (test) > CREATE TABLE t1(a SMALLINT);
Query OK, 0 rows affected (0.02 sec)

mysql [localhost] {root} (test) > GRANT ALL PRIVILEGES ON test.* TO 'testuser'@'%' IDENTIFIED BY 'xxxxxx';
Query OK, 0 rows affected (0.05 sec)

mysql [localhost] {root} (test) > SHOW GRANTS FOR 'testuser'@'%';
+---------------------------------------------------------------------------------------------------------+
| Grants for testuser@%                                                                                   |
+---------------------------------------------------------------------------------------------------------+
| GRANT USAGE ON *.* TO 'testuser'@'%' IDENTIFIED BY PASSWORD '*39031A408351B3052FDE09CEC4DC1BAFB89D7339' |
| GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'%'                                                      |
+---------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

# ./use -utestuser -p test
Enter password: 
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 8
Server version: 5.6.34-79.1 Percona Server (GPL), Release 79.1, Revision 1c589f9

Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql [localhost] {testuser} (test) > SHOW FULL COLUMNS FROM t1;
+-------+-------------+-----------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type        | Collation | Null | Key | Default | Extra | Privileges                      | Comment |
+-------+-------------+-----------+------+-----+---------+-------+---------------------------------+---------+
| a     | smallint(6) | NULL      | YES  |     | NULL    |       | select,insert,update,references |         |
+-------+-------------+-----------+------+-----+---------+-------+---------------------------------+---------+
1 row in set (0.02 sec)

# ./use -uroot
Welcome to the MySQL monitor.  Commands end with ; or \g.
Your MySQL connection id is 9
Server version: 5.6.34-79.1 Percona Server (GPL), Release 79.1, Revision 1c589f9

Copyright (c) 2009-2016 Percona LLC and/or its affiliates
Copyright (c) 2000, 2016, Oracle and/or its affiliates. All rights reserved.

Oracle is a registered trademark of Oracle Corporation and/or its
affiliates. Other names may be trademarks of their respective
owners.

Type 'help;' or '\h' for help. Type '\c' to clear the current input
statement.

mysql [localhost] {root} ((none)) > GRANT SELECT ON *.* TO 'testuser'@'%' IDENTIFIED BY 'xxxxxx';
Query OK, 0 rows affected (0.00 sec)

mysql [localhost] {root} ((none)) > SHOW GRANTS FOR 'testuser'@'%';
+----------------------------------------------------------------------------------------------------------+
| Grants for testuser@%                                                                                    |
+----------------------------------------------------------------------------------------------------------+
| GRANT SELECT ON *.* TO 'testuser'@'%' IDENTIFIED BY PASSWORD '*39031A408351B3052FDE09CEC4DC1BAFB89D7339' |
| GRANT ALL PRIVILEGES ON `test`.* TO 'testuser'@'%'                                                       |
+----------------------------------------------------------------------------------------------------------+
2 rows in set (0.00 sec)

mysql [localhost] {root} ((none)) > use test
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
mysql [localhost] {root} (test) > SHOW FULL COLUMNS FROM t1;
+-------+-------------+-----------+------+-----+---------+-------+---------------------------------+---------+
| Field | Type        | Collation | Null | Key | Default | Extra | Privileges                      | Comment |
+-------+-------------+-----------+------+-----+---------+-------+---------------------------------+---------+
| a     | smallint(6) | NULL      | YES  |     | NULL    |       | select,insert,update,references |         |
+-------+-------------+-----------+------+-----+---------+-------+---------------------------------+---------+
1 row in set (0.00 sec)


** Changed in: percona-server/5.6
       Status: New => Invalid

-- 
You received this bug notification because you are a member of Ubuntu
Server/Client Support Team, which is subscribed to MySQL.
Matching subscriptions: Ubuntu Server/Client Support Team
https://bugs.launchpad.net/bugs/809635

Title:
  SHOW FULL COLUMNS displays incorrect privileges for table

To manage notifications about this bug go to:
https://bugs.launchpad.net/mysql-server/+bug/809635/+subscriptions