[Bug 277242] New: After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

classic Classic list List threaded Threaded
40 messages Options
12
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] New: After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

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

           Summary: After SQLite --> MySQL conversion, digikam reports
                    error regarding DBThumbnailsVersion on start up.
           Product: digikam
           Version: 2.0.0
          Platform: Compiled Sources
        OS/Version: OS X
            Status: UNCONFIRMED
          Severity: normal
          Priority: NOR
         Component: Database
        AssignedTo: [hidden email]
        ReportedBy: [hidden email]


Version:           2.0.0
OS:                OS X

After using the database migration tool, i get the error dialog with the
following message every time i start digikam,

 Error message: The database is not valid: the "DBThumbnailsVersion" setting
 does not exist. The current database schema version cannot be verified. Try
 to start with an empty database.

The relivant console output:
  digikam(2324)/digikam (core) Digikam::ThumbnailSchemaUpdater::startUpdates:
Have a database structure version  ""
  digikam(2324)/digikam (core): DBThumbnailsVersion not available! Giving up
schema upgrading.


I am not certain that this is a direct result of the database migration. I
don't have a spare digikam installation and DB to use for testing, yet. I would
like to get more info before reporting, but i know that you are trying to get a
2.0.0 stable release done, so i wanted to make sure to inform the devs quickly.



Reproducible: Didn't try

Steps to Reproduce:
Using database migration tool.

Actual Results:  
An error dialog appears at each application startup

Expected Results:  
no errors and to use a database with already generated thumbnails.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Gilles Caulier-4
https://bugs.kde.org/show_bug.cgi?id=277242


Gilles Caulier <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]




--- Comment #1 from Gilles Caulier <caulier gilles gmail com>  2011-07-07 05:12:43 ---
This error message is reproducible under Linux as OSX ?

Gilles Caulier

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

brad
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #2 from brad <bkn ithryn net>  2011-07-07 20:38:21 ---
This is in fact reproducible on Linux. Now that i have it building my machine
at work, here is the path to reproduce.

I stared with a fresh database with some sample photos. Use the Database
Migration Tool, to convert the database from SQLite to MySQL (NOTE: i used an
external MySQL database, not the internal version as the 'Internal Database'
option gave an error). The conversion succeeded. Then, go to Configure Digikam
and update the database information to use the newly created MySQL database, at
which point i got an error saying,
  "Error message: Failed to create tables in database."
where the title of the dialog was:
  "Failed to initialize thumbnail database".

Relevant konsole output follows,
  digikam(11486)/digikam (core): Call initializeThumbnailDatabase at
  application start. There are already thumbnail loading threads created,
  and these will not be switched to use the database.

Then after these steps, every start of digikam will yield the messages outlined
in the initial bug report. Also Note, that using the command line mysql client
i can create tables within the thumbnails database using the same username/pass
as digikam.

I hope this helps a little bit, please let me know if you need more
information.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Gerhard Kulzer
I think I can explain a bit of it, and how to make it work the temporary way:

If you have a separate Mysql DB for thumbs (say 'digikam' for images and 'digikam_thumbs' for the thumbnails), then a 'settings' table is written into
'digikam_thumbs'. During the migration from sqlite, nothing gets written into into that table, although the sqlite corresponding table has DBThumbnailsVersionRequired:1, DBThumbnailsVersion:2 in it.

I added the two records to 'digikam_thumbs'.settings, but digikam still throws the same error. Then I added the 2 records to 'digikam'.settings and it worked, no error message anymore, and digikam finds all its thumbnails from the DB again.


Gerhard

On Thu, Jul 7, 2011 at 10:38 PM, brad <[hidden email]> wrote:
--- Comment #2 from brad <bkn ithryn net>  2011-07-07 20:38:21 ---
This is in fact reproducible on Linux. Now that i have it building my machine
at work, here is the path to reproduce.

I stared with a fresh database with some sample photos. Use the Database
Migration Tool, to convert the database from SQLite to MySQL (NOTE: i used an
external MySQL database, not the internal version as the 'Internal Database'
option gave an error). The conversion succeeded. Then, go to Configure Digikam
and update the database information to use the newly created MySQL database, at
which point i got an error saying,
 "Error message: Failed to create tables in database."
where the title of the dialog was:
 "Failed to initialize thumbnail database".

Relevant konsole output follows,
 digikam(11486)/digikam (core): Call initializeThumbnailDatabase at
 application start. There are already thumbnail loading threads created,
 and these will not be switched to use the database.

