MySQLã®ã¯ã©ãã·ã¥ãã°ã«ãç¨å¿
ã¡ãã£ã¨éãããã¦ãã¾ãã¾ããããä»åã¯MySQLã®ã話ã§ãã
ç¾è±¡
2ã«æã»ã©èª¿åããåãã¦ããMySQLãããæ¥çªç¶ãã¦ã³ãã¦ãã¾ãã¾ããã
MySQLã®ã¨ã©ã¼ãã°ãè¦ãã¨ãä¸è¨ã®ã¢ãµã¼ã·ã§ã³ã¨ã©ã¼ãè¨é²ããã¦ãããã©ãããMySQLãã¯ã©ãã·ã¥ãã¦ãã¾ã£ãããã§ãã
110831 13:12:39 InnoDB: Assertion failure in thread 1043281332 in file row/row0sel.c line 4473 InnoDB: Failing assertion: trx->isolation_level == TRX_ISO_READ_UNCOMMITTED InnoDB: We intentionally generate a memory trap. InnoDB: Submit a detailed bug report to http://bugs.mysql.com. InnoDB: If you get repeated assertion failures or crashes, even InnoDB: immediately after the mysqld startup, there may be InnoDB: corruption in the InnoDB tablespace. Please refer to InnoDB: http://dev.mysql.com/doc/refman/5.1/en/forcing-innodb-recovery.html InnoDB: about forcing recovery. 110831 13:12:39 - mysqld got signal 6 ; This could be because you hit a bug. It is also possible that this binary or one of the libraries it was linked against is corrupt, improperly built, or misconfigured. This error can also be caused by malfunctioning hardware. We will try our best to scrape up some info that will hopefully help diagnose the problem, but since we have already crashed, something is definitely wrong and this may fail.
ãä¸å¯§ã«ã¨ã©ã¼ãã°ã§"you hit a bug"ã¨ãã°ãè¸ãã ãã¨ãæãã¦ããã¾ã:-)
ä¸è¨ã¨ã©ã¼ã¡ãã»ã¼ã¸ã®å
容ã§Googleå
çã«åãåãããã¨ãMySQLã®ãã°æ
å ±ãå¼ã£ãããã¾ãã
http://bugs.mysql.com/bug.php?id=62037
ãããè¦ãã¨ãã©ããBLOBåã«ã©ã ã¸ã®INSERT (ã¾ã㯠UPDATE) ã¨SELECTæã®ä¸¦è¡ã¢ã¯ã»ã¹æã®ã¬ã¼ã¹ã³ã³ãã£ã·ã§ã³ã«ãã°ãããããã§ãããªããBLOBå以å¤ã«TEXTåã§ããã®åé¡ã¯èµ·ããããã§ã(å®éãç§ãééããæã®ãã¼ã¿ã¯TEXTåã§ãã)
ã¾ããMySQLã®ãã¼ã¸ã§ã³5.1.52, 5.1.58, 5.5.14ã§å½±é¿ãããåé¡ã®ããã§ã(ããããããããä¸ä½ã®ãã¼ã¸ã§ã³ã§ãåé¡ãããã¾ã)ãçµæ§æ°ãããã¼ã¸ã§ã³ã§ãåé¡ãããã®ã§ãæ¢ã«éç¨ãã¦ããæ¹ã¯è¦æ³¨æã¨æããã¾ãã
ããã«æããããã¨ã«ãéãæªãã¨ãã¼ã¿ãç ´å£ãããã®é¨åãSELECTããã¨å¿ ãã¯ã©ãã·ã¥ããç¶æ ã«ããªãã¾ãããã°æ å ±ã®ã³ã¡ã³ãã§ä¸è¨ã®ããã«è¨è¼ããã¦ãã¾ãã
Yes Mark, your table could be corrupted so that a BLOB pointer is full of zero bytes (sort
of a null pointer). This could be a transient or a permanent condition. The condition
should be transient when another transaction is trying to access an off-page column just
after an UPDATE transaction has done the first mtr_commit() and is about to x-latch the
clustered index page so that it can write the off-page columns.If you get a crash and crash recovery at an unfortunate moment, you will have permanent
corruption.
ä»åãä¸éã«ãããã¬ã³ã¼ãããã®ç¶æ ã«ãªããã¢ããªã±ã¼ã·ã§ã³ããSELECTãããã¨æ¯åã¯ã©ãã·ã¥ããã¨ããæãããç¶æ ã«ãªã£ã¦ãã¾ãã¾ããã
解決æ¹æ³
ããããã®åå ã¯MySQLã®ãã°ã§ãããªã®ã§MySQLã®ãã¼ã¸ã§ã³ã¢ããã§è§£æ±ºãããã¨ãã§ãã¾ãã5.1ç³»ã®å ´åã¯5.1.59以ä¸ã5.5ç³»ã®å ´åã¯5.5.15以ä¸ã«å¤æ´ããã°è¯ãã§ãããã
ä¸éã«ãpermanent corruptionã«ãªã£ãå ´åã®å¾©æ§æ¹æ³
ãããã®ç¶æ ã«é¥ã£ãå ´åã¯ããã¼ã¸ã§ã³ã¢ããã ãã§ã¯è§£æ±ºã§ãã¾ããããã¼ã¸ã§ã³ã¢ããå¾ãåé¡ã®ã¬ã³ã¼ããSELECTããã¨ãã¯ãã¯ã©ãã·ã¥ãã¦ãã¾ãã¾ããDELETEã試ãã¦ã¿ã¾ãããåæ§ã«ã¯ã©ãã·ã¥ãã¦ãã¾ãã¾ããã
ãããã©ããã£ã¦å¾©æ§ãããã ãï¼ã¨ããã¨ããã§ãããããã¯ããåæã§è§£æ±ºããããããã¾ããã大ã¾ããªå¾©æ§æé ã¨ãã¦ã¯ä»¥ä¸ã«ãªãã¾ãã
- ç ´æã¬ã³ã¼ããé å¼µã£ã¦ç¹å®ãã
- ç ´æã¬ã³ã¼ããé¤å¤ãã¦ãã³ããåºåãã
- ãã¼ãã«ãæ°è¦ã«ä½æãã
- æ°è¦ä½æãããã¼ãã«ã«åºåãããã³ããæµãè¾¼ã
- å¤ããã¼ãã«ã¨æ°ãããã¼ãã«åãå ¥ãæ¿ãã
ããã¯ããªãå°éãªä½æ¥ã«ãªãã¾ããã¾ããç ´æã¬ã³ã¼ããã©ããã£ã¦æ¢ããã£ã¦ã¨ããã§ãã
- æåã®åã£æããã¨ãã¦ã¯ãã¯ã©ãã·ã¥æã®MySQLã®ã¨ã©ã¼ãã°ã«è¨è¼ããã¦ããSQLã確èªãã¾ãããããã®SQLããã主ãã¼ã¾ãã¯ã¦ãã¼ã¯ãã¼ã§ã¢ã¯ã»ã¹ãã¦ããã°ã©ããã¼ã§ããæãããã®ã¬ã³ã¼ããç ´æãã¦ããã§ãããã
- ææªãªã®ãå ¨ä»¶ã¨ãã¬ã³ã¸æ¤ç´¢ããã¦ããå ´åãããã¯æ®å¿µãªããç¹å®ã¯ã§ãã¾ãããã¬ã³ã¸ã®å¹ ãå¤ããSQLãå¥éæµãã¦ãã¯ã©ãã·ã¥ãã/ããªãã確èªãã¦ç¯å²ãçããç¹å®ããå¿ è¦ãããã¾ãã
- ã¾ããä»ã«ãç ´æãã¦ããå¯è½æ§ã¯å¦å®ã§ããªãã®ã§ãBLOBãTEXTåã使ç¨ãã¦ããå ¨ãã¼ãã«ã«ã¤ãã¦åæ§ã«ã¯ã©ãã·ã¥ãã/ããªãã確èªãã¹ãã§ããããã¯ãä¾ãã°ä»¥ä¸ã®ããã«æ¤æ»å¯¾è±¡ã®ãã¼ãã«å ¨ä»¶ãSELECTãã/dev/nullã«ã§ãæµãã¦ããã°OKã§ãããªãã--quickãªãã·ã§ã³ãä»ããã®ã¯ãç¹ã«BLOBãã¼ã¿ãããã¨mysqlã¯ã©ã¤ã¢ã³ããã¡ã¢ãªã大éã«ä½¿ã£ã¦ãã¾ãããã§ãã
mysql -e --quick "SELECT * FROM æ¤æ»ãã¼ãã«" > /dev/null
ãã³ããã¦åæå ¥ããã¨ããã¨ããããããµã¼ãã¹åæ¢ã¯å¿ è¦ã«ãªãã§ããããæ¢ã«éç¨ä¸ã®ã·ã¹ãã ã¨ãã¦ã¯ãä¸çªãããçãã¨ããã§ããã
ã¾ã¨ã
- MySQL 5.1.58ã5.5.14以ä¸ã使ç¨ãããã¤ãBLOBãTEXTåã使ç¨ãã¦ãã人ã¯ãã¼ã¸ã§ã³ã¢ããããªã¹ã¹ã¡ãã¾ããã¯ã©ãã·ã¥å°çã¯æ¬å½ãã©ã¤ã§ããã
- éæªãã¬ã³ã¼ããç ´æãã¦ãã¾ã£ãå ´åã¯ãå°éã«ç ´æã¬ã³ã¼ããç¹å®ãããã¨ã«ãªãã¾ãã復æ§ã«æéããããã¾ããé å¼µãã¾ãããã