Bug 391340

Summary: Mysql Migration fails (makeUpdates 8 to 9)
Product: [Applications] digikam Reporter: danielblues
Component: Database-MigrationAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version: 5.8.0   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed In: 6.2.0

Description danielblues 2018-03-03 16:33:34 UTC
Mysql migration from schema 8 to 9 fails.
I'm running Ubuntu 16.04 and mysql 5.7.21-0.

digikam.dbengine: Loading SQL code from config file "/tmp/.mount_digikazndF4k/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" "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:  4142694400
digikam.general: Allowing a cache size of 197 MB
QThreadStorage: Thread 0x7f051cbfec80 exited after QThreadStorage 11 destroyed

Acording to this

https://stackoverflow.com/questions/5456520/mysql-alter-ignore-table-add-unique-what-will-be-truncated#5456599

"ALTER IGNORE TABLE" is no longer supported.
Comment 1 Maik Qualmann 2018-03-03 16:38:06 UTC
Please read the bugreport and replace the dbconfig.xml.

Maik

*** This bug has been marked as a duplicate of bug 388977 ***
Comment 2 danielblues 2018-03-04 01:44:46 UTC
Ok, I will do that, thank you.
Comment 3 caulier.gilles 2019-07-14 12:52:28 UTC
Fixed with #388977 and not reproducible with 6.2.0