[3.x] Use row_number window function on MariaDB >= 11.0 #300
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theselectRowNumber
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.