innochecksum always fail to check table files with KEY_BLOCK_SIZE=4 and ROW_FORMAT=COMPRESSED

Bug #1100652 reported by Ilya V. Yesin
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
MySQL Server
Unknown
Unknown
Percona Server moved to https://jira.percona.com/projects/PS
Fix Released
Medium
Laurynas Biveinis
5.1
Won't Fix
Medium
Unassigned
5.5
Fix Released
Medium
Laurynas Biveinis
5.6
Fix Released
Medium
Laurynas Biveinis

Bug Description

Test case files are attached.
Please, pay attention to following lines:
Converting table in COMPRESSED format... done.
Checking it:.
page 0 invalid (fails new style checksum)
file /var/lib/mysql/test/test/innocheck.ibd = 65536 bytes (4 pages)...
checking pages in range 0 to 3
page 0: log sequence number: first = 0; second = 0
page 0: old style: calculated = 412297167; recorded = 0
page 0: new style: calculated = 2171856543; recorded = 113443075
innochesum return error code 1

Revision history for this message
Ilya V. Yesin (yesin-iv) wrote :
Changed in percona-server:
status: New → Confirmed
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :
Revision history for this message
Muhammad Irfan (muhammad-irfan) wrote :
Download full text (4.1 KiB)

This also affects when COMPRESSED table used with default KEY_BLOCK_SIZE= 8K

mysql [localhost] {msandbox} ((none)) > SHOW GLOBAL VARIABLES LIKE '%version%';
+-------------------------+--------------------------------------------------+
| Variable_name | Value |
+-------------------------+--------------------------------------------------+
| innodb_version | 5.5.40-36.1 |
| protocol_version | 10 |
| slave_type_conversions | |
| version | 5.5.40-36.1 |
| version_comment | Percona Server (GPL), Release 36.1, Revision 707 |
| version_compile_machine | x86_64 |
| version_compile_os | Linux |
+-------------------------+--------------------------------------------------+

mysql [localhost] {msandbox} (test) > SHOW CREATE TABLE t1\G
*************************** 1. row ***************************
Table: t1
Create Table: CREATE TABLE `t1` (
`id` int(11) NOT NULL,
`name` char(20) DEFAULT NULL,
PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=COMPRESSED
1 row in set (0.00 sec)

mysql [localhost] {msandbox} (test) > SHOW TABLE STATUS LIKE 't1'\G
*************************** 1. row ***************************
Name: t1
Engine: InnoDB
Version: 10
Row_format: Compressed
Rows: 6
Avg_row_length: 1365
Data_length: 8192
Max_data_length: 0
Index_length: 0
Data_free: 0
Auto_increment: NULL
Create_time: 2015-02-12 02:53:19
Update_time: NULL
Check_time: NULL
Collation: utf8_general_ci
Checksum: NULL
Create_options: row_format=COMPRESSED
Comment:
1 row in set (0.00 sec)

mysql [localhost] {msandbox} (test) > SELECT * FROM t1;
+----+--------+
| id | name |
+----+--------+
| 1 | Aamir |
| 2 | Arif |
| 3 | Essa |
| 4 | Hashir |
| 5 | Umair |
| 6 | Ali |
+----+--------+
6 rows in set (0.00 sec)

$ /home/mirfan/percona5.5.40/bin/innochecksum -vd data/test/t1.ibd
file data/test/t1.ibd = 65536 bytes (4 pages)...
checking pages in range 0 to 3
page 0: log sequence number: first = 1618767; second = 0
page 0 invalid (fails log sequence number check)

===============================
Testing with innochecksum 5.7.5:
===============================
$ /home/mirfan/mysql5.7.5/bin/innochecksum --version
/home/mirfan/mysql5.7.5/bin/innochecksum Ver 5.7.5, for linux-glibc2.5 (x86_64)

$ /home/mirfan/mysql5.7.5/bin/innochecksum --log=/tmp/log.txt --page-type-dump=/tmp/pagetypedump.log data/test/t1.ibd

$ cat /tmp/log.txt
InnoDB File Checksum Utility.
Filename = data/test/t1.ibd
Innochecksum: checking pages in range 0 to 7
page::0; innodb checksum: calculated = 1235628449; recorded = 1235628449
page::0: crc32 checksum: calculated = 4062747429; recorded = 1235628449
page::0: none checksum: calculated = 3735928559; recorded = 1235628449
page::1; innodb checksum: calculated = 1034289170; recorded = 1034289170
page::1: crc32 checksum: calculated = 4179299713; recorded = 1034289170
page::1: none checksum: calculated = 3735928559; recorded = 1034289170
page::2; innodb checksum: calculated = 2700424990; recorded = 2700424990
page::2: crc32 checksum: calculated = 650835105; recorded = 2700424990
page::2: none checksum: calculated = 3735928559; recorded = 2700424990
page::3; innodb checksum: calculated = 3540530163; recorded = 3540530163
page::3: crc32 checksum: calculated = 5797...

Read more...

tags: added: i50840
Revision history for this message
Przemek (pmalkowski) wrote :

Laurynas, instead of patching innochecksum 5.5/5.6, why not just backport the one from 5.7, which works with compressed tables and also provides more features?

Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

Maybe. innochecksum uses InnoDB, so the backport might pull in a bit more than the innochecksum itself, but it's indeed an option to consider.

tags: added: upstream
Revision history for this message
Laurynas Biveinis (laurynas-biveinis) wrote :

5.5, 5.6, and 5.7 versions of innochecksum are all different: 5.5 one is a standalone utility, 5.6 links with InnoDB, 5.7 is further rewritten. Thus 5.5 version of the fix is a port from Facebook 5.1 patch, and 5.6 version is a port from Facebook 5.6 patch, which is different from 5.1 version. Both versions backport a small subset of 5.7 innochecksum MTR testcases.

    https://github.com/percona/percona-server/pull/77
    https://github.com/percona/percona-server/pull/78

Revision history for this message
Shahriyar Rzayev (rzayev-sehriyar) wrote :

Percona now uses JIRA for bug reports so this bug report is migrated to: https://jira.percona.com/browse/PS-1302

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.