anyongjin / mysql_ibd

import data from ibd files for mysql
MIT License
28 stars 5 forks source link

Please patch indextype == 4 for fulltext #6

Closed causenet closed 1 year ago

causenet commented 1 year ago

Hi, I used this script to recover an ibd file. When I run it, the script raised a valueError around line 119 when idx_type == 4. I add this type to the script as follow. Maybe you can change a little bit of it like:

idx_type = idx.get('type') if idx_type == 1: builder.write(f'PRIMARY KEY ({show_cols})') elif idx_type in {2, 3}: builder.write(f'INDEX {idx_name} ({show_cols})') elif idx_type in == 4: builder.write(f'FULLTEXT {idx_name} ({show_cols})') else: raise ValueError(f'unsupport index type: {idx_type} for {ibd_name}/{idx_name}')

Thanks for this handy tool.

anyongjin commented 1 year ago

Thanks for your feedback, index type for fulltext has been patched