Skip to content

Commit

Permalink
correct the error returned by sequence_delete
Browse files Browse the repository at this point in the history
  • Loading branch information
kuron99 committed Dec 4, 2024
1 parent 5de642a commit 4fd9d87
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
1 change: 1 addition & 0 deletions include/sharksfin/api.h
Original file line number Diff line number Diff line change
Expand Up @@ -941,6 +941,7 @@ extern "C" StatusCode sequence_get(
* @param handle the database handle where the sequence exists
* @param id the sequence id that will be deleted
* @return StatusCode::OK if the deletion was successful
* @return StatusCode::NOT_FOUND if the sequence doesn't exist
* @return otherwise if any error occurs
* @note This function is not intended to be called concurrently with running transactions.
* Typical usage is in DDL to unregister sequence objects.
Expand Down
6 changes: 1 addition & 5 deletions shirakami/src/api.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,7 @@ extern "C" StatusCode sequence_delete(
DatabaseHandle handle,
SequenceId id) {
(void)handle;
if (auto res = shirakami::resolve(
shirakami::api::delete_sequence(id)); res != StatusCode::OK) {
ABORT();
}
return StatusCode::OK;
return shirakami::resolve(shirakami::api::delete_sequence(id));
}

extern "C" StatusCode implementation_id(
Expand Down

0 comments on commit 4fd9d87

Please sign in to comment.