pt-table-checksum should force replica table charset to utf8
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona Toolkit moved to https://jira.percona.com/projects/PT |
Fix Released
|
Medium
|
Carlos Salguero |
Bug Description
Background information:
https:/
I am suggesting to change:
CREATE TABLE checksums (
db CHAR(64) NOT NULL,
tbl CHAR(64) NOT NULL,
chunk INT NOT NULL,
chunk_time FLOAT NULL,
chunk_index VARCHAR(200) NULL,
lower_boundary TEXT NULL,
upper_boundary TEXT NULL,
this_crc CHAR(40) NOT NULL,
this_cnt INT NOT NULL,
master_crc CHAR(40) NULL,
master_cnt INT NULL,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (db, tbl, chunk),
INDEX ts_db_tbl (ts, db, tbl)
) ENGINE=InnoDB;
to
CREATE TABLE checksums (
db CHAR(64) NOT NULL,
tbl CHAR(64) NOT NULL,
chunk INT NOT NULL,
chunk_time FLOAT NULL,
chunk_index VARCHAR(200) NULL,
lower_boundary TEXT NULL,
upper_boundary TEXT NULL,
this_crc CHAR(40) NOT NULL,
this_cnt INT NOT NULL,
master_crc CHAR(40) NULL,
master_cnt INT NULL,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (db, tbl, chunk),
INDEX ts_db_tbl (ts, db, tbl)
) ENGINE=InnoDB charset=utf8;
or at least
CREATE TABLE checksums (
db CHAR(64) NOT NULL charset utf8,
tbl CHAR(64) NOT NULL charset utf8,
chunk INT NOT NULL,
chunk_time FLOAT NULL,
chunk_index VARCHAR(200) NULL,
lower_boundary TEXT NULL,
upper_boundary TEXT NULL,
this_crc CHAR(40) NOT NULL,
this_cnt INT NOT NULL,
master_crc CHAR(40) NULL,
master_cnt INT NULL,
ts TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (db, tbl, chunk),
INDEX ts_db_tbl (ts, db, tbl)
) ENGINE=InnoDB;
As the table names have to be utf8 (character_
Surprisingly the CREATE TABLEs are applied directly from the ones documented on the same file. Changing the embbebed man at the beginning of the file fixed the issue for me. But I would like the change to be applied upstream. It is a very trivial change, just make sure with your CI that nothing else breaks.
Changed in percona-toolkit: | |
status: | New → Triaged |
importance: | Undecided → Medium |
assignee: | nobody → Frank Cizmich (frank-cizmich) |
milestone: | none → 2.3.1 |
Changed in percona-toolkit: | |
milestone: | 2.2.17 → 2.2.18 |
Changed in percona-toolkit: | |
milestone: | 2.2.18 → 2.2.19 |
Changed in percona-toolkit: | |
assignee: | Frank Cizmich (frank-cizmich) → Carlos Salguero (carlos-salguero) |
Changed in percona-toolkit: | |
status: | Triaged → In Progress |
Changed in percona-toolkit: | |
status: | In Progress → Fix Committed |
Changed in percona-toolkit: | |
status: | Fix Committed → Fix Released |
Hello Jaime, /bugs.launchpad .net/percona- toolkit/ +bug/925781
This is almost a duplicate of https:/
Since 2.2.14 you can change the "lower_boundary" & "upper_boundary" olumns to BLOB using the --binary-index option, which should fix the problem.
I agree that changing the default charset of the table to the the database default or to utf-8 should also be considered for next release.