anyongjin / mysql_ibd

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

唯一索引异常 #16

Open a462123823 opened 6 months ago

a462123823 commented 6 months ago

版本 mysql 8.0.24 执行时完,发现表结构的唯一索引 变成了普通索引。尝试修改了代码后正常

a462123823 commented 6 months ago

vi main.py

elif idx_type in {2, 3}: builder.write(f'INDEX {idx_name} ({show_cols})') 修改为: elif idx_type == 2: builder.write(f'UNIQUE INDEX {idx_name} ({show_cols})') elif idx_type == 3: builder.write(f'INDEX {idx_name} ({show_cols})')