Skip to content

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
Contributor

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
@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