-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Fix incorrect deleted row count #26524
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Summary: This commit fixes an issue where the deleted row count was incorrect when using the USING clause. The problem was caused by the target_tuple_fetched variable always being set to true, preventing rows_affected_count from updating correctly and skipping the break statement. As a result,es_processed was not incremented as expected. Changes: 1. Fixed the incorrect row count issue by ensuring target_tuple_fetched is set correctly. 2.Added a Java test (TestPgDelete) to verify the fix. Fixes yugabyte#25305 Test Plan: Added a Java test (TestPgDelete), which now passes successfully.
✅ Deploy Preview for infallible-bardeen-164bc9 ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
@Francisco-Morao - Thank you for contributing to the yugabyte-db repository!
Ideally, we'd like to use the same fix in both cases. Could you please try your fix with UPDATEs? |
I just tried to make the change, but it did not work. The problem is most likely in |
@sushantrmishra could you review the pull request |
@sushantrmishra @karthik-ramanathan-3006, Is there anything I should change or improve? |
The deleted row count was incorrect when using the
USING
clause. The problem was caused by thetarget_tuple_fetched
variable always being set to true, preventingrows_affected_count
from updating correctly and skipping the break statement. As a result,es_processed
was not incremented as expected.The fix involves introducing an auxiliary variable (
rows_affected_aux
) to store the number of rows affected byYBCExecWriteStmt
. Then, this value is accumulated intorows_affected_count
, ensuring accurate tracking.Fix #25305