Bug #46576 InnoDB does not appear to be supported in 5.4.1
Submitted: 5 Aug 2009 22:22 Modified: 7 Aug 2009 6:20
Reporter: Rob Ristroph Email Updates:
Status: Not a Bug Impact on me:
None 
Category:MySQL Server: General Severity:S3 (Non-critical)
Version:5.4.1 OS:Any
Assigned to: CPU Architecture:Any

[5 Aug 2009 22:22] Rob Ristroph
Description:

I installed mysql 5.4.1 from the generic rpms, and then from the src rpm building my own rpms.  Each time, InnoDB does not appear to be supported -- it is not listed in "SHOW ENGINES" and "show variables like '%Inno%'" shows 

+-----------------------+-------+
| Variable_name         | Value |
+-----------------------+-------+
| have_innodb           | NO    | 
| ignore_builtin_innodb | OFF   | 
+-----------------------+-------+

And when I try to query on my InnoDB tables I get:

ERROR 1286 (42000) at line 1: Unknown table engine 'InnoDB'

I checked that "skip-innodb" was not in my my.cnf, here it is:

/etc/my.cnf:
=================================
[mysqld]
# These lines are here so that other databases can read the log-bin,
# allowing this database to be a "master"
log-bin=mysql-bin
server-id=2
# The following are recommended for maximum reliability
innodb_flush_log_at_trx_commit=1
sync_binlog=1
# End of replication stuff

datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock

#added by Rob in attempt to allow the handling of large emails in traqpoint
max_allowed_packet = 32M

#trying to get the timeout increased to see if php performance is enhanced:
set-variable = wait_timeout=28800
set-variable = interactive_timeout=600
set-variable = connect_timeout=600

innodb_log_file_size=200M

query_cache_size=64M

table_cache=1000

#skip-innodb

[mysql.server]
user=mysql
#basedir=/var/lib

[safe_mysqld]
err-log=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid
=================================

I also checked that mysql was not being started with --without-innodb or anything like that.  I looked in the /etc/init.d/mysqld file, and then I checked the process arguments with ps and by looking at /proc/<mysql processid>/cmdline.  Everything seems ok, so I think this is a bug.

I should note that when compiling 5.4.1, I saw compiler output from the innodb files being compiled, and the .spec file seems to have it properly turned on.

How to repeat:
Install mysql 5.4.1

Examine the output of "show engines" and look for InnoDB

Suggested fix:
I don't have a suggested fix.
[5 Aug 2009 23:55] MySQL Verification Team
Could you please print here what was printed in the err-log file. Thanks in advance.
[6 Aug 2009 15:59] Rob Ristroph
The mysql error log file is empty.

Also, I subsequently removed 5.4.1 and installed 5.1.37.  InnoDB was still disabled.  Whatever is causing InnoDB to be disabled survived and rpm -e and the subsequent installation of new mysql rpms.  That might be an issue with my linux distribution or the rpm packages, not mysql directly, but I still need to figure out what is causing mysql to not provide innodb.

Thanks for looking at this - I appreciate any suggestions at all.
[6 Aug 2009 16:23] Rob Ristroph
I debugged further by making my /etc/init.d/mysqld file echo out the command that is used to start mysql; I then re-ran that command at the prompt without the redirection to /dev/null; then I saw that my error log was not the file that I thought it was.

Examining the error log showed that it was complaining about my InnoDB logs being too small.  I moved those aside and restarted mysql to let it rebuild them.  This got me to having InnoDB in 5.1.37.

I expect the same will happen when I try 5.4.1 again in a bit, I will post here with the results and then we can probably close this.

Thanks !
[6 Aug 2009 17:42] Rob Ristroph
I managed to get 5.4.1 working with InnoDB.

When I upgraded from 5.1.37, I had this message in my error log:

090806 12:27:10 mysqld_safe mysqld from pid file /var/lib/mysql/delta.pid ended
090806 12:28:34 mysqld_safe Starting mysqld daemon with databases from /var/lib/mysql
InnoDB: The InnoDB memory heap has been disabled.
InnoDB: ios_per_array 256 read threads 8 write threads 8
090806 12:28:34  InnoDB: Log file ./ib_logfile2 did not exist: new to be created
090806 12:28:34 [ERROR] Plugin 'InnoDB' init function returned error.
090806 12:28:34 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

But, after shutting down mysql and removing the ib_logfile* files, and then restarting to let it rebuild them, it worked !

This bug can be closed, I think.  That the upgrade required rebuilding the logfiles and didn't automatically do it might be an issue, but that should be a separate bug if it is.

Thanks for the help !
[7 Aug 2009 6:20] Valeriy Kravchuk
Not a bug, based on last comment.
[1 Oct 2009 6:27] Rob Lewis
I can confirm that the issue exists in the MacOS X (64-bit Intel) beta version of MySQL 5.4.2. 
InnoDB would not start up until I deleted the ib_logfile* files.