Myisam锁定问题

时间:2015-08-05 15:44:16

标签: mysql mysql-5.5

| 3282164856 | user | someIp:43814 | dbname | Query | 0 | update | insert ignore into TABLE(COL1,COL2,DATE,COL3) values ('10523365','1343046',now(),'Y')

TABLE是MYISAM,但此查询导致TABLE被锁定。

我对此有疑问:

  1. 因为它的插入忽略查询。为什么它在进程列表上显示更新?
  2. 为什么插入忽略导致锁定,因为我知道只有更新才能锁定表格(除非有漏洞)?

1 个答案:

答案 0 :(得分:0)

你错了 - MyISAM锁定了insert:

上的表

http://dev.mysql.com/doc/refman/5.0/en/table-locking.html

有关<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script> <div id='theOne'>if this text is selected it should return true</div> <div>but if this one or a part of this one is, then it will return false.</div> <p id="result">Type any key to check if text is selected</p>的含义及其工作原理的详情,请参阅此问题:Does INSERT IGNORE lock the table even if it ignores the insert?

相关问题