Skip to content

Commit

Permalink
fix "no changes after repeat update"
Browse files Browse the repository at this point in the history
  • Loading branch information
Jacyking committed Jun 27, 2024
1 parent 6d840f1 commit 2f51d86
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ormpp/mysql.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -972,7 +972,7 @@ class mysql {

int count = (int)mysql_stmt_affected_rows(stmt_);
if (count == 0) {
return INT_MIN;
return type == OptType::update ? count : INT_MIN;
}

return count;
Expand Down
2 changes: 1 addition & 1 deletion ormpp/sqlite.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,7 @@ class sqlite {

int count = sqlite3_changes(handle_);
if (count == 0) {
return INT_MIN;
return type == OptType::update ? count : INT_MIN;
}

return 1;
Expand Down

0 comments on commit 2f51d86

Please sign in to comment.