[Digikam-devel] [digikam] [Bug 350574] MIGRATION: MySQL to SQLite fails about Tags tree [patch]

via KDE Bugzilla bugzilla_noreply at kde.org
Wed Jul 27 09:14:16 BST 2016


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

--- Comment #13 from swatilodha27 at gmail.com ---
(In reply to Richard Mortimer from comment #11)
...(skip)
> 
> Secondly it seems that either duplicate TagsTree entries are getting added
> or maybe somehow not getting added correctly. This needs investigation. It
> should be fairly simple to do because it seems that things can be reproduced
> easily so it will be possible to use the sqlite3 commandline to investigate
> the state of the database when things go wrong.
> 
> I'm actually wondering if the add_tag (and other) trigger is getting added
> to the database twice. I think I remember that SQLite can have multiple
> triggers on one table so maybe there are two triggers trying to add an entry
> into the TagsTree table.

Using sqlite browser, I looked at the database tables for SQLite and found that
in TagsTree table, each tag is actually added TWICE. I guess this is the reason
why UNIQUE constraint fails while migrating to SQLite...

> Looking at the coreschemaupdater.cpp file there are two places where
> createTriggers() is called so that may be relevant. Note I only did a very
> quick look at the source so it might be a misleading idea. But I think there
> is more investigation that needs doing to find the cause of the problem.

Yes, the first one while creating database, and second in a version update. But
in the update step, trigger is first deleted and then again created, so I guess
this is fine?

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



More information about the Digikam-devel mailing list