GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Functional Index In Exports · Issue #18236 · phpmyadmin/phpmyadmin

Functional Index In Exports #18236

New issue
Copy link
New issue
Copy link
Open
Bug
Open
Functional Index In Exports#18236
Bug
Copy link
Labels
BugA problem or regression with an existing featureA problem or regression with an existing featureaffects/5.2This issue or pull-request affects 5.2.x releases (and maybe further versions)This issue or pull-request affects 5.2.x releases (and maybe further versions)affects/6.0This issue or pull-request affects 6.0.x releases (and maybe further versions)This issue or pull-request affects 6.0.x releases (and maybe further versions)confirmed/5.2This issue is confirmed to be reproduced on 5.2 at the time this label was setThis issue is confirmed to be reproduced on 5.2 at the time this label was setconfirmed/6.0This issue is confirmed to be reproduced on 6.0 at the time this label was setThis issue is confirmed to be reproduced on 6.0 at the time this label was setparser
Milestone
5.2.4

Description

@micjohnston
micjohnston
opened on Mar 10, 2023
Issue body actions

Describe the bug

The SQL to recreate a functional index is not correctly included in the code created via the export function.

To Reproduce

  1. Set a functional index e.g.
ALTER TABLE `table` ADD UNIQUE KEY `functional_index` (`field1`,`field2`, (IFNULL(`field3`,0)));
  1. Export SQL for table or database structure.

Expected behaviour

Created SQL in EXPORT should include the above code to recreate this index, but instead includes the following:

ALTER TABLE `table` ADD UNIQUE KEY `functional_index` (`field1`,`field2`, (0));

Server configuration

  • Operating system: Ubuntu 22.04.2 LTS
  • Web server: Apache/2.4.52 (Ubuntu)
  • Database version: 8.0.32-0ubuntu0.22.04.2 - (Ubuntu)
  • PHP version: 8.1.2-1ubuntu2.11
  • phpMyAdmin version: 5.2.1

Client configuration

  • Browser: Chrome 110.0.5481.177
  • Operating system: Mac OS 13.2.1
Reacted by Jasper

Activity

  1. williamdes
    added
    BugA problem or regression with an existing featureA problem or regression with an existing feature
    parser
    affects/5.2This issue or pull-request affects 5.2.x releases (and maybe further versions)This issue or pull-request affects 5.2.x releases (and maybe further versions)
    affects/6.0This issue or pull-request affects 6.0.x releases (and maybe further versions)This issue or pull-request affects 6.0.x releases (and maybe further versions)
    confirmed/5.2This issue is confirmed to be reproduced on 5.2 at the time this label was setThis issue is confirmed to be reproduced on 5.2 at the time this label was set
    confirmed/6.0This issue is confirmed to be reproduced on 6.0 at the time this label was setThis issue is confirmed to be reproduced on 6.0 at the time this label was set
    on Mar 10, 2023
  2. williamdes commented on Mar 10, 2023

    @williamdes
    williamdes
    on Mar 10, 2023
    Member
    More actions

    Thank you for reporting this issue !
    /cc @iifawzi @niconoe- Maybe it's a parser bug

  3. williamdes
    added a commit that references this issue on Mar 10, 2023

    Add a test case for ALTER TABLE with an INDEX expression

    27c7201
  4. williamdes commented on Mar 10, 2023

    @williamdes
    williamdes
    on Mar 10, 2023
    Member
    More actions

    I added some tests on our parser for this case: phpmyadmin/sql-parser@27c7201

    Reacted by Nicolas Giraud
  5. niconoe- commented on Apr 4, 2023

    @niconoe-
    niconoe-
    on Apr 4, 2023
    More actions

    @williamdes With the test you just wrote, it clearly means it's not an sql-parser issue as when asking the builder to rebuild the query, it actually generates it with the IFNULL expression.

    Therefore, I think the issue comes from PhpMyAdmin or somewhere else, before or after the building process. At this point, I'm not sure I could handle more investigation then 😞

    Reacted by William Desportes
    Reacted by William Desportes
  6. williamdes commented on May 1, 2023

    @williamdes
    williamdes
    on May 1, 2023
    Member
    More actions

    Thanks for your work @niconoe-

  7. williamdes
    added this to the 5.2.2 milestone on May 1, 2023
  8. MauricioFauth
    modified the milestones: 5.2.2, 5.2.3 on Jan 18, 2025
  9. ibennetch
    modified the milestones: 5.2.3, 5.2.4 on Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA problem or regression with an existing featureA problem or regression with an existing featureaffects/5.2This issue or pull-request affects 5.2.x releases (and maybe further versions)This issue or pull-request affects 5.2.x releases (and maybe further versions)affects/6.0This issue or pull-request affects 6.0.x releases (and maybe further versions)This issue or pull-request affects 6.0.x releases (and maybe further versions)confirmed/5.2This issue is confirmed to be reproduced on 5.2 at the time this label was setThis issue is confirmed to be reproduced on 5.2 at the time this label was setconfirmed/6.0This issue is confirmed to be reproduced on 6.0 at the time this label was setThis issue is confirmed to be reproduced on 6.0 at the time this label was setparser

    Type

    Bug

    Projects

    No projects

      Milestone

      • 5.2.4No due date

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402520 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.