Bug 412417 - digikam fails to start - update fails
Summary: digikam fails to start - update fails
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Sqlite (show other bugs)
Version: 6.4.0
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-09-28 13:25 UTC by Sergey
Modified: 2020-07-25 14:15 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 7.1.0


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sergey 2019-09-28 13:25:29 UTC
SUMMARY
After updating the OS to OpenSUSE 15.1, digikam stopped working: it tries to update its database from version 8 to 10, but after updating to 9 update to 10 fails.


STEPS TO REPRODUCE
1. Have digikam installed on OpenSUSE 41.2
2. Update OS to OpenSUSE 15.1
3. Try to run digikam

OBSERVED RESULT
After launching it in command prompt:

> digikam
digikam.general: AlbumWatch use QFileSystemWatcher
digikam.general: Database Parameters:
   Type:                     "QSQLITE"
   DB Core Name:             "/mnt/nas4free/Album/digikam4.db"
   DB Thumbs Name:           "/mnt/nas4free/Album/thumbnails-digikam.db"
   DB Face Name:             "/mnt/nas4free/Album/recognition.db"
   DB Similarity Name:      "/mnt/nas4free/Album/similarity.db"
   Connect Options:          ""
   Host Name:                ""
   Host port:                -1
   Internal Server:          false
   Internal Server Path:     ""
   Internal Server Serv Cmd: ""
   Internal Server Init Cmd: ""
   Username:                 ""
   Password:                 ""

digikam.dbengine: Loading SQL code from config file "/usr/share/digikam/database/dbconfig.xml"
digikam.dbengine: Checking XML version ID => expected:  3  found:  3
digikam.coredb: Core database: running schema update
digikam.coredb: Core database: have a structure version  8
digikam.coredb: Core database: makeUpdates  8  to  10
digikam.coredb: Core database: success updating to version  9
digikam.coredb: Core database: success updating to version  9
digikam.dbengine: Failure executing query:
 "" 
Error messages: "Невозможно получить строку" "attempt to write a readonly database" 8 1 
Bound values:  ()
digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV9ToV10" ] Statement [ "DROP TABLE IF EXISTS ImageHaarMatrix;" ]
digikam.coredb: Core database: schema update to V 10 failed!
digikam.dbengine: Failure executing query:
 "REPLACE INTO Settings VALUES (?,?);" 
Error messages: "Невозможно получить строку" "attempt to write a readonly database" 8 1 
Bound values:  (QVariant(QString, "DBVersion"), QVariant(QString, "9"))
digikam.dbengine: Failure executing query:
 "REPLACE INTO Settings VALUES (?,?);" 
Error messages: "Невозможно получить строку" "attempt to write a readonly database" 8 1 
Bound values:  (QVariant(QString, "DBVersionRequired"), QVariant(QString, "5"))
digikam.coredb: Core database: cannot process schema initialization
KMemoryInfo: Platform identified :  "LINUX"
KMemoryInfo: TotalRam:  8387072000
digikam.general: Allowing a cache size of 200 MB
QThreadStorage: Thread 0x7f8a64baec40 exited after QThreadStorage 12 destroyed


EXPECTED RESULT
digikam runs

SOFTWARE/OS VERSIONS
OpenSUSE 15.1

ADDITIONAL INFORMATION
Comment 1 Maik Qualmann 2019-09-28 13:56:23 UTC
I do not know what openSUSE does wrong here because the error has already been reported. I can not reproduce it here at openSUSE Thumbleweed. You have no write permission to the database file. DigiKam does not change any rights. This must be done outside. Check the write permission on the digikam4.db and the other DB files.

Maik
Comment 2 Maik Qualmann 2019-09-28 14:30:21 UTC
One more note. Your database is located on the file path on a NAS drive. For performance reasons, the SQLite databases should reside on a fast local drive.

Maik
Comment 3 Maik Qualmann 2019-09-28 15:03:05 UTC

*** This bug has been marked as a duplicate of bug 406461 ***
Comment 4 Sergey 2019-09-29 04:58:15 UTC
> You have no write permission to the database file.

I did on the server:

nas4free: Album# ls -l digikam4.db
-rwxrw-r--  1 lary  admin  42672128 Sep 11 21:24 digikam4.db

nas4free: Album# chmod 0666 digikam4.db
nas4free: Album# chown lary:users digikam4.db

And:

nas4free: Album# chmod 0666 thumbnails-digikam.db
nas4free: Album# chmod 0666 recognition.db
nas4free: Album# chmod 0666 Thumbs.db

nas4free: Album# chown lary:users thumbnails-digikam.db recognition.db Thumbs.db


Digikam program behavior has changed, but it still did not work:

digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV9ToV10" ] Statement [ "DROP TABLE IF EXISTS ImageHaarMatrix;" ]
digikam.coredb: Core database: schema update to V 10 failed!
Comment 5 Sergey 2019-09-29 05:00:49 UTC
> the SQLite databases should reside on a fast local drive.

How can I specify a new database location before (!) Launching the program?
Comment 6 caulier.gilles 2020-07-25 14:15:04 UTC
Fixed with bug #406461