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

Richard Mortimer via KDE Bugzilla bugzilla_noreply at kde.org
Wed Nov 25 15:26:59 GMT 2015


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

--- Comment #21 from Richard Mortimer <richm+kde at oldelvet.org.uk> ---
(In reply to caulier.gilles from comment #20)
> >1 - Each of the image, thumbnails and face recognition databases all have a table called Settings. >I can see this causing trouble with all three merged into a single database.
> 
> Which trouble exactly ? I already noticed some problem and i fixed this with
> face recognition DB integration.
> 
Sorry. That was a poor description from me. I was not referring to a specific
problem. I meant that it is likely to cause confusion/problems in the future.

> 3/ => the logic is good. turning on the bool value will stop copy
> processing. But in fact an new method need to be add in this class to be
> able to change this private bool member from outside (as for ex, when Cancel
> button is pressed).
As I said the current code code is broken in at least 2 places. They are easy
to fix but I just wanted to record it before I forgot.

The specific issues I can see are:

If set during the "Delete all tables" loop the loop will never terminate
(m_isStopProcessing || i>=0 will always be true) and will result in a crash
once "i" becomes negative and underflows the tables array.

Similarly if set during the copying the last iteration of the copy tables loop
then "i" will become greater than the length of tables and will result in a
crash during emit stepStarted because it tries to access tables[i].
> 
> Granularity of bool check to cancel copy must be decreased. typically
> checking bool outside the loop will prevent to break partial database copy
> in the middle section of data.
agreed.

> 
> In all case a garbage collector must be implemented to cleanup previous copy
> while migration. Perhaps to cleanup target database can be enough.
agreed. The user must expect that the target database has been changed and a
cleanup should be enough.

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



More information about the Digikam-devel mailing list