Skip to content
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

Support UPDATE LIMIT #93

Merged
merged 13 commits into from
Apr 16, 2024
Merged

Conversation

kozer
Copy link
Contributor

@kozer kozer commented Apr 11, 2024

Fixes #27

Proposal

Wraps WHERE clauses in UPDATE queries in rowid in ( SELECT rowid from ...WHERE...) to support MySQL's LIMIT and ORDER BY clauses that are unsupported in SQLite.

The implementation in trunk was throwing an error when this case occurred. ( For example when a user tries to add Woo plugin ).

image

This pr aims to fix that.

@kozer kozer mentioned this pull request Apr 11, 2024
@adamziel
Copy link
Collaborator

Thank you @kozer! I left a few minor comments but this looks good otherwise. It would also be lovely to add the same support for the DELETE queries if you wouldn't mind? The LIMIT in those also keeps coming up.

@kozer
Copy link
Contributor Author

kozer commented Apr 15, 2024

It would also be lovely to add the same support for the DELETE queries if you wouldn't mind? The LIMIT in those also keeps coming up.

Can we proceed with this one, as we consider it a blocker for Studio release, and open a new ticket for the DELETE statement?
Feel free to assign it to me.
Thank you @adamziel !!

@kozer kozer requested a review from adamziel April 15, 2024 08:09
@adamziel
Copy link
Collaborator

@kozer nice, getting closer! I went ahead and pushed two failing test cases – let's make sure they work

@adamziel
Copy link
Collaborator

I had an idea how to fix those two test cases so I went ahead and did that

@adamziel adamziel merged commit ef032b2 into WordPress:main Apr 16, 2024
@MocioF MocioF mentioned this pull request Apr 17, 2024
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.

Support UPDATE LIMIT
3 participants