Archive:+packages with empty name search does like '%%' search.

Bug #629921 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
High
William Grant

Bug Description

https://lp-oops.canonical.com/oops.py/?oopsid=1707ED2083

This appears to be a sub or parallel issue of the bug in +packages reported in bug 607934.

https://launchpad.net/~chromium-daily/+archive/ppa/+packages?field.name_filter=&field.status_filter=&field.series_filter=

SQL time: 8589 ms
Non-sql time: 5045 ms
Total time: 13634 ms
Statement Count: 175

1 3363.0 1 launchpad-main-slave SELECT SourcePackagePublishingHistory.archive, SourcePackagePublishingHistory.component, SourcePackagePublishingHistory.datecreated, SourcePackagePublishingHistory.datemadepending, SourcePackagePublishingHistory.datepublished, SourcePackagePublishingHistory.dateremoved, SourcePackagePublishingHistory.datesuperseded, SourcePackagePublishingHistory.distroseries, SourcePackagePublishingHistory.id, SourcePackagePublishingHistory.pocket, SourcePackagePublishingHistory.removal_comment, SourcePackagePublishingHistory.removed_by, SourcePackagePublishingHistory.scheduleddeletiondate, SourcePackagePublishingHistory.section, SourcePackagePublishingHistory.sourcepackagerelease, SourcePackagePublishingHistory.status, SourcePackagePublishingHistory.supersededby, "_prejoin1".architecturehintlist, "_prejoin1".build_conflicts, "_prejoin1".build_conflicts_indep, "_prejoin1".builddepends, "_prejoin1".builddependsindep, "_prejoin1".changelog, "_prejoin1".changelog_entry, "_prejoin1".component, "_prejoin1".copyright, "_prejoin1".creator, "_prejoin1".dateuploaded, "_prejoin1".dsc, "_prejoin1".dsc_binaries, "_prejoin1".dsc_format, "_prejoin1".dsc_maintainer_rfc822, "_prejoin1".dsc_standards_version, "_prejoin1".dscsigningkey, "_prejoin1".format, "_prejoin1".id, "_prejoin1".maintainer, "_prejoin1".section, "_prejoin1".sourcepackage_recipe_build, "_prejoin1".sourcepackagename, "_prejoin1".upload_archive, "_prejoin1".upload_distroseries, "_prejoin1".urgency, "_prejoin1".version, "_prejoin2".account, "_prejoin2".creation_comment, "_prejoin2".creation_rationale, "_prejoin2".datecreated, "_prejoin2".defaultmembershipperiod, "_prejoin2".defaultrenewalperiod, "_prejoin2".displayname, "_prejoin2".hide_email_addresses, "_prejoin2".homepage_content, "_prejoin2".icon, "_prejoin2".id, "_prejoin2".logo, "_prejoin2".mailing_list_auto_subscribe_policy, "_prejoin2".merged, "_prejoin2".mugshot, "_prejoin2".name, "_prejoin2".personal_standing, "_prejoin2".personal_standing_reason, "_prejoin2".registrant, "_prejoin2".renewal_policy, "_prejoin2".subscriptionpolicy, "_prejoin2".teamdescription, "_prejoin2".teamowner, "_prejoin2".verbose_bugnotifications, "_prejoin2".visibility, "_prejoin3".active, "_prejoin3".algorithm, "_prejoin3".can_encrypt, "_prejoin3".fingerprint, "_prejoin3".id, "_prejoin3".keyid, "_prejoin3".keysize, "_prejoin3".owner, "_prejoin4".binarycount, "_prejoin4".changeslist, "_prejoin4".date_created, "_prejoin4".datereleased, "_prejoin4".defer_translation_imports, "_prejoin4".description, "_prejoin4".displayname, "_prejoin4".distribution, "_prejoin4".driver, "_prejoin4".hide_all_translations, "_prejoin4".id, "_prejoin4".language_pack_base, "_prejoin4".language_pack_delta, "_prejoin4".language_pack_full_export_requested, "_prejoin4".language_pack_proposed, "_prejoin4".lucilleconfig, "_prejoin4".messagecount, "_prejoin4".name, "_prejoin4".nominatedarchindep, "_prejoin4".owner, "_prejoin4".parent_series, "_prejoin4".sourcecount, "_prejoin4".releasestatus, "_prejoin4".summary, "_prejoin4".title, "_prejoin4".version, "_prejoin5".id, "_prejoin5".name FROM SourcePackageName, SourcePackageRelease, SourcePackagePublishingHistory LEFT JOIN SourcePackageRelease AS "_prejoin1" ON SourcePackagePublishingHistory.sourcepackagerelease = "_prejoin1".id LEFT JOIN Person AS "_prejoin2" ON "_prejoin1".creator = "_prejoin2".id LEFT JOIN GPGKey AS "_prejoin3" ON "_prejoin1".dscsigningkey = "_prejoin3".id LEFT JOIN DistroSeries AS "_prejoin4" ON SourcePackagePublishingHistory.distroseries = "_prejoin4".id LEFT JOIN Section AS "_prejoin5" ON SourcePackagePublishingHistory.section = "_prejoin5".id WHERE SourcePackagePublishingHistory.archive = 7087 AND SourcePackagePublishingHistory.sourcepackagerelease = SourcePackageRelease.id AND SourcePackageRelease.sourcepackagename = SourcePackageName.id AND SourcePackageName.name LIKE '%' || '' || '%' AND (1=1) ORDER BY SourcePackageName.name, debversion_sort_key(SourcePackageRelease.version) DESC, SourcePackagePublishingHistory.id DESC LIMIT 51 OFFSET 0

Note the SourcePackageName.name LIKE '%' || '' || '%' condition: postgresql does not optimise this out to (is not null) in 8.3, it may in newer ones. I tested this against bugs -

lpmain_staging=> select count(*) from bug where bug.description like '%' || '' || '%' ;
Cancel request sent
ERROR: canceling statement due to user request

 (I gave it a good 10 seconds)
lpmain_staging=> select count(*) from bug ;
 count
--------
 611067
(1 row)

Time: 1487.432 ms

lpmain_staging=> select count(*) from bug where bug.description like '%' || '' || '%' ;
Cancel request sent
ERROR: canceling statement due to user request
still slow.

Related branches

summary: - Archive:+packages with empty name search does like '%% search.
+ Archive:+packages with empty name search does like '%%' search.
William Grant (wgrant)
Changed in soyuz:
assignee: nobody → William Grant (wgrant)
status: Triaged → In Progress
tags: added: pg83
Revision history for this message
Launchpad QA Bot (lpqabot) wrote : Bug fixed by a commit
Changed in soyuz:
milestone: none → 10.11
tags: added: qa-needstesting
Changed in soyuz:
status: In Progress → Fix Committed
tags: added: qa-ok
removed: qa-needstesting
Changed in soyuz:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.