467,080 Members | 898 Online
Bytes | Developer Community
Ask Question

Home New Posts Topics Members FAQ

Post your question to a community of 467,080 developers. It's quick & easy.

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
  • viewed: 1540
Share:

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@CBFC | last post: by
reply views Thread by mmiller@bluecypress.net | 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
By using this site, you agree to our Privacy Policy and Terms of Use.