[Digikam-devel] [digikam] [Bug 355831] MySQL Schema Improvements
Richard Mortimer via KDE Bugzilla
bugzilla_noreply at kde.org
Thu Apr 21 20:17:54 BST 2016
--- Comment #65 from Richard Mortimer <richm+kde at 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 the assignee for the bug.
More information about the Digikam-devel