pt-table-sync does not dump bit values properly with --print
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
When running pt-table-sync with --print, say I have these rows on the master I want to sync with the slave:
master [localhost] {msandbox} (test) > show create table t \G
*******
Table: t
Create Table: CREATE TABLE `t` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`x` bit(1) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1
1 row in set (0.00 sec)
master [localhost] {msandbox} (test) > insert into t (x) values ('');
Query OK, 1 row affected (0.00 sec)
master [localhost] {msandbox} (test) > select id, bin(x) from t;
+----+--------+
| id | bin(x) |
+----+--------+
| 1 | 0 |
+----+--------+
1 row in set (0.00 sec)
When running pt-table-sync --print, I would get these REPLACE INTO statements:
REPLACE INTO `test`.`t`(`id`, `x`) VALUES ('1', '^@') /*percona-toolkit src_db:test src_tbl:t src_dsn:
0.1,p=.
As you can see form the control character, it was dumped as binary instead of translated into ASCII like '\0' like what mysqldump does. Though I also recently reported a bug upstream about another problem with mysqldump http://
tags: | added: bit-column pt-table-sync |
Changed in percona-toolkit: | |
status: | New → Confirmed |
This is 2.2.4 by the way.