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

MySQL FORCE INDEX query hints cause invalid SQL #333

rmc47 opened this Issue Mar 15, 2019 · 0 comments


None yet
1 participant
Copy link

rmc47 commented Mar 15, 2019

bbPress uses a MySQL query hint in its WHERE clause filter:

This generates a query like SELECT col FROM foo FORCE INDEX (PRIMARY, col) WHERE..., which is invalid T-SQL.

While T-SQL does have query hints, it's probably not a simple translation to use them since they're index-name-based rather than column-based, so it's probably simplest just to strip the hints from the query.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.