Bug #44394 Assertion Failure
Submitted: 21 Apr 2009 22:19 Modified: 27 Jun 2009 23:59
Reporter: Nicklas Westerlund (OCA) Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Server: General Severity:S2 (Serious)
Version:5.4.0 OS:MacOS
Assigned to: Alexey Botchkov CPU Architecture:Any
Tags: community, Contribution

[21 Apr 2009 22:19] Nicklas Westerlund
Description:
After compiling 5.4.0-beta, and trying to install the db, I get the following:

~/src/mysql/mysql-5.4.0-beta-osx10.5-i386:03:16:21:Qalbi $ ./scripts/mysql_install_db --basedir=`pwd`
Installing MySQL system tables...
Assertion failed: (strncmp("5.2", "5.4.0-beta", sizeof("5.2")-1) > 0), function add_field_to_list, file sql_parse.cc, line 6041.
090421 15:16:28 - 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=8384512
read_buffer_size=131072
max_used_connections=0
max_threads=151
threads_connected=1
It is possible that mysqld could use up to 
key_buffer_size + (read_buffer_size + sort_buffer_size)*max_threads = 337713 K
bytes of memory
Hope that's ok; if not, decrease some variables in the equation.

thd: 0x0
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...
stack_bottom = 0x0 thread_stack 0x30000
0   mysqld                              0x0047f288 my_print_stacktrace + 44
1   mysqld                              0x000f5982 handle_segfault + 854
2   libSystem.B.dylib                   0x91c5e2bb _sigtramp + 43
3   ???                                 0xffffffff 0x0 + 4294967295
4   libSystem.B.dylib                   0x91c23d0d pthread_cond_wait$UNIX2003 + 73
5   mysqld                              0x00483fd2 safe_cond_wait + 346
6   mysqld                              0x000f7896 _Z10unireg_endv + 1142
7   mysqld                              0x000ff4b2 main + 1202
8   mysqld                              0x0000237e start + 54

How to repeat:
download the source, build with ./BUILD/compile-amd64-debug-max-no-ndb  and then make a binary distribution with ./scripts/make_binary_distribution
[22 Apr 2009 2:48] Nicklas Westerlund
This can be solved by changing the reference to  5.2 in line 6041 on sql/sql_parse.cc to anything above 5.2. I.e. changing 
    WARN_DEPRECATED(thd, "5.2", buf, "'TIMESTAMP'");

to 
    WARN_DEPRECATED(thd, "6.2", buf, "'TIMESTAMP'");
[22 Apr 2009 16:55] Valeriy Kravchuk
Thank you for the bug report. Verified just as described.
[26 Apr 2009 9:10] Andrew Hutchings
Also verified by doing:

SHOW INNODB STATUS using Fedora 10 x86_64 with source release.  Does not crash using linux 64bit binary release.
[26 Apr 2009 11:09] Andrew Hutchings
Fix in all the places this can happen

Attachment: mysql-5.4.0-bug-44394.diff (application/octet-stream, text), 9.77 KiB.

[19 Jun 2009 18:20] Trudy Pelzer
Pushed to 5.4.2 on June 10.
[27 Jun 2009 23:59] Paul DuBois
Noted in 5.4.2 changelog.

A deprecation warning message tested for an incorrect version number
and caused an assertion failure.
[16 Sep 2009 6:45] Bugs System
Pushed into 5.4.4-alpha (revid:alik@sun.com-20090916063112-8hjmu6wkxfx5qxf4) (version source revid:guilhem@mysql.com-20090708213845-36vjraclcpz7mwlq) (merge vers: 5.4.4-alpha) (pib:11)