Bug #98072 innochecksum summary shows blob pages as other type of page for 8.0 tables
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
===============================================
Portions of this website are copyright © 2001, 2002 The PHP Group
Page generated in 0.052 sec. using MySQL 8.4.7-u6-cloud
Timestamp references displayed by the system are UTC.
Content reproduced on this site is the property of the
respective copyright holders.
It is not reviewed in advance
by Oracle and does not necessarily represent the opinion of
Oracle or any other party.
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 ===============================================