Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

fix(mysql): don't process delete PKs if no rows were affected #621

Merged
merged 1 commit into from
Jan 26, 2025

Conversation

fergusean
Copy link
Contributor

Summary of changes

MySQL deletes aren't checking for a modified row count. As a result, if you perform a delete that affects 0 rows, and the @_pk session variable is set from a previous operation on that MySQL connection, delete returns incorrect values for its primaryKeys and modified result object properties.

Relinquishment of Rights

Please mark following checkbox to confirm that you relinquish all rights of your changes:

  • I waive and relinquish all rights regarding this changes (including code, text, and images) to Deepkit UG (limited), Germany. This changes (including code, text, and images) are under MIT license without name attribution, copyright notice, and permission notice requirement.

@fergusean fergusean changed the title fix(mysql): don't process delete PKs if norows were affected fix(mysql): don't process delete PKs if no rows were affected Jan 24, 2025
@marcj marcj merged commit f2f6ed0 into deepkit:master Jan 26, 2025
6 of 7 checks passed
@marcj
Copy link
Member

marcj commented Jan 26, 2025

great thanks!

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants