## 背景 有重复数据时,加唯一索引,ghost会默认覆盖重复的数据(ghost的bug,还未修复:[fix data-integrity problem when add unique key by cenkore · Pull Request #912 · github/gh-ost](https://github.com/github/gh-ost/pull/912) ,用mysql原生是没问题的 ) ## 建议 SQLE DDL上线时可以自动调用gh-ost,建议考虑增加个提示:有重复数据时加唯一索引要用mysql原生的方式上线。