Bug #82907 MYSQLFRM unable to parse some .frm files
Submitted: 8 Sep 2016 12:26 Modified: 15 Dec 2016 18:32
Reporter: Andrew Dalgleish Email Updates:
Status: Closed Impact on me:
None 
Category:MySQL Utilities Severity:S3 (Non-critical)
Version:1.6.4 OS:Any
Assigned to: CPU Architecture:Any

[8 Sep 2016 12:26] Andrew Dalgleish
Description:
mysqlfrm fails to parse some .frm files

The offset calculation in _read_column_data() is incorrect
https://github.com/mysql/mysql-utilities/blob/master/mysql/utilities/common/frm_reader.py#...
For the table below, this is io_size bytes too small.

How to repeat:
CREATE TABLE bad_table (
    bi01 BIGINT,
    bi02 BIGINT,
    bi03 BIGINT,
    dt01 DATETIME,
    i01 INT,
    i02 INT,
    i03 INT,
    i04 INT,
    i05 INT,
    i06 INT,
    t01 TEXT,
    t02 TEXT,
    vc01 VARCHAR(1),
    vc02 VARCHAR(169),
    PRIMARY KEY (bi01),
    KEY ibi02 (bi02),
    KEY ibi03 (bi03),
    KEY idt01 (dt01),
    KEY ii01 (i01),
    KEY ii02 (i02),
    KEY ii03 (i03),
    KEY ii04 (i04),
    KEY ii05 (i05),
    KEY ii06 (i06),
    KEY ivc01 (vc01)
);

If you change the VARCHAR(169) to VARCHAR(168), it works.
[12 Dec 2016 16:54] Chuck Bell
Posted by developer:
 
Pushed to release-1.6.5
[15 Dec 2016 18:32] Christine Cole
Posted by developer:
 
Fixed as of the upcoming MySQL Utilities 1.6.5 release, and here's the changelog entry:

The mysqlfrm utility failed to parse some .frm files properly. This fix
ensures that the utility can parse tables with many columns in the field
list.

Thank you for the bug report.