2015å¹´03æ08æ¥17:06 ã«ãã´ãª MySQL InnoDBã®insertã¨lockã®è©± ããã«ã¡ã¯ãECããã§ã¢ããªã±ã¼ã·ã§ã³ã¨ã³ã¸ãã¢ããã£ã¦ããé§å´ã§ãã ä»åã¯MySQLã®InnoDBã¨ã³ã¸ã³ã«ãããINSERTã¨ããã¯ã®æåã«ã¤ãã¦æ¸ãããã¨æãã¾ãã ã¯ããã« ã¢ããªã±ã¼ã·ã§ã³ã§ã¬ã³ã¼ãã®éè¤ãã§ãã¯ããã¦ããINSERTãããããã¼ãã«ã«ã¯UNIQUEå¶ç´ãããã¦ãã¼ã¿ä¸æ´åãèµ·ããªãããã«ãã¦ãããã¨ããä»æ§ã¯ããããã±ã¼ã¹ã ã¨æãã¾ãã ãããã£ãã±ã¼ã¹ã§INSERTããã¨ãã«ã©ã®ãããªä»çµã¿ãåãã¦éè¤ãã¼ã¿ãé²ãã§ããã®ã ããï¼ã¢ããªã±ã¼ã·ã§ã³ã§éè¤ãã§ãã¯ããã¦ã¯ãããã©MySQLã§ã¯ã©ããªæåããã¦ãããã ããï¼ã¨ããã®ãæ°ã«ãªã£ãã®ã§èª¿ã¹ã¾ããã 調ã¹ãã㨠INSERTããå ´åã®ããã¯ã®æå FOR UPDATEæã§æä»ããã¯ããããå ´åã®ããã¯ã®æå
{{#tags}}- {{label}}
{{/tags}}