Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

Bug #792607 reported by Dan Christian
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
mysql-5.1 (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

First: I'm not a mysql admin (and may be missing something obvious). mythtv does work, but mythweb does not. All sql configuration is the default. The system has been upgraded to 11.04 from the original 9.04 install.

mythweb dies with an error: !!NoTrans: SQL Error: Unknown table engine 'InnoDB' [#1286]!!

These errors seem to indicated that the plugin can't be loaded:
# grep -i innodb /var/log/mysql/error.log | tail
110603 11:24:56 InnoDB: Initializing buffer pool, size = 8.0M
110603 11:24:56 InnoDB: Completed initialization of buffer pool
InnoDB: No valid checkpoint found.
InnoDB: If this error appears when you are creating an InnoDB database,
InnoDB: the problem may be that during an earlier attempt you managed
InnoDB: to create the InnoDB data files, but log file creation failed.
InnoDB: If that is the case, please refer to
InnoDB: http://dev.mysql.com/doc/refman/5.1/en/error-creating-innodb.html
110603 11:24:56 [ERROR] Plugin 'InnoDB' init function returned error.
110603 11:24:56 [ERROR] Plugin 'InnoDB' registration as a STORAGE ENGINE failed.

/etc/mysql/my.cnf says that a default innodb file will be created in /var/lib/mysql/. (but doesn't say what files to expect).

# ll /var/lib/mysql/.
total 20508
-rw-r--r-- 1 mysql mysql 0 2011-05-22 14:46 debian-5.1.flag
-rw-rw---- 1 mysql mysql 10485760 2011-01-22 08:39 ibdata1
-rw-rw---- 1 mysql mysql 5242880 2011-01-22 08:39 ib_logfile0
-rw-rw---- 1 mysql mysql 5242880 2009-09-29 14:31 ib_logfile1
drwx------ 2 mysql mysql 4096 2011-05-22 14:47 mysql/
-rw------- 1 mysql mysql 6 2011-05-22 14:47 mysql_upgrade_info
drwx------ 2 mysql mysql 16384 2011-06-03 11:35 mythconverg/
-rw-rw---- 1 mysql mysql 5 2011-06-03 11:24 vonbraun.pid

ProblemType: Bug
DistroRelease: Ubuntu 11.04
Package: mysql-server 5.1.54-1ubuntu4
ProcVersionSignature: Ubuntu 2.6.38-8.42-generic 2.6.38.2
Uname: Linux 2.6.38-8-generic x86_64
NonfreeKernelModules: nvidia
Architecture: amd64
Date: Fri Jun 3 16:05:37 2011
PackageArchitecture: all
ProcEnviron:
 LANGUAGE=en_US:en
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: mysql-5.1
UpgradeStatus: Upgraded to natty on 2011-05-22 (12 days ago)

Revision history for this message
Dan Christian (danchristian65) wrote :
Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Hi Dan, thanks for taking the time to file this bug report.

It does in fact look like your innodb table space is hosed in some way, though there are ways to fix this.

First, backup all your tables:

sudo mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --all-databases > all_tables.sql

Second, check to see if you have any data in InnoDB tables already:

mysql --defaults-extra-file=/etc/mysql/debian.cnf -e "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='InnoDB'"

If you have no tables listed, then you can safely do this:
# Remove innodb database files
sudo service mysql stop
rm /var/lib/mysql/ibdata /var/lib/mysql/ib_logfile*
sudo service mysql start

That should re-create a new innodb table space.

If you do have InnoDB tables already, you may have a lot of data problems, and thats not something we can solve in a bug report unfortunately.

It does make me wonder if there's a bug upgrading from 10.10 to 11.04. Did you upgrade directly from 9.04, or did you go through the steps (9.04 -> 9.10 -> 10.04 -> 10.10 -> 11.04) ? We do not generally support upgrades directly from one older stable release to a new one... so this if thats the case, we probably won't be able to fix that.

Marking Incomplete pending response from Dan.

Changed in mysql-5.1 (Ubuntu):
status: New → Incomplete
Revision history for this message
Dan Christian (danchristian65) wrote :

I did do all the upgrades in sequence over the years. This is the first time I've really tried to use the innodb based stuff (mythweb and mythweather), so it could have gotten messed up anywhere along the way.

Checking my backups: the timestamp on the files indicates they were last written when I was running 10.10, but I'm also seeing the same error messages during that time.

I tried the first couple steps you recommended, but they didn't really work right.

# mysqldump --defaults-extra-file=/etc/mysql/debian.cnf --all-databases > ~/all_tables.sql
mysqldump: Got error: 1286: Unknown table engine 'InnoDB' when using LOCK TABLES

It sounds like it's finding InnoDB stuff, but can't read it properly.

# mysql --defaults-extra-file=/etc/mysql/debian.cnf -e "SELECT * FROM INFORMATION_SCHEMA.TABLES WHERE ENGINE='InnoDB'"
The select returns nothing because that engine never loaded. It doesn't necessarily mean there isn't anything there.

Removing the ib* files (after backing them up) did allow InnoDB to load. I also had to remove /var/lib/mysql/mythconverg/weather* to keep it from complaining about old/bad .frm files. re-installing the mythweb plugin did re-created the tables. mythweb now works for me.

I think this means that the bug is probably somewhere in migration (possibly in a previous version), but (hopefully) isn't reproducible.

Thank you so much for the hand holding. You can close this bug as not reproducible.

Revision history for this message
Clint Byrum (clint-fewbar) wrote :

Dan thanks for the feedback! Its good to hear you were able to resurrect the system.

I agree that even though there probably is a bug somewhere, isolating it will be terribly difficult.

Closing as Invalid.

Changed in mysql-5.1 (Ubuntu):
status: Incomplete → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.