472,146 Members | 1,306 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,146 software developers and data experts.

Grant "optimize" difference in 4.0.14 and 4.0.16 ?

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
0 1699

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

145 posts views Thread by Sidney Cadot | last post: by
6 posts views Thread by Charlie | last post: by
14 posts views Thread by mlw | last post: by
94 posts views Thread by Samuel R. Neff | last post: by
350 posts views Thread by Lloyd Bonafide | last post: by
reply views Thread by Saiars | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.