[Digikam-devel] [digikam] [Bug 325655] New: after database migration, random tags assigned to new images
Thomas Bleher
ThomasBleher at gmx.de
Sat Oct 5 09:49:01 BST 2013
https://bugs.kde.org/show_bug.cgi?id=325655
Bug ID: 325655
Summary: after database migration, random tags assigned to new
images
Classification: Unclassified
Product: digikam
Version: 3.3.0
Platform: unspecified
OS: Linux
Status: UNCONFIRMED
Severity: normal
Priority: NOR
Component: Database
Assignee: digikam-devel at kde.org
Reporter: ThomasBleher at gmx.de
I recently converted my digikam database from MySQL to SQLite. Today I imported
some new pictures (by copying them into the appropriate folder and then
starting digikam) and was quite surprised that some images already contained
tags, even though they came directly from my camera, which doesn't assign any
tags.
It seems that my database contains lots of tag entries for non-existing images:
A "select count(*) from ImageTags Left Join Images on imageid=id where id is
Null;" yields "29689" as a result. My guess is that the tags stayed in the
database when the images were deleted. I didn't notice this issue before,
probably because the auto-increment of the database caused the ids not to be
re-used. Apparently this auto-increment status was not transported during
migration, and so old tags were applied to new images.
(I have verified that the entries in the ImageTags table used for the new image
was already present in the old MySQL database, but there was no image with the
corresponding id).
Shouldn't there be a foreign key constraint in the database, so that the
database cannot move to an inconsistent state? At the very least, the database
migration tool should clean the database up, so no random tags are assigned to
new images.
Reproducible: Always
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list