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

[2.0] Backport PR #300 for MariaDB >= 11.0 compatibility #314

Open
wants to merge 1 commit into
base: 2.0-dev
Choose a base branch
from

Conversation

richard67
Copy link
Contributor

Pull Request for Issue #290 .

See also joomla/joomla-cms#42333 .

Summary of Changes

Backport PR #300 from 3.x-dev:

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 :

  1. Installation of MariaDB Version 11.1.2 (active Arch Linux),
  2. Goto backend (Administrator),
  3. Open Components > Banners > Banners,
  4. Create three new banners named 1st_banner, 2nd_banner, 3rd_banner,
  5. Click on Sort By "Ordering ascending",
  6. "Drag and Drop" the second banner to the first position - ordering now: 2 - 1 - 3,
  7. Click on the search magnifying glass to reload the banner or reload page.

Without this PR, ordering of the banners is reordered to 1 - 2 - 3, and you cannot change the ordering with "Drag and Drop".

With this PR, ordering of the banners is 2 - 1 - 3, and you can change the ordering with "Drag and Drop".

The issue has been reported for Joomla 4.4 and 5.

Documentation Changes Required

None.

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.

1 participant