diff --git a/dbm-services/mysql/db-simulation/app/syntax/spider_create_table_rule.go b/dbm-services/mysql/db-simulation/app/syntax/spider_create_table_rule.go index 4c3698cd5c..3eba48dd4a 100644 --- a/dbm-services/mysql/db-simulation/app/syntax/spider_create_table_rule.go +++ b/dbm-services/mysql/db-simulation/app/syntax/spider_create_table_rule.go @@ -142,6 +142,7 @@ func (c CreateTableResult) findTablesIndex() (hasPk bool, uks []KeyDef, keys []K switch { case key.PrimaryKey: hasPk = true + uks = append(uks, key) case key.UniqueKey: uks = append(uks, key) default: