友善交流技术...
mysql 锁表与解锁
上一篇 /
下一篇 2011-08-23 14:50:53
/ 个人分类:性能测试
mysql 锁表与解锁
2008-10-09 12:46:53| 分类:MYSQL| 标签:|字号大中小 订阅
mysql>uset_girl
Databasechanged
mysql>showopentables;
+----------+---------------+--------+-------------+
|Database|Table|In_use|Name_locked|
+----------+---------------+--------+-------------+
|t_girl|slave|0|0|
|mysql|help_keyword|0|0|
|mysql|help_category|0|0|
|mysql|help_relation|0|0|
|t_girl|t1|0|0|
|mysql|help_topic|0|0|
|mysql|user|0|0|
+----------+---------------+--------+-------------+
7rowsinset(0.00sec)
mysql>lock tables t1asaread;
Query OK,0rows affected (0.00sec)
mysql>showopentables;
+----------+---------------+--------+-------------+
|Database|Table|In_use|Name_locked|
+----------+---------------+--------+-------------+
|t_girl|slave|0|0|
|mysql|help_keyword|0|0|
|mysql|help_category|0|0|
|mysql|help_relation|0|0|
|t_girl|t1|1|0|
|mysql|help_topic|0|0|
|mysql|user|0|0|
+----------+---------------+--------+-------------+
7rowsinset(0.00sec)
mysql>unlock tables;
Query OK,0rows affected (0.00sec)
mysql>showopentables;
+----------+---------------+--------+-------------+
|Database|Table|In_use|Name_locked|
+----------+---------------+--------+-------------+
|t_girl|slave|0|0|
|mysql|help_keyword|0|0|
|mysql|help_category|0|0|
|mysql|help_relation|0|0|
|t_girl|t1|0|0|
|mysql|help_topic|0|0|
|mysql|user|0|0|
+----------+---------------+--------+-------------+
7rowsinset(0.00sec)
收藏
举报
TAG: