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

[3.x] Use row_number window function on MariaDB >= 11.0 #300

Merged

Conversation

richard67
Copy link
Contributor

@richard67 richard67 commented Mar 16, 2024

Pull Request for Issue #290 .

Alternative to PR #291 .

See also joomla/joomla-cms#42333 .

Summary of Changes

Use the ROW_NUMBER() window function for MariaDB 11.0.0 and newer.

That function is supported on MySQL since version 8.0.0, too, and on MariaDB since version 10.2.0, but in order to play safe this PR only changes that for MariaDB 11.0.0 and newer, as for older MariaDB versions or MySQL the old code still seems to work. I've added a @todo comment to the selectRowNumber method and a comment to the version check for MariaDB 11.0.0 to make that clear.

I could not find any unit tests for the selectRowNumber method, so no changes on unit tests with this PR.

Testing Instructions

See joomla/joomla-cms#42333 .

Documentation Changes Required

None.

@richard67
Copy link
Contributor Author

See PR #308 for an alternative way to do it.

@rdeutz rdeutz self-assigned this Aug 7, 2024
@rdeutz
Copy link

rdeutz commented Aug 15, 2024

I have tested this and it works as expected

@rdeutz rdeutz merged commit c629081 into joomla-framework:3.x-dev Aug 15, 2024
1 of 2 checks passed
@richard67 richard67 deleted the 3.x-dev-select-row-number-mariadb branch August 15, 2024 11:45
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