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

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

Closed
Jay04653 opened this issue Jun 25, 2020 · 13 comments
Closed

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

Jay04653 opened this issue Jun 25, 2020 · 13 comments
Assignees
Labels
Bug A problem or regression with an existing feature help wanted waiting on upstream Issues blocked by a third-party
Projects
Milestone

Comments

@Jay04653
Copy link

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
@williamdes williamdes added Bug A problem or regression with an existing feature help wanted labels Jun 25, 2020
@anksh1997
Copy link
Contributor

anksh1997 commented Jun 26, 2020

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

@Jay04653
Copy link
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.

@williamdes
Copy link
Member

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

@anksh1997
Copy link
Contributor

Ok @williamdes .

@anksh1997
Copy link
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 😃

@williamdes williamdes added the waiting on upstream Issues blocked by a third-party label Jun 27, 2020
@williamdes williamdes added this to Needs triage in issues via automation Jun 27, 2020
@williamdes williamdes moved this from Needs triage to n/a priority in issues Jul 25, 2020
@Jay04653
Copy link
Author

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

@williamdes
Copy link
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 ?

@Jay04653
Copy link
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 :(

@nina-py
Copy link
Contributor

nina-py commented Sep 30, 2020

@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.

@williamdes
Copy link
Member

williamdes commented Sep 30, 2020

@shucon
Copy link
Contributor

shucon commented Oct 20, 2020

Related: #16314
Also a CodeMirror issue.

@shucon
Copy link
Contributor

shucon commented Oct 20, 2020

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

@williamdes williamdes moved this from n/a priority to Waiting on upstream in issues Oct 22, 2020
@williamdes
Copy link
Member

@williamdes williamdes self-assigned this Oct 23, 2020
@williamdes williamdes added this to the 5.1.0 milestone Oct 23, 2020
williamdes added a commit that referenced this issue Oct 23, 2020
Signed-off-by: William Desportes <williamdes@wdes.fr>
issues automation moved this from Waiting on upstream to Closed Oct 23, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Bug A problem or regression with an existing feature help wanted waiting on upstream Issues blocked by a third-party
Projects
issues
  
Closed
Development

No branches or pull requests

5 participants