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

via KDE Bugzilla bugzilla_noreply at kde.org
Wed Dec 2 10:59:06 GMT 2015


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

--- Comment #44 from caulier.gilles at gmail.com ---
Git commit bca001b16dd6aba437aece1bc09e9400ec300d1d by Gilles Caulier.
Committed on 02/12/2015 at 10:50.
Pushed by cgilles into branch 'master'.

Apply patch #95860 to store empty icon (image 0) as a NULL value with SQlite
and Mysql Databases

digiKam treats image zero as a "not set" icon value. This
breaks referential integrity in the database because image
zero does not exist. Explicitly convert a value of zero
into NULL when stored in the database.

Ideally digiKam should use an explicit null (in QVariant?)
placeholder for the no-icon case but currently no database
stores an image zero by default so the existing practice
works.

Note that when reading from the database the toLongLong
method of QVariant returns a zero when called against a
null value so this means that no changes are required
when reading null values in from the database.

M  +26   -5    libs/database/coredb/coredb.cpp

http://commits.kde.org/digikam/bca001b16dd6aba437aece1bc09e9400ec300d1d

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



More information about the Digikam-devel mailing list