Then after these steps, every start of digikam will yield the messages outlined
in the initial bug report. Also Note, that using the command line mysql client
i can create tables within the thumbnails database using the same username/pass
as digikam.

I hope this helps a little bit, please let me know if you need more
information.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Gerhard Kulzer
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #3 from Gerhard Kulzer <gerhard kulzer net>  2011-07-10 17:17:01 ---
I think I can explain a bit of it, and how to make it work the temporary
way:

If you have a separate Mysql DB for thumbs (say 'digikam' for images and
'digikam_thumbs' for the thumbnails), then a 'settings' table is written
into 'digikam_thumbs'. During the migration from sqlite, nothing gets
written into into that table, although the sqlite corresponding table has
DBThumbnailsVersionRequired:1, DBThumbnailsVersion:2 in it.

I added the two records to 'digikam_thumbs'.settings, but digikam still
throws the same error. Then I added the 2 records to  'digikam'.settings and
it worked, no error message anymore, and digikam finds all its thumbnails
from the DB again.


Gerhard

On Thu, Jul 7, 2011 at 10:38 PM, brad <[hidden email]> wrote:

> https://bugs.kde.org/show_bug.cgi?id=277242
>
>
>
>
>
> --- Comment #2 from brad <bkn ithryn net>  2011-07-07 20:38:21 ---
> This is in fact reproducible on Linux. Now that i have it building my
> machine
> at work, here is the path to reproduce.
>
> I stared with a fresh database with some sample photos. Use the Database
> Migration Tool, to convert the database from SQLite to MySQL (NOTE: i used
> an
> external MySQL database, not the internal version as the 'Internal
> Database'
> option gave an error). The conversion succeeded. Then, go to Configure
> Digikam
> and update the database information to use the newly created MySQL
> database, at
> which point i got an error saying,
>  "Error message: Failed to create tables in database."
> where the title of the dialog was:
>  "Failed to initialize thumbnail database".
>
> Relevant konsole output follows,
>  digikam(11486)/digikam (core): Call initializeThumbnailDatabase at
>  application start. There are already thumbnail loading threads created,
>  and these will not be switched to use the database.
>
> Then after these steps, every start of digikam will yield the messages
> outlined
> in the initial bug report. Also Note, that using the command line mysql
> client
> i can create tables within the thumbnails database using the same
> username/pass
> as digikam.
>
> I hope this helps a little bit, please let me know if you need more
> information.
>
> --
> Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
> ------- You are receiving this mail because: -------
> You are the assignee for the bug.
> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

brad
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #4 from brad <bkn ithryn net>  2011-07-10 20:01:22 ---
I also did some testing and i will describe my findings in brief here in hopes
someone who is more familiar with the database code will understand the
problem.

Consider the line of code in core/libs/database/thumbnailschemaupdater.cpp:92

    QStringList tables = m_access->backend()->tables();                        

If one looks at the list returned, it is in fact a list of tables; however it
is a list of ALL tables in ALL databases that the particular mysql user can
read. So in that list there is a 'Settings' table for the 'digikam' database,
as well as a 'Settings' table for the 'digikam_thumbs' database. When the code
asks for the 'Settings' table (which i am assuming line 97 of the same file
does) is ambiguous, and probably returns the first Settings table that occurs
alphabetically; in the example above that would be 'digikam.settings' rather
than 'digikam_thumbs.settings'.

This explains the behavior in the above comment. I am still sifting through the
code to figure out why there is no database specified in this particular
database code. I am not familiar with this code; so perhaps someone familiar
with the code will find a fix first.

Cheers,
 -- brad

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Francesco Riosa-2
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242


Francesco Riosa <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]




