« Bare Bones OS for MySQL? | Main | Guide to Incompatibilities when Upgrading MySQL to Version 5.0 »

September 30, 2006

Guide to Incompatibilities when Upgrading MySQL to Version 4.1

For folks who are looking at upgrading MySQL to a newer version there is good documentation in the MySQL docs (for example, upgrading from 4.0. to 4.1). My (limited) experience is that folks tend to focus on moving the data between versions, and don't always think about the other ramifications involved in upgrading to a new major version of MySQL.

You'll note that in the upgrade instructions the first step is focused on the behavior of MySQL:

Check the items in the change lists found later in this section to see whether any of them might affect your applications. Note particularly any that are marked Incompatible change. These result in incompatibilities with earlier versions of MySQL and you should consider the implications of these incompatibilities before you upgrade. Note particularly the items under "Server Changes" that related to changes in character set support.

The placement of this item first on the list is significant. The effort to accomodate behavioral changes in MySQL may be more significant than ensuring the data is properly copied between versions. I bumped into one of these recently when going through an upgrade from 4.0 to 4.1. The data appeared to have transferred correctly but in testing the application I started getting periodic internal server errors. Several hours of debugging and I was at the SQL layer looking at a problem caused by this:

Warning: Incompatible change: TIMESTAMP is now returned as a string of type 'YYYY-MM-DD HH:MM:SS' and different timestamp lengths are not supported.

The trick is, unless you are the only coder and have a small code base that you understand very well t's not clear how these changes will affect your application. You might think that a timestamp formatting change won't make a difference, but it does.

So in an effort to at least be aware of what to be on the lookout for, here's the complete list of incompatibility warnings from the MySQL 4.1 docs. I want to note that I'm not sure on the criteria for a compatibility change warning, and just because these items are flagged as compatibility changes doesn't mean you won't be affected by some of the other changes or bug fixes. So these are the biggies, but it's wise to take a few minutes and read all of the release notes to see if anything else raises a red flag for you.

Se here are the items pulled from the MySQL 4.1 release docs that are marked Warning: Incompatible change, followed by the full version number in parens:

Hope that helps someone. It provides a nice snapshot of what to be worried about when going back to upgrading that application to work with MySQL 4.1.

Posted by mike at September 30, 2006 7:28 AM

Comments

Post a comment




Remember Me?