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

LIMIT/OFFSET is not supported with select_for_update on this database backend. #866

Closed
dag18e opened this issue Sep 9, 2020 · 4 comments · Fixed by #906
Closed

LIMIT/OFFSET is not supported with select_for_update on this database backend. #866

dag18e opened this issue Sep 9, 2020 · 4 comments · Fixed by #906
Labels

Comments

@dag18e
Copy link
Contributor

dag18e commented Sep 9, 2020

We are using Oracle Database 12c Enterprise Edition Release 12.2.0.1.0, which from what I researched it seems the issue is coming from this statement since 12c doesn't allow limits in select_for_update statements. We were able to fix it with:

            try:
                self = refresh_token_model.select_for_update().get(
                    pk=self.pk, revoked__isnull=True
                )
            except refresh_token_model.DoesNotExist:
                return

It would be great if we could stop maintaining the fork and just use the release version.

@dag18e dag18e added the question label Sep 9, 2020
@MattBlack85
Copy link
Contributor

@dag18e care to send a patch?

@dag18e
Copy link
Contributor Author

dag18e commented Oct 14, 2020

Sure! We replaced your code here with this.

@0ddlyoko
Copy link

0ddlyoko commented Nov 4, 2020

Is it important to set self = None if you return just after ?

@dag18e
Copy link
Contributor Author

dag18e commented Nov 4, 2020

@0ddlyoko No, you're right. The self = None line can be cut. Thanks for pointing that out.

@dag18e dag18e mentioned this issue Dec 16, 2020
5 tasks
@n2ygk n2ygk closed this as completed in #906 Feb 7, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants