By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
445,857 Members | 1,793 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 445,857 IT Pros & Developers. It's quick & easy.

Grant "optimize" difference in 4.0.14 and 4.0.16 ?

P: n/a
Hi,

I ran the code below on two different versions, 4.0.14 and 4.0.16
respectively, both running RH 7.3 on intel.

In version mysql server version 4.0.14 the SELECT privelege suffices
for "optimize table", but (seemingly) the server version 4.0.16
requires INSERT as well.

Is the INSERT privelege necessary for performing optimize in mysql
server version >= 4.0.16 ? I haven't found anything on this in the
changelogs, but I guess I might have missed something.

################################################## ##########################

Server 1:

mysql> select version();
+------------+
| version() |
+------------+
| 4.0.14-Max |
+------------+
1 row in set (0.03 sec)

mysql> GRANT SELECT ON mydb.tq TO tqoptimizer@localhost IDENTIFIED BY
'XXX';
Query OK, 0 rows affected (0.00 sec)

mysql> exit
Bye
[16:05:ro**@4.0.14-server] $ /usr/bin/mysql -u tqoptimizer
--password=XXX -e 'optimize table tq' mydb
+-----------+----------+----------+----------+
| Table | Op | Msg_type | Msg_text |
+-----------+----------+----------+----------+
| mydb.tq | optimize | status | OK |
+-----------+----------+----------+----------+

################################################## ##########################

Server 2:

mysql> select version();
+----------------+
| version() |
+----------------+
| 4.0.16-Max-log |
+----------------+
1 row in set (0.00 sec)

mysql> GRANT SELECT ON mydb.tq TO tqoptimizer@localhost IDENTIFIED BY
'XXX';
Query OK, 0 rows affected (0.00 sec)

mysql> exit;
Bye
[16:09:ro**@4.0.16-server:] $ /usr/bin/mysql -u tqoptimizer
--password=XXX -e 'optimize table tq' mydb
ERROR 1142 at line 1: insert command denied to user:
'tqoptimizer@localhost' for table 'tq'

################################################## ##########################

--
Andreas
Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.