[Digikam-devel] [digikam] [Bug 355831] MySQL Schema Improvements

Felix Leif Keppmann via KDE Bugzilla bugzilla_noreply at kde.org
Sun Feb 21 01:54:25 GMT 2016


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

--- Comment #62 from Felix Leif Keppmann <felix.leif at keppmann.de> ---
Hello,


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))

Log:
https://bpaste.net/show/120359f6c1f2

Version:
5.0.0-beta3 <-> 5.0.0-beta4
Commit c75e88ddb078cc2aef3ea3427b934fe18fda906f
Sat, 20 Feb 2016 08:35:35 +0000 (09:34 +0059) 

Setup / Reproduce:
1) Digikam started with three empty MySQL databases, i.e., core, faces, and
thumbnails
2) Add test collection
3) Add test album / directory to collection
4) Delete test album -> failure, i.e., album stays in Digikam album tree,
deleted on disk, MySQL error in log
5) Delete test (ghost) album again -> no change

Maybe this helps to fix it.
As workaround, recreating a ghost album as directory manually at disk makes it
reusable in Digikam.
I run Digikam with MySQL databases and would be glad to help testing.


Regards
Felix

-- 
You are receiving this mail because:
You are the assignee for the bug.



More information about the Digikam-devel mailing list