Installing mariadb-server-5.1 fails when upgrading from mysql with different innodb_log_file_size and replacing /etc/mysql/my.cnf

Bug #484127 reported by Kristian Nielsen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MariaDB
Fix Released
Low
Kristian Nielsen
OurDelta
Fix Released
Low
Unassigned
Percona-XtraDB
Fix Released
Undecided
Unassigned

Bug Description

I upgraded an Ubuntu 8.04 mysql-server-5.0 to mariadb-server-5.1 (5.1.39-ourdelta67). When asked, I choose to install the version of /etc/mysql/my.cnf from the new package, replacing my own.

The install failed, since the old mysql config used a non-default value for innodb_log_file_size. InnoDB refuses to start when the size in .cnf is different than actual size of logs on disk.

Now this situation is actually user error. I am not sure the package should try to be clever and automagically handle a non-default innodb_log_file_size. A user that changes this should be aware of the consequences. I feel uncomfortable with alternatives like trying to pick out the value from the old config and setting in the new one, or deleting the old innodb log files during install.

However, I think we could still improve this situation for the user, by at least allowing the install to succeed, even if the server will then not be able to start until the .cnf is fixed. Currently, the mysqld --bootstrap commands needed to update system tables etc. fails, leaving a broken install that must be fixed with apt-get install --fix-broken or similar.

I suggest to make this more robust by running the mysqld --bootstrap commands with innodb and pbxt disabled:

    MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-grant-tables --innodb=OFF --pbxt=OFF --default-storage-engine=myisam"

This should allow install to succeed. The user would not have to fix a broken package install (but still need to fix the my.cnf before being able to start the server, of course).

Tags: 5.1

Related branches

Revision history for this message
Arjen Lentz (arjen-lentz) wrote : Re: [Bug 484127] [NEW] Installing mariadb-server-5.1 fails when upgrading from mysql with different innodb_log_file_size and replacing /etc/mysql/my.cnf

Hi Kristian

On 17/11/2009, at 8:47 PM, Kristian Nielsen wrote:
> I suggest to make this more robust by running the mysqld --bootstrap
> commands with innodb and pbxt disabled:
>
> MYSQL_BOOTSTRAP="/usr/sbin/mysqld --bootstrap --user=mysql --skip-
> grant-tables --innodb=OFF --pbxt=OFF --default-storage-engine=myisam"

Sounds good.

There's a feature request for XtraDB, to have XtraDB able to increase
log file size.

As part of my original feature request was to have XtraDB just use the
actual log file size, rather than complain about the config setting.

Cheers,
Arjen.
--
Arjen Lentz, Exec.Director @ Open Query (http://openquery.com)
Exceptional Services for MySQL at a fixed budget.

Follow our blog at http://openquery.com/blog/
OurDelta: packages for MySQL and MariaDB @ http://ourdelta.org

Revision history for this message
Michael Widenius (monty) wrote :

Agree with Kristian's proposal.

Changed in maria:
importance: Undecided → Low
status: New → Confirmed
Revision history for this message
Hakan Küçükyılmaz (hakan-askmonty) wrote :

For 5.1 we should get a successful install, even if the configuration for InnoDB or other engines is broken.

tags: added: 5.1
Changed in maria:
assignee: nobody → Kristian Nielsen (knielsen)
Changed in maria:
assignee: Kristian Nielsen (knielsen) → nobody
Changed in maria:
assignee: nobody → Kristian Nielsen (knielsen)
Changed in maria:
status: Confirmed → Fix Committed
Changed in ourdelta:
status: New → Fix Committed
Changed in percona-xtradb:
status: New → Fix Committed
Changed in maria:
status: Fix Committed → Fix Released
Changed in ourdelta:
status: Fix Committed → Fix Released
Changed in percona-xtradb:
status: Fix Committed → Fix Released
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.