提交 dcae247b 编写于 作者: X xj.lin

Merge branch 'branch-0.4.0' into fix_MS493


Former-commit-id: 59a9f1966eca287932406ece6e57c0485eed2d0c
...@@ -26,6 +26,7 @@ Please mark all change in change log and use the ticket from JIRA. ...@@ -26,6 +26,7 @@ Please mark all change in change log and use the ticket from JIRA.
- MS-467 - mysql db test failed - MS-467 - mysql db test failed
- MS-470 - Drop index success, which table not created - MS-470 - Drop index success, which table not created
- MS-471 - code coverage run failed - MS-471 - code coverage run failed
- MS-492 - Drop index failed if index have been created with index_type: FLAT
- MS-493 - Knowhere unittest crash - MS-493 - Knowhere unittest crash
## Improvement ## Improvement
......
...@@ -955,15 +955,8 @@ DropIndexTask::OnExecute() { ...@@ -955,15 +955,8 @@ DropIndexTask::OnExecute() {
return SetError(res, "Invalid table name: " + table_name_); return SetError(res, "Invalid table name: " + table_name_);
} }
//step 2:check index existence //step 2: check table existence
engine::TableIndex index; auto stat = DBWrapper::DB()->DropIndex(table_name_);
engine::Status stat = DBWrapper::DB()->DescribeIndex(table_name_, index);
if (index.engine_type_ == 1) {
return SetError(SERVER_UNEXPECTED_ERROR, "index not existed");
}
//step 3: check table existence
stat = DBWrapper::DB()->DropIndex(table_name_);
if (!stat.ok()) { if (!stat.ok()) {
return SetError(DB_META_TRANSACTION_FAILED, stat.ToString()); return SetError(DB_META_TRANSACTION_FAILED, stat.ToString());
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册