Bug #26096 Too strong assertion when frm file has corrupted character set/collation data
Submitted: 5 Feb 2007 19:25
Reporter: Mark Leith Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S4 (Feature request)
Version:5.0, 5.1 OS:Any (Any)
Assigned to: Assigned Account CPU Architecture:Any
Tags: assertion, innodb

[5 Feb 2007 19:25] Mark Leith
Description:
Currently if an InnoDB table has a corrupt frm file, with bad character set/collation information within it, it crashes the server with an assertion failure - when trying to perform actions such as DROP TABLE or RENAME TABLE on the corrupt table. 

We believe that instead the table should simply be marked as crashed, and should not crash the instance. 

See the following:

070205 18:07:52InnoDB: Assertion failure in thread 196621 in file ha_innodb.cc line 673
InnoDB: Failing assertion: cset == 0
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/mysql/en/Forcing_recovery.html
InnoDB: about forcing recovery.
mysqld got signal 11;
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.

key_buffer_size=268435456
read_buffer_size=1044480
max_used_connections=3
max_connections=100
threads_connected=3
It is possible that mysqld could use up to
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_connections = 466543 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd=0x89e62a8
Attempting backtrace. You can use the following information to find out
where mysqld died. If you see no messages after this, something went
terribly wrong...
Cannot determine thread, fp=0xbe1fc5b8, backtrace may not be correct.
Stack range sanity check OK, backtrace follows:
0x8167d03
0xb7f05e61
0x821dc5b
0x82939c1
0x82afe42
0x8223dad
0x822bcd7
0x8233cb1
0x8233e3e
0x81810c4
0x81864e4
0x8186d41
0x8188258
0xb7efef5b
0xb7d5989a
New value of fp=(nil) failed sanity check, terminating stack trace!
Please read http://dev.mysql.com/doc/mysql/en/Using_stack_trace.html and follow instructions on how to resolve the sta
ck trace. Resolved
stack trace is much more helpful in diagnosing the problem, so please do
resolve it
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at 0x89ddca8 = rename table XXXX to XXXX_OLD
thd->thread_id=5
The manual page at http://www.mysql.com/doc/en/Crashing.html contains
information that should help you find out what is causing the crash.

How to repeat:
No test case immediately available.

Suggested fix:
Mark the table as crashed, rather than crashing the server with an assertion failure.
[16 Apr 2007 12:17] Heikki Tuuri
This is essentially a feature request, as InnoDB should then support the 'crashed' status and mark on a table.