--- Comment #5 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-10 20:45:39 ---
(In reply to comment #3)

> I think I can explain a bit of it, and how to make it work the temporary
> way:
>
> If you have a separate Mysql DB for thumbs (say 'digikam' for images and
> 'digikam_thumbs' for the thumbnails), then a 'settings' table is written
> into 'digikam_thumbs'. During the migration from sqlite, nothing gets
> written into into that table, although the sqlite corresponding table has
> DBThumbnailsVersionRequired:1, DBThumbnailsVersion:2 in it.
>
> I added the two records to 'digikam_thumbs'.settings, but digikam still
> throws the same error. Then I added the 2 records to  'digikam'.settings and
> it worked, no error message anymore, and digikam finds all its thumbnails
> from the DB again.
>
>
> Gerhard

I'll test using separate databases for images and thumbnails, in the meantime
could you explain the rationale for using different databases in mysql for
tables and thumbs?

Because I was thinking on this the last week and made no sense to me, either it
should be possible to have different types of databases i.e. images on mysql
and thumbs on sqlite, or it should be all in one database, so I'm curious of
this one



(In reply to comment #4)
> I also did some testing and i will describe my findings in brief here in hopes
> someone who is more familiar with the database code will understand the
> problem.
>
> Consider the line of code in core/libs/database/thumbnailschemaupdater.cpp:92
>
>     QStringList tables = m_access->backend()->tables();    

this call
- QStringList QSqlDatabase::tables ( QSql::TableType type = QSql::Tables )
const
- Returns a list of the database's tables, system tables and views, as
specified by the - parameter type.
if it return tables of other mysql databases it's a QT bug

>
> If one looks at the list returned, it is in fact a list of tables; however it
> is a list of ALL tables in ALL databases that the particular mysql user can
> read. So in that list there is a 'Settings' table for the 'digikam' database,
> as well as a 'Settings' table for the 'digikam_thumbs' database. When the code
> asks for the 'Settings' table (which i am assuming line 97 of the same file
> does) is ambiguous, and probably returns the first Settings table that occurs
> alphabetically; in the example above that would be 'digikam.settings' rather
> than 'digikam_thumbs.settings'.
>
> This explains the behavior in the above comment. I am still sifting through the
> code to figure out why there is no database specified in this particular
> database code. I am not familiar with this code; so perhaps someone familiar
> with the code will find a fix first.
>

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Gilles Caulier-4
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #6 from Gilles Caulier <caulier gilles gmail com>  2011-07-10 20:52:24 ---
Francesco,

The reason why thumbs are stored in a separated DB file is file size, which can
be huge with large collection.

Users what to be able to manage where thumb DB will be stored to not fill a
lots the hard drive.

In this DB we use wavelets compression to optimize size. Thumbs size is
256x256. Imagine the DB size for 200K, or 400K items ?

Gilles Caulier

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Francesco Riosa-2
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #7 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-10 20:57:55 ---
(In reply to comment #6)

> Francesco,
>
> The reason why thumbs are stored in a separated DB file is file size, which can
> be huge with large collection.
>
> Users what to be able to manage where thumb DB will be stored to not fill a
> lots the hard drive.
>
> In this DB we use wavelets compression to optimize size. Thumbs size is
> 256x256. Imagine the DB size for 200K, or 400K items ?
>
> Gilles Caulier

This is correct for sqlite for many reasons, but a mysql database is quite a
different beast, has I've said before it can be useful to use different _types_
of databases for images and thumbs (also a filesystem based one came in mind),
but using different schemas in mysql give no performaces or safety gains

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Gilles Caulier-4
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #8 from Gilles Caulier <caulier gilles gmail com>  2011-07-10 21:11:32 ---
But the size of DB to store thumbs still a problem with Mysql. No ?

The way to be able to setup a specific place to store thumbs DB is very
important (it's an old report from bugzilla in fact). Currently, with Mysql,
it's not possible to do it...

Gilles Caulier

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Francesco Riosa-2
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #9 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-10 21:31:58 ---
(In reply to comment #8)
> But the size of DB to store thumbs still a problem with Mysql. No ?

Either you have a table per file (myisam and innodb with
"innodb_file_per_table") or you have all databases in one place (innodb and
other). So in short no, it's not a problem with mysql.
Also Mysql is adapt meant to be used with huge amount of data, many GBytes or
even TeraBytes

>
> The way to be able to setup a specific place to store thumbs DB is very
> important (it's an old report from bugzilla in fact). Currently, with Mysql,
> it's not possible to do it...

yep it is ... kinda possible, you have "partitioning" and "symlinking" but
that's stuff for advanced users not for us to manage
http://dev.mysql.com/doc/refman/5.1/en/partitioning.html
http://dev.mysql.com/doc/refman/5.1/en/symbolic-links-to-tables.html

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

Re: [Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Gerhard Kulzer
In reply to this post by Francesco Riosa-2

I'll test using separate databases for images and thumbnails, in the meantime
could you explain the rationale for using different databases in mysql for
tables and thumbs?

Because I was thinking on this the last week and made no sense to me, either it
should be possible to have different types of databases i.e. images on mysql
and thumbs on sqlite, or it should be all in one database, so I'm curious of
this one

I like to keep thumbnails separate for the sole reason of slim backups.
Explanation:
I run a sql backup every week, and having 1.3GB as thumbnails, it is a bit heavy. The image DB has 130MB only (contains 56k images at the moment, interestingly, the bulk data is copyrights). So I don't do backups on thumbnails. Should I loose them, digikam will rebuild them in 2 hours.
Digikam foresees the dual DB system in the settings: you can specify two schema names. And, by the way, when using sqlite it uses to DBs as well.

Gerhard
 
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel


_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Gerhard Kulzer
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #10 from Gerhard Kulzer <gerhard kulzer net>  2011-07-11 07:58:05 ---

>
>
> I'll test using separate databases for images and thumbnails, in the
> meantime
> could you explain the rationale for using different databases in mysql for
> tables and thumbs?
>
> Because I was thinking on this the last week and made no sense to me,
> either it
> should be possible to have different types of databases i.e. images on
> mysql
> and thumbs on sqlite, or it should be all in one database, so I'm curious
> of
> this one
>

I like to keep thumbnails separate for the sole reason of slim backups.
Explanation:
I run a sql backup every week, and having 1.3GB as thumbnails, it is a bit
heavy. The image DB has 130MB only (contains 56k images at the moment,
interestingly, the bulk data is copyrights). So I don't do backups on
thumbnails. Should I loose them, digikam will rebuild them in 2 hours.
Digikam foresees the dual DB system in the settings: you can specify two
schema names. And, by the way, when using sqlite it uses to DBs as well.

Gerhard


> _______________________________________________
> Digikam-devel mailing list
> [hidden email]
> https://mail.kde.org/mailman/listinfo/digikam-devel
>

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Francesco Riosa-2
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #11 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-11 11:08:37 ---
(In reply to comment #10)
> >
> >
> > I'll test using separate databases for images and thumbnails, in the
> > meantime
> > could you explain the rationale for using different databases in mysql for
> > tables and thumbs?

still todo but soon (TM) ;)

> >
> > Because I was thinking on this the last week and made no sense to me,
> > either it
> > should be possible to have different types of databases i.e. images on
> > mysql
> > and thumbs on sqlite, or it should be all in one database, so I'm curious
> > of
> > this one
> >
>
> I like to keep thumbnails separate for the sole reason of slim backups.
> Explanation:
> I run a sql backup every week, and having 1.3GB as thumbnails, it is a bit
> heavy. The image DB has 130MB only (contains 56k images at the moment,
> interestingly, the bulk data is copyrights). So I don't do backups on
> thumbnails. Should I loose them, digikam will rebuild them in 2 hours.
> Digikam foresees the dual DB system in the settings: you can specify two
> schema names. And, by the way, when using sqlite it uses to DBs as well.
>
> Gerhard

I do understund, but please permit me to suggest a script that does the dump of
the wanted data, and append only the structure of thumbnail database, it use
the the standard `mysqldump` program


TIMESTAMP=$( date -u +%Y-%m-%dT%H-%M-%S )
DIGIKAM_DATABASE=digikam
u=digikam
p=digikam

mysqldump \
  --opt --routines \
  -u"${u}" -p"${p}" \
  --ignore-table="${DIGIKAM_DATABASE}.Thumbnails" \
  --ignore-table="${DIGIKAM_DATABASE}.UniqueHashes" \
  --ignore-table="${DIGIKAM_DATABASE}.FilePaths" \
  --ignore-table="${DIGIKAM_DATABASE}.CustomIdentifiers" \
  ${DIGIKAM_DATABASE} \
  > digikam-${TIMESTAMP}

mysqldump \
  --opt \
  --no-data \
  -u"${u}" -p"${p}" \
  "${DIGIKAM_DATABASE}" \
    Thumbnails \
    UniqueHashes \
    FilePaths \
    CustomIdentifiers \
  >> digikam-${TIMESTAMP}

gzip digikam-${TIMESTAMP}

## restore with:
# gzcat digikam-${TIMESTAMP}.gz | mysql -u"${u}" -p"${p}" "${DIGIKAM_DATABASE}"

-- regards, Francesco

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

brad
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #12 from brad <bkn ithryn net>  2011-07-11 13:18:19 ---
I don't know much about all of this, but might i suggest that however the
tables/databases are organized, that perhaps the tables that are meant to be
for thumbnails all be have a prefix, e,g, ThumbnailDBSettings,
ThumbnailDBUniqueHashes, ThumbnailDBFIlePaths .... etc.

This way, there are no name space clashes, which we're seeing above, and if the
two databases are to be merged in the future, minimal effort will be needed to
alter the sql code.

I played around with this idea in my local code base, however in the hour or
two i was testing, i wasn't able to get a full understanding of all the
instances of database queries.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Francesco Riosa-2
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #13 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-11 13:29:23 ---
(In reply to comment #12)
> I don't know much about all of this, but might i suggest that however the
> tables/databases are organized, that perhaps the tables that are meant to be
> for thumbnails all be have a prefix, e,g, ThumbnailDBSettings,
> ThumbnailDBUniqueHashes, ThumbnailDBFIlePaths .... etc.
>
> This way, there are no name space clashes, which we're seeing above, and if the
> two databases are to be merged in the future, minimal effort will be needed to
> alter the sql code.

let me precise that there will be always the possibility to have different
databases for thumbnails and images data, the digikam code also will always be
totally structured to support this, the "merging" I was thinking is more
something like - hardcopy the database name used for images to that of
thumbnails" _only_ for databases like mysql or postgres.

>
> I played around with this idea in my local code base, however in the hour or
> two i was testing, i wasn't able to get a full understanding of all the
> instances of database queries.

it's a very good idea, but it require another migration and another version of
the database, it will not be done in 2.0

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Francesco Riosa-2
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #14 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-25 12:13:01 ---
I don't think I'll be able to fix this for 2.0, could we live with this bug
until 2.1?

Changes should be simple but have yet to be investigated and after that tested
in deep.

:(

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

brad
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #15 from brad <bkn ithryn net>  2011-07-25 12:50:49 ---
>
>
> --- Comment #14 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-25 12:13:01 ---
> I don't think I'll be able to fix this for 2.0, could we live with this bug
> until 2.1?
>
if this is the case, would it make sense to temporarily comment out the
Database Migration feature? I image anyone trying this feature will likely run
into the same problem, file the same bug report, or simply give up on the
software from a bad experience which will happen every time the start digikam.


> Changes should be simple but have yet to be investigated and after that tested
> in deep.
>
understood. if a patch needs testing in the future for this bug, post it here
and i'll offer some feedback.

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Francesco Riosa-2
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #16 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-25 13:23:09 ---
(In reply to comment #15)

> >
> >
> > --- Comment #14 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-25 12:13:01 ---
> > I don't think I'll be able to fix this for 2.0, could we live with this bug
> > until 2.1?
> >
> if this is the case, would it make sense to temporarily comment out the
> Database Migration feature? I image anyone trying this feature will likely run
> into the same problem, file the same bug report, or simply give up on the
> software from a bad experience which will happen every time the start digikam.

Well, the migration is needed to fix various other bugs making the answer "no
it's no possible", there is s still the possibility to disable a splitted mysql
database, because that's a simply interface change but it can give problem to
people who have already a splitted mysql database (there are two databases but
I see only one in the settings) not wonderfull either

> > Changes should be simple but have yet to be investigated and after that tested
> > in deep.
> >
> understood. if a patch needs testing in the future for this bug, post it here
> and i'll offer some feedback.

Sure will be done

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
Reply | Threaded
Open this post in threaded view
|

[Bug 277242] After SQLite --> MySQL conversion, digikam reports error regarding DBThumbnailsVersion on start up.

Francesco Riosa-2
In reply to this post by brad
https://bugs.kde.org/show_bug.cgi?id=277242





--- Comment #17 from Francesco Riosa <francesco+kde pnpitalia it>  2011-07-31 16:39:06 ---
Git commit d5eae51de889ba326b3d33771e7888cd97492932 by Francesco Riosa.
Committed on 31/07/2011 at 18:31.
Pushed by riosa into branch 'master'.

Migration: splitted mysql database fixes

Migration of a sqlite database to a mysql one didn't create
create_index_if_not_exists() stored procedure in the thumbnail database,
leading to failed update if index already existed.

Data of the thumbnail database is not copyed at all, but the content of
the "Settings" table are needed and checked. Workaround the problem
checking/inserting the two needed records at creation time.

CCBUG: 277242
CCBUG: 276052

M  +77   -32   data/database/dbconfig.xml.cmake

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

--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
Digikam-devel mailing list
[hidden email]
https://mail.kde.org/mailman/listinfo/digikam-devel
12