The previous blog was banned by Sina and will be written here later.
Today, MySQL in a test environment suddenly crashes. In fact, MySQL is dead, but PS can still be seen. The MySQL version is 5.0.38.
Output the following information in the mysqld log:
1 121112 9 : 57 : 36 InnoDB: assertion failure In Thread 1153980752 In File btr0cur. C line 3591 2 InnoDB: failing assertion: extern_len> = Part_len 3 InnoDB: We intentionally generate a memory trap. 4 InnoDB: submit a detailed bug report to http: // Bugs.mysql.com. 5 InnoDB: If you Get Repeated assertion failures or crashes, even 6 InnoDB: immediately after the mysqld startup, there may be 7 InnoDB: Snapshot uption In The InnoDB tablespace. Please refer 8 InnoDB: http: // Dev.mysql.com/doc/refman/5.0/en/forcing-recovery.html 9 InnoDB: about forcing recovery. 10 121112 9 : 57 : 36 -Mysqld got signal 11 ; 11 This cocould be because you hit a bug. It Is Also possible that This Binary 12 Or one of the libraries it was linked against Is Corrupt, improperly built, 13 Or misconfigured. This error can also be caused by malfunctioning hardware. 14 We will Try Our best to scrape up some info that will hopefully help diagnose 15 The problem, but since we have already crashed, something Is Definitely wrong 16 And This May fail. 17 18 Key_buffer_size = 8388600 19 Read_buffer_size = 131072 20 Max_used_connections = 14 21 Max_connections = 800 22 Threads_connected =10 23 It Is Possible That mysqld cocould use up 24 Key_buffer_size + (read_buffer_size + sort_buffer_size) * max_connections = 1748985 K 25 Bytes of memory 26 Hope that ' S OK; if not, decrease some variables in the equation. 27 28 Thd =(Nil) 29 Attempting backtrace. You can use the following information to find Out 30 Where Mysqld died. If you see no messages after This , Something went 31 Terribly wrong... 32 Frame pointer Is Null, did you compile 33 -Fomit-frame-pointer? Aborting backtrace!34 The manual page at http: // Www.mysql.com/doc/en/crashing.html contains 35 Information that shocould help you find Out What Is Causing the crash.
At that time, the reaction was to kill this mysqld and try to restart, but the restart still reported an error, so the attempt to start with mysql5.1 and mysql5.5 still could not solve the problem, and MySQL still could not start successfully.
In this case, set
Innodb_force_recovery = 1
However, the mysqld log does not print the force recovery information, and the statement looks at the log of mysqld and finds that MySQL crashes when applying redo, innodb_force_recovery = 1 is to perform force recovery after applying redo is completed, so it does not enter the force recovery link. So I tried to set innodb_force_recovery = 6, skipped apply Redo, and started successfully, quickly dump all the tables, start a new database, and then import them. This test database is also upgraded to a lower level.