[Digikam-devel] [Bug 233770] Error messages after changing to mysql

Quallenauge Hamsi2k at freenet.de
Tue Apr 13 18:58:53 BST 2010


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


Quallenauge <Hamsi2k at freenet.de> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |Hamsi2k at freenet.de




--- Comment #1 from Quallenauge <Hamsi2k freenet de>  2010-04-13 19:58:51 ---
Both thumbnails-DB and digikam-DB uses the same table "Settings".
All other tables have different names. Seems easy to fix, it is possible
to create a table only if they does not exists.

But I discovered the following problem:
When digikam tries to check, if there is already a thumbnails schema deployed
it does a
--------------------------
QStringList tables = m_access->backend()->tables();
if (tables.contains("Thumbnails"))
--------------------------

Also it does the same check for the digikam database:
--------------------------
QStringList tables = m_Backend->tables();
if (tables.contains("Albums"))
--------------------------

It seems correct to do this in that way and it does, if there is only
one schema at the database (which is the case for SQLite).
On MySql it's possible to have more schemas, e.g. you have a testing
schema and a stable schema. Additional the user "digikam" has access
to both of the schemas. Then the call
--------------------------
tables.contains("Albums")
--------------------------
returns true if at least in one of the schemas exists a table. That means,
the schema is not created and it would result in failed queries.
My proposal for this behaviour is to create database specific
queries to check if the digikam/thumbnail database is really
on the selected schema.

-- 
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the Digikam-devel mailing list