Bug 392189 - Database upgrade fails
Summary: Database upgrade fails
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Applications
Component: Database-Mysql (show other bugs)
Version: 5.8.0
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-22 19:36 UTC by Pierre Choffet
Modified: 2018-09-04 16:49 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In: 6.0.0
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pierre Choffet 2018-03-22 19:36:41 UTC
Digikam fails to launch with the following message: "  Failed to update the database schema from version 8 to version 9. Please read the error messages printed on the console and report this error as a bug at bugs.kde.org. "

Here is the log:
$ digikam
digikam.general: AlbumWatch use QFileSystemWatcher
digikam.general: Database Parameters:
   Type:                     "QMYSQL"
   DB Core Name:             "digikam"
   DB Thumbs Name:           "digikam_thumbnails"
   DB Face Name:             "digikam_faces"
   Connect Options:          ""
   Host Name:                "p6t"
   Host port:                3306
   Internal Server:          false
   Internal Server Path:     ""
   Internal Server Serv Cmd: ""
   Internal Server Init Cmd: ""
   Username:                 "digikam"
   Password:                 "XXXXXXXXX"

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  9
digikam.dbengine: Failure executing query:
 "" 
Error messages: "QMYSQL: Unable to execute query" "Cannot load from mysql.proc. The table is probably corrupted" 1728 2 
Bound values:  ()
digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV7ToV9" ] Statement [ "\n                    DROP PROCEDURE IF EXISTS drop_foreign_key;\n                " ]
digikam.coredb: Core database: schema update to V 9 failed!
digikam.coredb: Core database: cannot process schema initialization
KMemoryInfo: Platform identified :  "LINUX"
KMemoryInfo: TotalRam:  6242914304
digikam.general: Allowing a cache size of 200 MB
QThreadStorage: Thread 0x7f9132ff2100 exited after QThreadStorage 11 destroyed

Database system is MariaDB, as provided by ArchLinux packages.
Comment 1 Maik Qualmann 2018-03-22 20:27:58 UTC
> Error messages: "QMYSQL: Unable to execute query" "Cannot load from
> mysql.proc. The table is probably corrupted" 1728

First, repair / upgrade your MySQL database with this command:
mysql_upgrade -u root -p

Replace the  dbconfig.xml as described here:
https://bugs.kde.org/show_bug.cgi?id=388977

Or use the AppImage of digiKam-5.9.0 from here:
https://download.kde.org/stable/digikam/

Maik
Comment 2 Pierre Choffet 2018-03-22 21:02:44 UTC
Worked, thanks!

*** This bug has been marked as a duplicate of bug 388977 ***
Comment 3 caulier.gilles 2018-09-04 16:49:58 UTC
Not reproducible with 6.0.0