views:

140

answers:

2

When migrating a project from MySQL 4 to MySQL 5, what are the primary things I need to address in order to ensure queries remain compatible?

In general things should be fine, but I know that some things that worked implicitly in MySQL 4 queries have to be defined explicitly in MySQL 5 (but I can't for the life of me remember what exaxtly).

+2  A: 

See http://dev.mysql.com/doc/refman/5.0/en/upgrading-from-4-1.html for a list of differences that could affect you.

The only one I've observed is when you have a query that uses both comma-style (SQL-89) and JOIN-style syntax. Some MySQL 4.x queries must be rewritten to comply with the now more standards-compliant join semantics. See "Join Processing Changes in MySQL 5.0.12" on page http://dev.mysql.com/doc/refman/5.0/en/join.html

Bill Karwin
+1  A: 

In addition to what Bill says, the best way to see what needs to be done when upgrading is to try your app on the new database offline. Load up the app against the new db and see what breaks.

rabble
Yep! Always test thoroughly when you do any upgrade.
Bill Karwin