Skip to content

Conversation

@predictor2718
Copy link

Description

Please describe your pull request.

This pull request fixes an issue where descending index columns (D) were not preserved when editing an index. When a column had a collation of D (meaning DESC), phpMyAdmin generated an index definition without specifying any direction.

Since MySQL and MariaDB default to ASC when no direction is specified, the
original DESC was effectively lost.

This bug was originally reported against the QA_5_2 branch:
Fixes #19749

The fix updates the SQL generation logic to explicitly map column collation
values:

  • AASC
  • DDESC

ensuring the original index direction is preserved correctly.

Before submitting pull request, please review the following checklist:

  • Make sure you have read our CONTRIBUTING.md document.
  • Make sure you are making a pull request against the correct branch. For example, for bug fixes in a released version use the corresponding QA branch and for new features use the master branch. If you have a doubt, you can ask as a comment in the bug report or on the mailing list.
  • Every commit has proper Signed-off-by line as described in our DCO. This ensures that the work you're submitting is your own creation.
  • Every commit has a descriptive commit message.
  • Every commit is needed on its own, if you have just minor fixes to previous commits, you can squash them.

Signed-off-by: Nicolai Ehrhardt <245527909+predictor2718@users.noreply.github.com>
Signed-off-by: Nicolai Ehrhardt <245527909+predictor2718@users.noreply.github.com>
@williamdes williamdes changed the title Fix descending index being converted to ascending (#19749) Fix #19749 - Descending index being converted to ascending Dec 17, 2025
Copy link
Member

@williamdes williamdes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is very good work, I tested it and add an index is missing Collation support

Image

@predictor2718
Copy link
Author

Thank you for your reply!
I've added the select option for the collation.

@scribblemaniac
Copy link

I've added the select option for the collation.

This sounds like it will close #19610 too now.

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.

3 participants