Bug 388977

Summary: Error during upgrading core database schema from v8 to v9
Product: [Applications] digikam Reporter: Thomas <thflori>
Component: Database-MysqlAssignee: Digikam Developers <digikam-bugs-null>
Severity: major CC: cro, ct.gsk, danielblues, metzpinguin, nathan
Priority: NOR    
Version: 5.8.0   
Target Milestone: ---   
Platform: Manjaro   
OS: Linux   
Latest Commit: Version Fixed In: 5.9.0
Attachments: dbconfig.xml

Description Thomas 2018-01-14 21:26:14 UTC
The problem is that this syntax is obsolete since mysql 5.7. From mysql documentation https://dev.mysql.com/doc/refman/5.6/en/alter-table.html:
> As of MySQL 5.6.17, the IGNORE clause is deprecated and its use generates a > warning. IGNORE is removed in MySQL 5.7.

the required console output:
digikam.coredb: Core database: makeUpdates  8  to  9
digikam.dbengine: Failure executing query:
Error messages: "QMYSQL: Unable to execute query" "You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'IGNORE TABLE AlbumRoots\n                                        ADD UNIQUE (iden' at line 1" 1064 2 
Bound values:  ()
digikam.dbengine: Error while executing DBAction [ "UpdateSchemaFromV7ToV9" ] Statement [ "ALTER IGNORE TABLE AlbumRoots\n                                        ADD UNIQUE (identifier(127), specificPath(128)),\n                                        ENGINE InnoDB;" ]
digikam.coredb: Core database: schema update to V 9 failed!
digikam.coredb: Core database: cannot process schema initialization
KMemoryInfo: Platform identified :  "LINUX"
KMemoryInfo: TotalRam:  16748412928
digikam.general: Allowing a cache size of 200 MB
QThreadStorage: Thread 0x7ff8652ab100 exited after QThreadStorage 11 destroyed
Comment 1 Maik Qualmann 2018-01-15 05:40:23 UTC
Created attachment 109865 [details]

Replace the dbconfig.xml under /usr/share/digikam/database/ with this one. If the entries in the database is in a clean state, the schema update should work fine with MySQL-5.7.

Comment 2 Maik Qualmann 2018-01-15 19:26:27 UTC
Git commit 5893fde69518d70904d2b96e13800c7432b4e4c4 by Maik Qualmann.
Committed on 15/01/2018 at 19:24.
Pushed by mqualmann into branch 'master'.

fix schema update from V7/8 to V9 with temporary tables
Related: bug 388867, bug 388824
FIXED-IN: 5.9.0

M  +4    -2    NEWS
M  +124  -30   data/database/dbconfig.xml.cmake.in

Comment 3 Maik Qualmann 2018-01-15 19:32:42 UTC
Created attachment 109887 [details]

Fix for digiKam-5.8.0: Replace the dbconfig.xml with this one.

File path Windows:

C:\Program Files\digiKam\data\digikam\database

File path Linux:


Comment 4 Maik Qualmann 2018-01-15 22:06:20 UTC
Created attachment 109894 [details]

Small updated dbconfig.xml.
Comment 5 Maik Qualmann 2018-01-19 06:58:45 UTC
Created attachment 109981 [details]

Updated dbconfig.xml.
Comment 6 Thomas 2018-01-19 07:04:11 UTC
thx that worked
Comment 7 Maik Qualmann 2018-01-19 19:03:56 UTC
Created attachment 109997 [details]

Updated dbconfig.xml.
Comment 8 Rex Dieter 2018-01-31 14:14:55 UTC
*** Bug 389677 has been marked as a duplicate of this bug. ***
Comment 9 Maik Qualmann 2018-03-03 16:38:06 UTC
*** Bug 391340 has been marked as a duplicate of this bug. ***
Comment 10 Maik Qualmann 2018-03-22 16:43:47 UTC
*** Bug 392179 has been marked as a duplicate of this bug. ***
Comment 11 Pierre Choffet 2018-03-22 21:02:44 UTC
*** Bug 392189 has been marked as a duplicate of this bug. ***