Skip to content

dolthub/dolt#9606 - Fix ALTER TABLE MODIFY COLUMN row count reporting #3132

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

elianddb
Copy link
Contributor

Fixes dolthub/dolt#9606
ALTER TABLE MODIFY COLUMN was returning "Query OK, 0 rows affected" instead of the actual number of rows affected. This change updates the modifyColumnIter to count and return the actual number of rows affected.

- Updated modifyColumnIter.Next() to count and return actual rows affected
- Modified rewriteTable() signature to return row count (bool, int, error)
- Added countTableRows() helper function for accurate row counting
- Handles both rewrite and non-rewrite code paths correctly

Fixes dolthub/dolt#9606

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

rows affected for alter differs from MySQL
1 participant