Skip to content
This repository has been archived by the owner on Sep 17, 2024. It is now read-only.

mysqlfrm can't interpret .frm files for partitioned tables #49

Open
j4nd3r53n opened this issue Oct 14, 2019 · 2 comments
Open

mysqlfrm can't interpret .frm files for partitioned tables #49

j4nd3r53n opened this issue Oct 14, 2019 · 2 comments

Comments

@j4nd3r53n
Copy link

I'm using MySQL Utilities mysqlfrm version 1.6.5 on Ubuntu 18.04.3, and I trying to use mysqlfrm to extract the create table ... information from a .frm file. This file is part of a backup created with Percona's innobackupex of a version 5.5 database. This is what I try (The full output attached, as well as the .frm file):

$ mysqlfrm --diagnostic -vvv game_action.frm
...
# Skipping to column data at : 2102
{'com_length': 17740,
 'int_length': 17749,
 'interval_count': 22048,
 'interval_parts': 19521,
 'n_length': 13616,
 'null_fields': 8270,
 'num_cols': 12912,
 'pos': 12592,
 'unknown': 24375}
# Fields per screen = 53
EXCEPTION: unpack requires a string argument of length 1
ERROR: Cannot read column data.

Opening the file in a hex editor indicates that the actual column data start near the very end of the file, at 0x3153:

...
00003150   04 00 0F 67  61 6D 65 5F  61 63 74 69  6F 6E 5F 69  ...game_action_i
00003160   64 00 05 00  08 67 61 6D  65 5F 69 64  00 06 00 08  d....game_id....
00003170   75 73 65 72  5F 69 64 00  07 00 11 67  61 6D 65 5F  user_id....game_
00003180   69 6E 73 74  61 6E 63 65  5F 69 64 00  08 00 05 74  instance_id....t
00003190   79 70 65 00  09 00 07 61  6D 6F 75 6E  74 00 0A 00  ype....amount...
000031A0   09 63 75 72  72 65 6E 63  79 00 0B 00  12 63 72 65  .currency....cre
000031B0   61 74 65 64  5F 74 69 6D  65 73 74 61  6D 70 00 04  ated_timestamp..
000031C0   0F 14 14 00  02 00 00 42  00 0F 00 00  08 21 00 00  .......B.....!..
000031D0   05 08 0B 0B  00 0A 00 00  1B 40 00 00  00 03 21 00  .........@....!.
000031E0   00 06 08 0B  0B 00 0E 00  00 1B 40 00  00 00 03 21  ..........@....!
000031F0   00 00 07 11  14 14 00 12  00 00 42 80  00 00 00 08  ..........B.....
00003200   21 00 00 08  05 2D 2D 00  1A 00 00 00  40 00 00 00  !....--.....@...
00003210   0F 21 00 00  09 07 14 14  00 48 00 00  03 42 00 00  .!.......H...B..
00003220   00 F6 21 00  00 0A 09 2D  2D 00 51 00  00 00 40 00  ..!....--.Q...@.
00003230   00 00 0F 21  00 00 0B 12  13 13 00 7F  00 00 3E 00  ...!..........>.
00003240   15 00 00 07  08 00 00 FF  67 61 6D 65  5F 61 63 74  ........game_act
00003250   69 6F 6E 5F  69 64 FF 67  61 6D 65 5F  69 64 FF 75  ion_id.game_id.u
00003260   73 65 72 5F  69 64 FF 67  61 6D 65 5F  69 6E 73 74  ser_id.game_inst
00003270   61 6E 63 65  5F 69 64 FF  74 79 70 65  FF 61 6D 6F  ance_id.type.amo
00003280   75 6E 74 FF  63 75 72 72  65 6E 63 79  FF 63 72 65  unt.currency.cre
00003290   61 74 65 64  5F 74 69 6D  65 73 74 61  6D 70 FF 00  ated_timestamp..

game_action.out.gz

game_action.frm.gz

@BenEspersen
Copy link

Were you able to solve this problem?
I'm actually facing it in the moment and it doesn't want to work.

@shakibhasan09
Copy link

Same problem here. If anyone know the answer plz let us know. Thank you

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants