[MDEV-3670] LP:484127 - Installing mariadb-server-5.1 fails when upgrading from mysql with different innodb_log_file_size and replacing /etc/mysql/my.cnf Created: 2009-11-17  Updated: 2012-10-04  Resolved: 2012-10-04

Status: Closed
Project: MariaDB Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Trivial
Reporter: Kristian Nielsen Assignee: Kristian Nielsen
Resolution: Fixed Votes: 0
Labels: Launchpad

Attachments: XML File LPexportBug484127.xml    

 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).



 Comments   
Comment by Arjen Lentz (Inactive) [ 2009-11-17 ]

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

Comment by Michael Widenius [ 2009-11-18 ]

Re: Installing mariadb-server-5.1 fails when upgrading from mysql with different innodb_log_file_size and replacing /etc/mysql/my.cnf
Agree with Kristian's proposal.

Comment by Hakan Küçükyılmaz (Inactive) [ 2009-12-08 ]

Re: Installing mariadb-server-5.1 fails when upgrading from mysql with different innodb_log_file_size and replacing /etc/mysql/my.cnf
For 5.1 we should get a successful install, even if the configuration for InnoDB or other engines is broken.

Comment by Rasmus Johansson (Inactive) [ 2010-02-11 ]

Launchpad bug id: 484127

Generated at Thu Feb 08 06:50:19 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.