Bug #2577 mysqld crashes at startup if 'mysql.func' table does not exist (debug binary)
Submitted: 30 Jan 2004 5:10 Modified: 4 Feb 2004 17:22
Reporter: Guilhem Bichot Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server Severity:S3 (Non-critical)
Version:4.0 OS:Linux (Linux at least)
Assigned to: Michael Widenius CPU Architecture:Any

[30 Jan 2004 5:10] Guilhem Bichot
Description:
See how-to-repeat

How to repeat:
do
use mysql;
rename table func to func_;
shutdown mysqld and restart it (you must not use --skip-grant-tables), I get this assertion failure:

040130 14:08:05  InnoDB: Started
040130 14:08:05  Can't open mysql/func table
mysqld: mysqld.cc:2323: int main(int, char**): Assertion `_current_thd() == 0' failed.
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.

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

thd=0x8a59d48
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...
Bogus stack limit or frame pointer, fp=0xbfffed08, stack_bottom=0x20202020, thread_stack=196608, aborting backtrace.
Trying to get some variables.
Some pointers may be invalid and cause the dump to abort...
thd->query at (nil)  is invalid pointer
thd->thread_id=1886737152
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.

With --skip-grant-tables, no problem.
[31 Jan 2004 7:27] MySQL Verification Team
A message is printed in the log file and MySQL exits.

This is not a crash, but an ASSERT.
[31 Jan 2004 10:20] Sergei Golubchik
assert or not - mysqld shout not crash
[4 Feb 2004 17:22] Michael Widenius
Thank you for your bug report. This issue has been committed to our
source repository of that product and will be incorporated into the
next release.

If necessary, you can access the source repository and build the latest
available version, including the bugfix, yourself. More information 
about accessing the source trees is available at
    http://www.mysql.com/doc/en/Installing_source_tree.html

Additional info:

Fix will be in 4.0.18 and 4.1.2