Page 1 of 1

Tell Me Your MySQL Upgrade Stories

Posted: Fri May 09, 2008 12:56 pm
by volomike
I'm taking a gig where I need to convert SQL and table design from MySQL4 to MySQL5 on 4 websites. Besides my own research on the differences, please share with me any stories of your own for what may have surprised you.

Re: Tell Me Your MySQL Upgrade Stories

Posted: Fri May 09, 2008 4:11 pm
by onion2k
There are a few more reserved words on 5 if I remember correctly. If your SQL isn't backticked properly that can trip you up. Besides that there's nothing much that can go wrong.

Re: Tell Me Your MySQL Upgrade Stories

Posted: Fri May 09, 2008 4:19 pm
by John Cartwright
Agreed. I've migrated from 4 to 5 without any code changes.

Re: Tell Me Your MySQL Upgrade Stories

Posted: Thu May 15, 2008 9:46 am
by chaos
The main problems I ran into were to do with replication synchronization (things like LOAD TABLE FROM MASTER still being implemented but not actually, y'know, working any more). If you're not doing replication, you need not care.

Re: Tell Me Your MySQL Upgrade Stories

Posted: Fri May 16, 2008 11:56 am
by volomike
onion2k wrote:There are a few more reserved words on 5 if I remember correctly. If your SQL isn't backticked properly that can trip you up. Besides that there's nothing much that can go wrong.
I think that's what we're finding. Another problem is the DECIMAL() data type, which changed from MySQL4 to MySQL5. For example:

DECIMAL(3,1) in 4 stores 100.0 as 100.0, even though it's not supposed to unless it's DECIMAL(4,1).

DECIMAL(3,1) in 5 stores 100.0 as 99.9, and requires you to use DECIMAL(4,1) to store 100.0.

Another problem is that one needs to follow MySQL's website explicitly on how to either upgrade an existing database inplace, or export and import a database properly from 4 to 5.

But other than that, I predict smooth sailing.