Grant lock tables on single table gives ERROR 1144
am 26.04.2007 12:51:01 von serman_dHi,
Tested on MySQL 4.1.20 and 5.0.33 with similar results. I don't
understand why I cannot grant LOCK TABLES on a single table, while
granting LOCK TABLES on all tables work fine.
mysql> SELECT VERSION()\G
*************************** 1. row ***************************
VERSION(): 4.1.20
1 row in set (0.00 sec)
mysql> SELECT CURRENT_USER()\G
*************************** 1. row ***************************
CURRENT_USER(): root@localhost
1 row in set (0.02 sec)
mysql> CREATE DATABASE grant_test;
Query OK, 1 row affected (0.04 sec)
mysql> USE grant_test;
Database changed
mysql> CREATE TABLE t (i INTEGER PRIMARY KEY NOT NULL);
Query OK, 0 rows affected (0.02 sec)
mysql> GRANT SELECT ON grant_test.t TO grant_test_user IDENTIFIED BY
'foobar';
Query OK, 0 rows affected (0.12 sec)
mysql> GRANT LOCK TABLES ON grant_test.t TO grant_test_user IDENTIFIED
BY 'foobar';
ERROR 1144 (42000): Illegal GRANT/REVOKE command; please consult the
manual to see which privileges can be used
mysql> GRANT LOCK TABLES ON grant_test.* TO grant_test_user IDENTIFIED
BY 'foobar';
Query OK, 0 rows affected (0.03 sec)
--
Serman D.