Fix #17635 - Semicolon repeatedly suffixed onto SQL if query ends in comment
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-byline 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.
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: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.
@kamil-tekiela You did some refactoring to this code, how can this be merged without needing to use that very costy str_contains function ?
str_contains is not very costly. I guess this just needs a rebase.