mysql> lock tables test read;
Query OK, 0 rows affected (0.00 sec)mysql> select * from test;
+------+------+------+------+------+------+
| a    | b    | c    | d    | e    | f    |
+------+------+------+------+------+------+
|    1 |    1 |    1 |    1 | x    | m    |
|    2 |    2 |    2 |    2 | x    | m    |
|    4 |    4 |    4 |    4 | y    | n    |
|    5 |    5 |    5 |    5 | y    | n    |
|    3 |    3 |    3 |    3 | y    | m    |
+------+------+------+------+------+------+
5 rows in set (0.00 sec)mysql> select * from a;
ERROR 1100 (HY000): Table 'a' was not locked with LOCK TABLES
mysql> unlock tables;
Query OK, 0 rows affected (0.00 sec)mysql> select * from a;
Empty set (0.00 sec)