Skip to content

struct.error: unpack requires a buffer of 2 bytes #83

@TKYR2020

Description

@TKYR2020

python3 main.py

/home/project/meta.ibd --sql --ddl
CREATE TABLE IF NOT EXISTS project.meta (
tid varchar(40) NOT NULL,
meta longblob NOT NULL,
PRIMARY KEY (tid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COLLATE=utf8mb3_unicode_ci ROW_FORMAT=COMPRESSED;
Traceback (most recent call last):
File "/home/ibd2sql-2.2/main.py", line 524, in
IBD2SQL_SINGLE(table,x,opt,filename_pre,log,parser,FRAGMENT_FILENAME_PRE)
File "/home//ibd2sql-2.2/ibd2sql/ibd2sql.py", line 387, in IBD2SQL_SINGLE
leafno = FIND_LEAF_PAGE_FROM_ROOT(pg,rootno,table)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home//ibd2sql-2.2/ibd2sql/ibd2sql.py", line 329, in FIND_LEAF_PAGE_FROM_ROOT
pageid = idx.get_all_rows()[0]['pageid']
^^^^^^^^^^^^^^^^^^
File "/home/ibd2sql-2.2/ibd2sql/innodb_page/index.py", line 216, in _get_all_rows_compressed
n_dense = struct.unpack('>H',self.data[42:44])[0] & 32767
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
struct.error: unpack requires a buffer of 2 bytes

i tried changing the >H to >i and also tried "--set leafno=3 --force"
but that only extracts table structure but No columns data

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions