-
Notifications
You must be signed in to change notification settings - Fork 44
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 #27
Comments
I think there is a problem with LIMIT on DELETE queries too: Error message was: SQLSTATE[HY000]: General error: 1 near "LIMIT": syntax error. |
I'm currently come up with this issue while I was working at https://github.com/Automattic/dotcom-forge/issues/6479. Can you please assign it to me? |
Capturing notes from my conversation with @kozer Issue:
Implementation Approach:
Considerations:
Challenge:
|
Update: Created PR #93 |
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. Fixes #27 Co-authored-by: Adam Zielinski <[email protected]> Co-authored-by: Mukesh Panchal <[email protected]>
WordPress cron fails because it cannot execute this query:
UPDATE wp_posts SET post_password = '971f813efffc0aa3250b', post_modified_gmt = '2023-03-24 15:41:06', post_modified = '2023-03-24 15:41:06' WHERE post_type = 'scheduled-action' AND post_status = 'pending' AND post_password = '' AND post_date_gmt <= '2023-03-24 15:41:06' ORDER BY menu_order ASC, post_date_gmt ASC, ID ASC LIMIT 25
The problem is with the trailing
LIMIT 25
. In SQLite, it should be split into a SELECT query and an UPDATE query – just likeDELETE from a,b
is currently handled.The text was updated successfully, but these errors were encountered: