Bug 388977 - Error during upgrading core database schema from v8 to v9
Summary: Error during upgrading core database schema from v8 to v9
Status: RESOLVED FIXED
Alias: None
Product: digikam
Classification: Unclassified
Component: Database-Mysql (show other bugs)
Version: 5.8.0
Platform: Manjaro Linux
: NOR major (vote)
Target Milestone: ---
Assignee: Digikam Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-14 21:26 UTC by Thomas
Modified: 2018-03-22 21:02 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.9.0


Attachments
dbconfig.xml (135.20 KB, text/xml)
2018-01-15 05:40 UTC, Maik Qualmann
Details
dbconfig.xml (142.26 KB, application/xml)
2018-01-15 19:32 UTC, Maik Qualmann
Details
dbconfig.xml (142.25 KB, application/xml)
2018-01-15 22:06 UTC, Maik Qualmann
Details
dbconfig.xml (142.41 KB, patch)
2018-01-19 06:58 UTC, Maik Qualmann
Details
dbconfig.xml (144.09 KB, patch)
2018-01-19 19:03 UTC, Maik Qualmann
Details

Note You need to log in before you can comment on or make changes to this bug.
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]
dbconfig.xml

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.

Maik
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

https://commits.kde.org/digikam/5893fde69518d70904d2b96e13800c7432b4e4c4
Comment 3 Maik Qualmann 2018-01-15 19:32:42 UTC
Created attachment 109887 [details]
dbconfig.xml

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:

/usr/share/digikam/database/

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

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

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]
dbconfig.xml

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. ***