pt-archiver a table with json type column to a file, encoding error
General
Escalation
General
Escalation
Description
hello
i used pt-archiver to archive some data to a file, but table have a json type column, table charset is utf8, and data in archived file are mojibake, as following:
1. table contents
------------------+
id
tt
------------------+
14
{"ss": "哈哈"}
2. result of pt-archiver and --file option: 14 {"ss": "åå"}
hello
i used pt-archiver to archive some data to a file,
but table have a json type column, table charset is utf8,
and data in archived file are mojibake, as following:
1. table contents
------------------+
id
tt
------------------+
14
{"ss": "哈哈"}
2. result of pt-archiver and --file option:
14 {"ss": "åå"}
3. table structure:
CREATE TABLE `tt1` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`tt` json DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8
4. pt-archiver dsn charset:utf8
5. MySQL characterset
character_set_client
utf8
character_set_connection
utf8
character_set_results
utf8
character_set_server
utf8mb4
when no json type column, everything works well, contents in archived file are correct.
so ,I thought that errors occurred when writing from resultset to dest file.