Skip to content

Commit 3cf7b76

Browse files
tensor-flowerfacebook-github-bot
authored andcommitted
default affected rows to 0
Summary: - when no rows are affected, okPacket returns 0, not -1 - it's also not internally consistent within squangle, here it sets 0 Reviewed By: aditya-jalan Differential Revision: D83618289 fbshipit-source-id: 242003b354d0419a7e88394a6e7b79421f6bc75b
1 parent bf08d23 commit 3cf7b76

File tree

1 file changed

+1
-1
lines changed
  • third-party/squangle/src/squangle/mysql_client

1 file changed

+1
-1
lines changed

third-party/squangle/src/squangle/mysql_client/DbResult.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -616,7 +616,7 @@ class StreamedQueryResult {
616616

617617
const size_t query_idx_;
618618
size_t num_rows_ = 0;
619-
int64_t num_affected_rows_ = -1;
619+
int64_t num_affected_rows_ = 0;
620620
int64_t last_insert_id_ = 0;
621621
std::string recv_gtid_;
622622
RespAttrs resp_attrs_;

0 commit comments

Comments
 (0)