phpmyadmin icon indicating copy to clipboard operation
phpmyadmin copied to clipboard

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

Open LakshayaTohan opened this issue 2 years ago • 3 comments

Description

Added check for addition of semicolon only when it is missing while editing and/or running an SQL query.

Fixes #17635

Before submitting pull request, please review the following checklist:

  • [x] Make sure you have read our CONTRIBUTING.md document.
  • [x] 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.
  • [x] 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.
  • [x] Every commit has a descriptive commit message.
  • [x] Every commit is needed on its own, if you have just minor fixes to previous commits, you can squash them.
  • [x] Any new functionality is covered by tests.

LakshayaTohan avatar Mar 16 '23 12:03 LakshayaTohan

Codecov Report

Patch coverage: 88.88% and project coverage change: +0.02 :tada:

Comparison is base (3156c39) 54.95% compared to head (9b30512) 54.97%.

Additional details and impacted files
@@             Coverage Diff              @@
##             master   #18264      +/-   ##
============================================
+ Coverage     54.95%   54.97%   +0.02%     
- Complexity    16428    16434       +6     
============================================
  Files           631      631              
  Lines         64544    64550       +6     
============================================
+ Hits          35467    35487      +20     
+ Misses        29077    29063      -14     
Flag Coverage Δ
dbase-extension 54.97% <88.88%> (+0.03%) :arrow_up:
recode-extension 54.92% <88.88%> (+<0.01%) :arrow_up:
unit-8.1-ubuntu-latest 54.92% <88.88%> (+<0.01%) :arrow_up:
unit-8.2-ubuntu-latest 54.92% <88.88%> (+<0.01%) :arrow_up:
unit-nightly-ubuntu-latest 54.92% <88.88%> (+<0.01%) :arrow_up:

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
libraries/classes/Import.php 26.70% <88.88%> (+1.09%) :arrow_up:

... and 1 file with indirect coverage changes

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

codecov[bot] avatar May 06 '23 21:05 codecov[bot]

@kamil-tekiela You did some refactoring to this code, how can this be merged without needing to use that very costy str_contains function ?

williamdes avatar Apr 27 '24 12:04 williamdes

str_contains is not very costly. I guess this just needs a rebase.

kamil-tekiela avatar Apr 27 '24 13:04 kamil-tekiela