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

Semicolon repeatedly suffixed onto SQL if query ends in comment #17635

Open
ChrisHSandN opened this issue Jul 11, 2022 · 3 comments · May be fixed by #18264
Open

Semicolon repeatedly suffixed onto SQL if query ends in comment #17635

ChrisHSandN opened this issue Jul 11, 2022 · 3 comments · May be fixed by #18264
Labels
enhancement A feature request for improving phpMyAdmin good first issue
Milestone

Comments

@ChrisHSandN
Copy link

Describe the bug

If the end of an SQL statement is a comment, PHPMyAdmin will repeatedly inject a semicolon onto the end each time it is edited.

To Reproduce

Steps to reproduce the behavior:

  1. Go to for latest demo server https://www.phpmyadmin.net/try/ and use MariaDB
  2. Click on SQL
  3. Enter SELECT 1 -- foobar
  4. Press Run
  5. Press "Edit" then "Run" again
  6. SQL is now shown as SELECT 1 -- foobar;;, repeating step 5 will add another ; on each time.

Expected behavior

SQL should be SELECT 1 -- foobar;, or ideally I suppose, leaving my SQL unaltered and not adding or removing any semicolons.

Screenshots

image

Additional context

Apologies for reporting such a trivial thing!

@williamdes
Copy link
Member

Apologies for reporting such a trivial thing!

I am happy to have such detailed reports. We need users to report things they are not happy about ;)

@williamdes williamdes added enhancement A feature request for improving phpMyAdmin good first issue labels Jul 11, 2022
@williamdes williamdes added this to the 5.3.0 milestone Jul 11, 2022
@Arpit-Gulgulia
Copy link
Contributor

Can I give it a try to fix this issue if it is not fixed?

@williamdes
Copy link
Member

Can I give it a try to fix this issue if it is not fixed?

Sure, let me know if you need help

williamdes pushed a commit to LakshayaTohan/phpmyadmin that referenced this issue May 6, 2023
…SQL query

Signed-off-by: Lakshaya Tohan <lakshaya.tohan@gmail.com>
williamdes added a commit to LakshayaTohan/phpmyadmin that referenced this issue May 6, 2023
… the query

Signed-off-by: William Desportes <williamdes@wdes.fr>
williamdes added a commit to LakshayaTohan/phpmyadmin that referenced this issue May 6, 2023
Signed-off-by: William Desportes <williamdes@wdes.fr>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement A feature request for improving phpMyAdmin good first issue
Projects
None yet
3 participants