github / gh-ost

GitHub's Online Schema-migration Tool for MySQL
MIT License
12.42k stars 1.26k forks source link

a question about the usage of gh-ost when migrated #1361

Open akaError opened 10 months ago

akaError commented 10 months ago

Hello, I encountered a database migration failure while using gh-ost. The main reason is due to the use of the ASCII character set. The source database is MySQL, while the target database does not support the ASCII character set.

And I check that most temp table like "%_ghc" used contain hint&value in ascii:

q1: why not use utf8 or other charset that cover ascii(latin1,gbk or else)? q2: can I just simplify use utf8 for hint&value?

 Query  create /* gh-ost */ table `test`.`_b_ghc` (
            id bigint auto_increment,
            last_update timestamp not null DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
            hint varchar(64) charset ascii not null,
            value varchar(4096) charset ascii not null,
            primary key(id),
            unique key hint_uidx(hint)
        ) auto_increment=256