ãã£ã¡ã«ç§»å qiita.com
ãã£ã¡ã«ç§»å qiita.com
åç½®ã MySQL 5.1ã§ãInnoDBãªãã¼ã¿ãã¼ã¹ã使ã£ã¦ä½ããéçºãã¦ããæä¸ã«ã¯ããã©ã³ã¶ã¯ã·ã§ã³ãã³ããã(ã¾ãã¯ãã¼ã«ããã¯)ãããåã«ããã°ã©ã å´ã®å¦çã(Fatal errorãªã©ã§)ç°å¸¸çµäºããããã¦ããã©ã³ã¶ã¯ã·ã§ã³ãããã¯ãåå¾ããã¾ã¾æ¾ç½®ç¶æ ã«ãªã£ã¦ãã¾ããã¨ãããããããã(è¬)ã ãããªæãMySQLã®ã³ãã³ãã©ã¤ã³ããæ´æ°ã¯ã¨ãªãçºè¡ããã¨ããã°ããå¾ã«æ¬¡ã®ãããªã¨ã©ã¼ãè¿ã£ã¦ãããã¨ãããã ERROR 1205 (HY000): Lock wait timeout exceeded; try restarting transaction ä¸å¿åèã¾ã§ã«æ¸ãã¦ããã¨ããã®ã¨ã©ã¼ãè¿ã£ã¦ããã¾ã§ã®æéã¯ã次ã®ã³ãã³ãã§ç¥ããã¨ãã§ããã mysql> show global variables like 'innodb_lock_wait_timeout';
å¤é¨ãã¼ã§ãããããã¯ãèµ·ãããµã³ãã«ã³ã¼ãã drop table if exists child; create table child (id int, pid int, primary key (id, pid))engine=innodb; drop table if exists parent; create table parent (id int, count int, primary key (id))engine=innodb; insert into parent values (1, 0); alter table child add foreign key (id) references parent (id); ãã©ã³ã¶ã¯ã·ã§ã³A ------------------------------------- begin; insert into child val
ã¡ã³ããã³ã¹
ãç¥ãã
é害
ãªãªã¼ã¹ãé害æ å ±ãªã©ã®ãµã¼ãã¹ã®ãç¥ãã
ææ°ã®äººæ°ã¨ã³ããªã¼ã®é ä¿¡
å¦çãå®è¡ä¸ã§ã
j次ã®ããã¯ãã¼ã¯
kåã®ããã¯ãã¼ã¯
lãã¨ã§èªã
eã³ã¡ã³ãä¸è¦§ãéã
oãã¼ã¸ãéã
{{#tags}}- {{label}}
{{/tags}}