Bug 219805

Summary: CCBUG git post-commit hook reports error about OS/Version
Product: [Developer tools] kdesdk-scripts Reporter: Bart Cerneels <bart.cerneels>
Component: source_controlAssignee: Michael Pyne <mpyne>
Status: RESOLVED FIXED    
Severity: normal    
Priority: NOR    
Version: unspecified   
Target Milestone: ---   
Platform: Compiled Sources   
OS: Unspecified   
Latest Commit: Version Fixed In:

Description Bart Cerneels 2009-12-23 10:38:48 UTC
Version:           git post-commit hooks (using Devel)
Installed from:    Compiled sources

---------- Forwarded message ----------
From:  <bugzilla_noreply@kde.org>
Date: Wed, Dec 23, 2009 at 10:26
Subject: Re: [Amarok] 73934ce Try to work around a database leak in podcasts.
To: Bart Cerneels <bart.cerneels@kde.org>


A legal OS/Version was not set.

Bart Cerneels wrote:
> @bug_ud = 219516
>
> commit 73934cea2cb90bb66d7226ea090c5a613a679f7d
> Author: Bart Cerneels <bart.cerneels@kde.org>
> Date:   Tue Dec 22 11:36:52 2009 +0100
>
>     Try to work around a database leak in podcasts.
>
>     Because of a stupid mistake on my part there is bogus data in the podcastepisodes table. By ordering the results by desending id we should get the correct results first in the result.
>
>     This will solve the "limit episodes not honored" part but I think there will still be duplicate episode. The only fix for that issue is a database cleanup.
>     CCBUG:219516
>
> diff --git a/src/podcasts/sql/SqlPodcastProvider.cpp b/src/podcasts/sql/SqlPodcastProvider.cpp
> index 9456b93..147fcfb 100644
> --- a/src/podcasts/sql/SqlPodcastProvider.cpp
> +++ b/src/podcasts/sql/SqlPodcastProvider.cpp
> @@ -193,7 +193,7 @@ SqlPodcastProvider::trackForUrl( const KUrl & url )
>      QString command = "SELECT id, url, channel, localurl, guid, "
>              "title, subtitle, sequencenumber, description, mimetype, pubdate, "
>              "duration, filesize, isnew FROM podcastepisodes "
> -            "WHERE guid='%1' OR url='%1' OR localurl='%1';";
> +            "WHERE guid='%1' OR url='%1' OR localurl='%1' ORDER BY id DESC;";
>      command = command.arg( sqlStorage->escape( url.url() ) );
>      QStringList dbResult = sqlStorage->query( command );
Comment 1 Matt Rogers 2010-01-10 05:56:21 UTC
To my knowledge, this has been fixed. (At least nobody else has complained about it)