Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[Messenger] Fix cannot select FOR UPDATE from view on Oracle#45714

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
nicolas-grekas merged 1 commit intosymfony:4.4fromrjd22:fix-oracle-support-symfony-messenger
Apr 1, 2022
Merged

[Messenger] Fix cannot select FOR UPDATE from view on Oracle#45714

nicolas-grekas merged 1 commit intosymfony:4.4fromrjd22:fix-oracle-support-symfony-messenger
Apr 1, 2022

Conversation

@rjd22
Copy link
Contributor

@rjd22rjd22 commentedMar 11, 2022
edited by nicolas-grekas
Loading

QA
Branch?4.4
Bug fix?yes
New feature?no
Deprecations?no
TicketsFix#33718
LicenseMIT

I realize this solution is quite getto. I hope to get some feedback on it so we can solve this oracle issue properly but ATM this is a good starting point to reach a proper solution.

For this reason I didn't add tests yet.

What happens is that Oracle doesn't like query's that combine ROWNUM and FOR UPDATE. To solve this the query needs to be wrapped in a subquery that limits the results by ID so:

SELECT a.*FROM (SELECT m.*FROM messenger_messages mWHERE (m.delivered_at isnullORm.delivered_at< ?)AND (m.available_at<= ?)AND (m.queue_name= ?)ORDER BY available_atASC) aWHERE ROWNUM<=1 FORUPDATE;

becomes:

SELECT*FROM messenger_messagesWHERE idin (SELECTa.idFROM (SELECT m.*FROM messenger_messages mWHERE (m.delivered_at isnullORm.delivered_at< ?)AND (m.available_at<= ?)AND (m.queue_name= ?)ORDER BY available_atASC    ) aWHERE ROWNUM<=1) FORUPDATE;

I don't really know another way to solve this better. But feel free to nitpick at my solution.

bohanwood reacted with heart emoji
@carsonbot
Copy link

Hey!

I see that this is your first PR. That is great! Welcome!

Symfony has acontribution guide which I suggest you to read.

In short:

  • Always add tests
  • Keep backward compatibility (seehttps://symfony.com/bc).
  • Bug fixes must be submitted against the lowest maintained branch where they apply (seehttps://symfony.com/releases)
  • Features and deprecations must be submitted against the 6.1 branch.

Review the GitHub status checks of your pull request and try to solve the reported issues. If some tests are failing, try to see if they are failing because of this change.

When two Symfony core team members approve this change, it will be merged and you will become an official Symfony contributor!
If this PR is merged in a lower version branch, it will be merged up to all maintained branches within a few days.

I am going to sit back now and wait for the reviews.

Cheers!

Carsonbot

@carsonbotcarsonbot changed the titleFix #33718: ORA-02014: cannot select FOR UPDATE from view[Messenger] Fix #33718: ORA-02014: cannot select FOR UPDATE from viewMar 12, 2022
@nicolas-grekas
Copy link
Member

I'd trust you on this one as I don't use Oracle. I don't have a better idea, code wise, so I'm fine with this approach.
Can you please rebase to solve the conflict? You mentioned tests. Please add some if you can.

@nicolas-grekasnicolas-grekas changed the title[Messenger] Fix #33718: ORA-02014: cannot select FOR UPDATE from view[Messenger] Fix cannot select FOR UPDATE from view on OracleApr 1, 2022
@nicolas-grekasnicolas-grekas modified the milestones:5.4,4.4Apr 1, 2022
@nicolas-grekasnicolas-grekas changed the base branch from5.4 to4.4April 1, 2022 10:11
Copy link
Member

@nicolas-grekasnicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others.Learn more.

I've actually rebased on 4.4. I'm merging now but please follow up with tests if you can.

@nicolas-grekas
Copy link
Member

Thank you@rjd22.

@nicolas-grekasnicolas-grekas merged commitdeb9030 intosymfony:4.4Apr 1, 2022
@rjd22
Copy link
ContributorAuthor

@nicolas-grekas I will add some tests for this within a week.

This was referencedApr 2, 2022
@rjd22rjd22 deleted the fix-oracle-support-symfony-messenger branchApril 7, 2022 08:11
@rjd22
Copy link
ContributorAuthor

@nicolas-grekas Tests added in#45966

chalasr added a commit that referenced this pull requestApr 7, 2022
… (rjd22)This PR was merged into the 4.4 branch.Discussion----------Add tests to messenger connection get for OraclePlatform| Q             | A| ------------- | ---| Branch?       | 4.4| Bug fix?      | no| New feature?  | no| Deprecations? | no| License       | MITAdd tests for Oracle for code added in#45714Commits-------6d5887c Add tests to messenger connection get for OraclePlatform
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@nicolas-grekasnicolas-grekasnicolas-grekas left review comments

@lyrixxlyrixxAwaiting requested review from lyrixx

@ycerutoycerutoAwaiting requested review from yceruto

@wouterjwouterjAwaiting requested review from wouterj

@chalasrchalasrAwaiting requested review from chalasr

@dunglasdunglasAwaiting requested review from dunglas

@xabbuhxabbuhAwaiting requested review from xabbuh

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

4 participants

@rjd22@carsonbot@nicolas-grekas@derrabus

[8]ページ先頭

©2009-2025 Movatter.jp