Submitted: 7 Oct 2015 11:01 Modified: 7 Oct 2015 11:03
Reporter: Daniël van Eeden (OCA) Email Updates:
Status: Open Impact on me:
Category:MySQL Server Severity:S4 (Feature request)
Version:8.0 OS:Any
Assigned to: CPU Architecture:Any
Tags: checksum, partitioning

[7 Oct 2015 11:01] Daniël van Eeden
CHECKSUM TABLE my_partitioned_table EXTENDED now returns one number.

It would be nice if I could do CHECKSUM PARTITIONS my_partitioned_table which then would show a per partition checksum, making it easier and more useful for situations where:
 - There is just one partition with has wrong data (e.g. after table copy to another server). Then that partition can be recopied to fix the issue.
 - When the table as one constantly changing active partition. Then the 'old' partitions can be checked more easily.

How to repeat:
See Description.
[7 Oct 2015 11:03] Daniël van Eeden
Work around for a table with 32 partitions:
for i in {0..31}; do echo "p${i}"; sudo mysql mydb -BNe "SELECT * FROM mytable1 PARTITION(p${i})" | md5sum; done | tee checksum.txt

Then the checksum.txt from source and target can be compared.
[18 Jun 2016 21:28] Omer Barnir
Posted by developer:
Reported version value updated to reflect release name change from 5.8 to 8.0