[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [digikam] [Bug 355831] MySQL Schema Improvements
From:       Richard Mortimer via KDE Bugzilla <bugzilla_noreply () kde ! org>
Date:       2016-04-21 19:17:54
Message-ID: bug-355831-17878-Pm5QLU4hK8 () http ! bugs ! kde ! org/
[Download RAW message or body]

https://bugs.kde.org/show_bug.cgi?id=355831

--- Comment #65 from Richard Mortimer <richm+kde@oldelvet.org.uk> ---
(In reply to Felix Leif Keppmann from comment #62)
> 
> currently I face the issue of not being able to completely delete
> directories. Directories are deleted on disk, but not deleted from the
> database, i.e., obsolete ghost directories remain in Digikam's album tree.
> 
> Seems to be related to failing MySQL queries:
> 
>  "UPDATE Albums SET albumRoot=0, relativePath=? WHERE id=?;" 
> Error messages: "QMYSQL3: Unable to execute statement" "Cannot add or update
> a child row: a foreign key constraint fails (`digikam_core`.`Albums`,
> CONSTRAINT `Albums_AlbumRoots` FOREIGN KEY (`albumRoot`) REFERENCES
> `AlbumRoots` (`id`) ON DELETE CASCADE ON UPDATE CASCADE)" 1452 2 
> Bound values:  (QVariant(QString, "1-/test"), QVariant(int, 2))
> 
I think the issue here is that the database is trying to use albumRoot=0 to
mark the album as being disconnected/deleted. However with referential
integrity set this now is not allowed.

This seems to be happening in CoreDB::makeStaleAlbum(int albumID)

The lifecycle of stale albums needs considering a little more.

-- 
You are receiving this mail because:
You are watching all bug changes.
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic