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

Don't add a LIKE condition when it's not needed #6633

Merged
merged 1 commit into from
Sep 25, 2017

Conversation

tcitworld
Copy link
Member

Detected as long query:

SELECT `c`.`carddata`, `c`.`uri` FROM `oc_cards` c WHERE `c`.`id` IN (
    SELECT DISTINCT `cp`.`cardid` FROM `oc_cards_properties` cp WHERE (
           `cp`.`addressbookid` = '2') AND 
           (`cp`.`name` = 'FN') AND 
           (`cp`.`value`  COLLATE UTF8_general_ci LIKE '%%')
);

@tcitworld tcitworld added 3. to review Waiting for reviews feature: dav labels Sep 24, 2017
@tcitworld tcitworld added this to the Nextcloud 13 milestone Sep 24, 2017
@mention-bot
Copy link

@tcitworld, thanks for your PR! By analyzing the history of the files in this pull request, we identified @DeepDiver1975, @schiessle and @nickvergessen to be potential reviewers.

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
@rullzer rullzer force-pushed the dav-remove-like-when-not-needed branch from 1a26cfc to f1bfd44 Compare September 25, 2017 07:10
@codecov
Copy link

codecov bot commented Sep 25, 2017

Codecov Report

Merging #6633 into master will increase coverage by <.01%.
The diff coverage is 100%.

@@             Coverage Diff              @@
##             master    #6633      +/-   ##
============================================
+ Coverage     53.06%   53.06%   +<.01%     
- Complexity    22553    22554       +1     
============================================
  Files          1414     1414              
  Lines         87745    87746       +1     
  Branches       1340     1340              
============================================
+ Hits          46560    46566       +6     
+ Misses        41185    41180       -5
Impacted Files Coverage Δ Complexity Δ
apps/dav/lib/CardDAV/CardDavBackend.php 85.56% <100%> (+0.03%) 89 <0> (+1) ⬆️
core/js/js.js 61.83% <0%> (+0.55%) 0% <0%> (ø) ⬇️

Copy link
Member

@rullzer rullzer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Makes sense

@nickvergessen nickvergessen merged commit e0a4c61 into master Sep 25, 2017
@nickvergessen nickvergessen deleted the dav-remove-like-when-not-needed branch September 25, 2017 10:12
@nickvergessen
Copy link
Member

Backport to 12?

@MorrisJobke
Copy link
Member

Backport to 12?

#6945

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review Waiting for reviews feature: dav
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants