Bug #4160 mysql can't init databases on restart
Submitted: 16 Jun 2004 9:43 Modified: 5 Nov 2004 12:34
Reporter: marcello soffritti Email Updates:
Status: No Feedback Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S2 (Serious)
Version:MySQL 4.1.2 debug OS:HP/UX (HPUX11.11)
Assigned to: Assigned Account CPU Architecture:Any

[16 Jun 2004 9:43] marcello soffritti
Description:
Hi.
I have installed MySQL 4.1.2 debug runtime distribution in 
/users/mysql/mysql-4.1.2/. Then, I have started mysqld with this:
./bin/mysqld_safe &.
After I kill mysqld and mysqld_safe processes and I restart mysqld
again with ./bin/mysqld_safe &.
But mysql doens't start.

my.cnf holds the following InnoDB parameters:
-------------------------------------------------------------
innodb_data_home_dir = /users/mysql/mysql-4.1.2/data/
innodb_data_file_path = ibdata1:100M:autoextend
innodb_log_group_home_dir = /users/mysql/mysql-4.1.2/data/
innodb_log_arch_dir = /users/mysql/mysql-4.1.2/data/
-------------------------------------------------------------

This is /users/mysql/mysql-4.1.2/data/ content after restart:
-------------------------------------------------------------
-rw-rw----   1 mysql      mysql      5242880 Jun 16 09:36 ib_logfile0
-rw-rw----   1 mysql      mysql      5242880 Jun 16 09:36 ib_logfile1
-rw-rw----   1 mysql      mysql      8388608 Jun 16 09:36 ibdata1
-rw-rw----   1 mysql      mysql            0 Jun 16 09:36 innodb.status.23309
drwx------   2 mysql      mysql         8192 Jun 16 09:35 mysql
drwx------   2 mysql      mysql           96 Jun 16 09:35 test
-rw-rw----   1 mysql      mysql         2276 Jun 16 09:36 tlvhs4.err
-------------------------------------------------------------

and this is tlvhs4.err file content:
-------------------------------------------------------------
040616 09:33:40  mysqld started
InnoDB: The first specified data file ./ibdata1 did not exist:
InnoDB: a new database to be created!
040616  9:33:40  InnoDB: Setting file ./ibdata1 size to 10 MB
InnoDB: Database physically writes the file full: wait...
040616  9:33:50  InnoDB: Log file ./ib_logfile0 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile0 size to 5 MB
InnoDB: Database physically writes the file full: wait...
040616  9:33:55  InnoDB: Log file ./ib_logfile1 did not exist: new to be created
InnoDB: Setting log file ./ib_logfile1 size to 5 MB
InnoDB: Database physically writes the file full: wait...
InnoDB: Doublewrite buffer not found: creating new
InnoDB: Doublewrite buffer created
InnoDB: Creating foreign key constraint system tables
InnoDB: Foreign key constraint system tables created
040616  9:34:04  InnoDB: Started; log sequence number 0 0
040616  9:34:04  /users/mysql/mysql-debug-4.1.2-alpha-hp-hpux11.11-hppa2.0w/bin/
mysqld: Normal shutdown

/users/mysql/mysql-debug-4.1.2-alpha-hp-hpux11.11-hppa2.0w/bin/mysqld: ready for
 connections.
Version: '4.1.2-alpha-debug'  socket: '/tmp/mysql.sock'  port: 3306
040616  9:34:04  InnoDB: Starting shutdown...
040616  9:34:07  InnoDB: Shutdown completed; log sequence number 0 43634
040616  9:34:07  /users/mysql/mysql-debug-4.1.2-alpha-hp-hpux11.11-hppa2.0w/bin/
mysqld: Shutdown Complete

040616 09:34:16  mysqld started
InnoDB: Error: auto-extending data file ./ibdata1 is of a different size
InnoDB: 512 pages (rounded down to MB) than specified in the .cnf file:
InnoDB: initial 640 pages, max 0 (relevant if non-zero) pages!
InnoDB: Could not open or create data files.
InnoDB: If you tried to add new data files, and it failed here,
InnoDB: you should now edit innodb_data_file_path in my.cnf back
InnoDB: to what it was, and remove the new ibdata files InnoDB created
InnoDB: in this failed attempt. InnoDB only wrote those files full of
InnoDB: zeros, but did not yet use them in any way. But be careful: do not
InnoDB: remove old data files which contain your precious data!
040616  9:34:16  Can't init databases
040616  9:34:16  Aborting

040616  9:34:16  /users/mysql/mysql-debug-4.1.2-alpha-hp-hpux11.11-hppa2.0w/bin/
mysqld: Shutdown Complete

040616 09:34:16  mysqld ended
-------------------------------------------------------------

Where is the problem?
Best regards,
Marcello Soffritti.

How to repeat:
See above.
[23 Jun 2004 13:37] Michael Widenius
I thought I fixed this just before 4.1.2 was released. It may be that somehow the fix did not get into the MySQL 4.1.2 release after all.

We are just now building 4.1.3; I will verify this bug with this version as soon as the build is done and if necessary do a new build on HPUX.

Regards,
Monty
[14 Jul 2004 18:46] Antony O'Sullivan
My experience today...

I have installed MySql 4.1.3  on Redhat-9 Shrike and I DO NOT GET THE MESSAGE.

Installing it the same way on Redhat-Fedora-Core 1.  I get the same error message and mysql does not start.

The only difference... apart from 9 and fedora... was...

Shrike - I uninstalled 3.23 and then installed 4.1.3.

Fedora - I DID NOT uninstall 3.23 and then installed 4.1.3 (Overwrote).
[14 Jul 2004 19:18] Antony O'Sullivan
On another fedora machine... I did the same as the Redhat-9-shrike machine... and it did not work.

So I have proved that uninstalling and NOT uninstalling  3.23.58 beforehand... makes no difference.

It must be a difference between FEDORA and RH9...

The messages I get are similar to those of the first writer... talking about not quite allocating as much space as you specified... so on and so on... and the service never starts.
[5 Oct 2004 12:34] MySQL Verification Team
The version reported for this bug is quite older and a lot a bug fixes were
introduced since. Could you please try to test with the newest release
version and report if the behavior reported continues or was fixed.

Thanks
[14 Feb 2005 22:54] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".