diff --git a/cpp/src/db/DBImpl.cpp b/cpp/src/db/DBImpl.cpp index d3b9e1fc1aa1d8b3bd72e9769d36df7df76742d0..17272c588c3d73a624115695d9b8af7ee6e1616f 100644 --- a/cpp/src/db/DBImpl.cpp +++ b/cpp/src/db/DBImpl.cpp @@ -255,7 +255,7 @@ Status DBImpl::CreateIndex(const std::string& table_id, const TableIndex& index) if(!utils::IsSameIndex(old_index, new_index)) { DropIndex(table_id); - status = meta_ptr_->UpdateTableIndexParam(table_id, index); + status = meta_ptr_->UpdateTableIndexParam(table_id, new_index); if (!status.ok()) { ENGINE_LOG_ERROR << "Failed to update table index info for table: " << table_id; return status;