Grant lock tables on single table gives ERROR 1144
am 26.04.2007 10:18:48 von serman_dHi,
I can't understand why mysql allows me to grant lock tables to all
tables in a particular database, while it fails to accept the same
command applied to a single table only. I've tested on MySQL versions
4.1.20 and 5.0.33 (both running CentOS 4.4 linux on Intel-32) with
exact same results.
Whats wrong with grant lock tables on a single table?
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.00 sec)
mysql> CREATE DATABASE grant_test;
Query OK, 1 row affected (0.00 sec)
mysql> USE grant_test;
Database changed
mysql> CREATE TABLE t (i INTEGER PRIMARY KEY NOT NULL);
Query OK, 0 rows affected (0.01 sec)
mysql> GRANT SELECT ON grant_test.t TO grant_test_user IDENTIFIED BY
'Ahelluwapassw0rd';
Query OK, 0 rows affected (0.00 sec)
mysql> GRANT LOCK TABLES ON grant_test.t TO grant_test_user IDENTIFIED
BY 'Ahelluwapassw0rd';
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 'Ahelluwapassw0rd';
Query OK, 0 rows affected (0.00 sec)
--
Serman D.