Bug #98072 innochecksum summary shows blob pages as other type of page for 8.0 tables
Submitted: 25 Dec 2019 13:27 Modified: 2 Jan 2020 7:20
Reporter: Sergey Kuzmichev Email Updates:
Status: Verified Impact on me:
None 
Category:MySQL Server: InnoDB storage engine Severity:S3 (Non-critical)
Version:8.0.18, 8.0.11 OS:Any
Assigned to: CPU Architecture:Any

[25 Dec 2019 13:27] Sergey Kuzmichev
Description:
When you run innochecksum -S on an table file created by MySQL 8.0, the tool shows 0 BLOB pages and counts all BLOB pages as "Other type of page". There's no difference whether you use innochecksum from 8.0 or 5.7 for this, innochecksum from 5.7 will just count few more pages as "Other type".

Performing the same test with 5.7, you can see the actual blob pages count.

### 8.0
================PAGE TYPE SUMMARY==============
#PAGE_COUNT     PAGE_TYPE
===============================================
...
       0        BLOB page
...
    1024        Other type of page
===============================================

### 5.7
================PAGE TYPE SUMMARY==============
#PAGE_COUNT     PAGE_TYPE
===============================================
...
    1024        BLOB page
...
       0        Other type of page
===============================================

How to repeat:
CREATE TABLE blob_test (
ID int primary key auto_increment,
DATA longblob
) ENGINE=InnoDB
;
INSERT INTO blob_test(DATA) VALUES (NULL), (NULL);
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;
INSERT INTO blob_test(DATA) SELECT DATA FROM blob_test;

Make sure secure_file_priv is set.

Generate dummy file. I use gzipped table's ibd, which is around 12Kb in size.

mysql> update blob_test set data = load_file('/tmp/blob_test.ibd.gz');
Query OK, 1024 rows affected (0.37 sec)
Rows matched: 1024  Changed: 1024  Warnings: 0

mysql> flush table test.blob_test for export;

$ cp -ip /var/lib/mysql/test/blob_test.ibd ~/

mysql> unlock tables;

$ innochecksum -S ~/blob_test.ibd

================PAGE TYPE SUMMARY==============
#PAGE_COUNT     PAGE_TYPE
===============================================
...
       0        BLOB page
...
    1024        Other type of page
===============================================
[2 Jan 2020 7:20] MySQL Verification Team
Hello SERGEY KUZMICHEV,

Thank you for the bug report and test case.
Verified as described.

regards,
Umesh