友善交流技术...

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:

蜗牛的天空 引用 删除 superfang   /   2011-09-09 13:31:01
51这个编辑器有问题的。哈哈,凑合着看吧。
yjiong0217的个人空间 引用 删除 yjiong0217   /   2011-08-23 16:47:55
写清楚点嘛,中间空格都丢了,lock tables t1 as a read;
 

评分:0

我来说两句

Open Toolbar