Hi,

We are deploying a software upgrade and need to convert the MySQL database
of all installations from their previous character set (default) to UTF-8.

I have read the instructions at
http://dev.mysql.com/doc/refman/5.0/en/charset-conversion.html and the
discussion at http://bugs.mysql.com/bug.php?id=22719.

According to the documentation, there are 3 different scenarios:

Case A: "old tables from MySQL 4.0 or earlier where a non-binary column
contains values that actually are encoded in a character set different from
the server's default character set."
-> Upgrade / conversion path:
1. convert VARCHAR to VARBINARY
2. convert VARBINRARY to VARCHAR UTF8

Case B: "same but starting with MySQL 4.1 or later"
-> Upgrade path:
1. convert VARCHAR to VARCHAR UTF8 directly

Case C: "starting with case A but there have been INSERTs/UPDATEs after the
MySQL upgrade to 4.1"
-> Upgrade path: what to do here to minimize data loss?

We tried to store UTF8 in the database even in pre MySQL 4.1 databases. What
we Did until now is assume case A. But this leads to string truncation in
case B (see the above mentioned bug report) and that's why we need to
improve the upgrade path.

Questions:
1. How can we detect the 3 different cases?
We don't know the history of the specific installations since all we do is
offer the software. The software should auto-detect the scenario and run the
appropriate upgrade code.

2. Do you have any advice for case C?

Thanks in advance,
 - Andy Staudacher, Gallery.sourceforge.net


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to