Skip to content

Autocomplete is not working in case table name quoted by "`" symbols #16227

Closed

Description

@Jay04653

To Reproduce

Steps to reproduce the behavior:

  1. Try to write select query with table names in quotation
  2. Autocomplete is not working, see screenshots below

Expected behavior

Autocomplete has to work in both cases

Screenshots

Working without quotation
image

Not working with quotation
image

Server configuration

  • Operating system: Ubuntu 18.04
  • Web server: Apache 2.4
  • Database version: MySQL 5/8
  • PHP version: 7.4
  • phpMyAdmin version: 5.0.2

Client configuration

  • Browser: Google Chrome
  • Operating system: Ubuntu 20.04

Activity

  1. added
    Bug
    on Jun 25, 2020
  2. ankush-0x90 commented on Jun 26, 2020

    @ankush-0x90
    Contributor

    Hi @williamdes @Jay04653
    After digging deeper, I think the problem is with CodeMirror. An ajaxCall to db_sql_autocomplete.php is giving correct tables for both aliases with " ` " and without " ` ".
    The problem is with sql-hint.js of the code mirror

    https://github.com/codemirror/CodeMirror/blob/c0120793f1e9986b631411b6112e207866d3db81/addon/hint/sql-hint.js#L190

    during finding eachWord what if codemirror just replaced " ` " also

    image

    We can raise issue in codemirror, if this is the real bug causing trouble

  3. Jay04653 commented on Jun 26, 2020

    @Jay04653
    Author

    Hi @asprazz

    Thank you for the debug!

    It's really annoying because by default PHPMyAdmin displays tables with "`" and in case you need to add joins or filters you have to remove this quotation every time or just ignore an autocomplete feature and just type SQL query.

  4. williamdes commented on Jun 26, 2020

    @williamdes
    Member

    Hi @asprazz !
    Thank you for the debug, could you open an issue at CodeMirror and link it here ?

  5. ankush-0x90 commented on Jun 27, 2020

    @ankush-0x90
    Contributor
  6. ankush-0x90 commented on Jun 27, 2020

    @ankush-0x90
    Contributor

    @Jay04653 If you are using development version of phpmyadmin, then you can edit Sql-Hint file in CodeMirror :)
    A temparary fix, if it helps 😃

  7. added
    waiting on upstream
    on Jun 27, 2020
  8. Jay04653 commented on Sep 28, 2020

    @Jay04653
    Author

    It was fixed on CodeMirror side, so now we can include this fix in the next PHPMyAdmin release.

  9. williamdes commented on Sep 28, 2020

    @williamdes
    Member

    It was fixed on CodeMirror side, so now we can include this fix in the next PHPMyAdmin release.

    Could you mention the version that fixed this issue ?

  10. Jay04653 commented on Sep 28, 2020

    @Jay04653
    Author

    It was fixed on CodeMirror side, so now we can include this fix in the next PHPMyAdmin release.

    Could you mention the version that fixed this issue ?

    Seems it was fixed but not released yet :(

  11. nina-py commented on Sep 30, 2020

    @nina-py
    Contributor

    @Jay04653 , @williamdes , I submitted a pull request (with a one-character change! :)) which was merged a couple of days ago. Looking at the releases history ( https://github.com/codemirror/CodeMirror/releases ), it seems that there's a new minor release on the 20th of each month, so we will have our fix on the 20th of October at the earliest.

  12. shucon commented on Oct 20, 2020

    @shucon
    Contributor

    Related: #16314
    Also a CodeMirror issue.

  13. shucon commented on Oct 20, 2020

    @shucon
    Contributor

    Ah, it's 20th October today as well. We might get a release today.

  14. self-assigned this
    on Oct 23, 2020
  15. added this to the 5.1.0 milestone on Oct 23, 2020
  16. added a commit that references this issue on Oct 23, 2020
  17. locked as resolved and limited conversation to collaborators on Oct 24, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Bughelp wantedwaiting on upstream

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions