we are currently in the process of migrating latin1 databases to UTF8 in a MySQL Server.
We are investigating what is the best approach and hopefully without any downtime.
My question is if we will migrate a table to UTF8 in a latin1 database and for example, we have a query that performs actions on these two tables (let's say join for example)
is there any chance we will start getting not expected results because of the different collations/characters set?
I guess migrating the entire database will be safer but will involve downtime.
thank you.
Edit:
We are looking at our data, we see that 99% of the data is windows cp1252 encoded data, which means it will be safe to convert the table from latin1 to utf8 without being afraid of corrupting it.
So as I see it we have three options:
- Downtime and convert the entire database
- No downtime and convert each table with a risk of performance and some errors in production (due to join queries and incompatible collations)
- use
pt-online-schema-change
(or something similar)