달력

5

« 2024/5 »

  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • 10
  • 11
  • 12
  • 13
  • 14
  • 15
  • 16
  • 17
  • 18
  • 19
  • 20
  • 21
  • 22
  • 23
  • 24
  • 25
  • 26
  • 27
  • 28
  • 29
  • 30
  • 31
2006. 11. 15. 17:19

mysql row level lock DB2006. 11. 15. 17:19

4.1.3 innodb나 5.1 이상에서 가능

SELECT * FROM t WHERE i = 1 LOCK IN SHARE MODE;

Rows are locked during updates using indexes. For example,
update tab set col1=3 where col2=17;

will lock the entire table unless col2 is indexed (in which case, only rows where col2=17 will be locked).

:
Posted by codetemplate