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

Fix - from(nil) did not generate the expected SQL #23

Merged
merged 3 commits into from
Sep 4, 2023

Conversation

ff2248
Copy link
Contributor

@ff2248 ff2248 commented Aug 24, 2023

In this commit:
rails/rails@bdc5141#diff-79b53b2602bf702bdd8ce677e096be6a6923a54236e17237c16068a510078683R869

Activerecord has modified the behavior of from(nil) where it no longer substitutes with DUAL, resulting in unexpected SQL generated.

While this behavior change still retrieves the data from @ids correctly, it causes the returned result to include many rows (the quantity is equivalent to the number of records in the table), thereby causing performance issues.

@khiav223577
Copy link
Owner

The PR looks great to me. Thanks for you contribution!

Before merging it, could you rebase this to the latest master because of the broken CI.
It should have been fixed in

@ff2248
Copy link
Contributor Author

ff2248 commented Sep 4, 2023

I have already rebase to the latest master branch.

Please check it. Thank you.

@khiav223577 khiav223577 merged commit 766d208 into khiav223577:master Sep 4, 2023
24 checks passed
@khiav223577
Copy link
Owner

Thanks. Just release v1.1.4.

See the changelog for more details.

@ff2248 ff2248 deleted the fix/from-nil-in-mysql branch September 5, 2023 02:18
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.

2 participants