Not the answer you need?
Register and ask your own question!

pt-archiver a table with json type column to a file, encoding error

snowavesnowave ContributorCurrent User Role Patron
hello
1. table contents as following:
+----+------------------+
| 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.

Answers

Sign In or Register to comment.

MySQL, InnoDB, MariaDB and MongoDB are trademarks of their respective owners.
Copyright ©2005 - 2020 Percona LLC. All rights reserved.