[digikam] [Bug 366445] MySQL Schema upgrade from V7 to V8 fails [patch]
Ian Dall via KDE Bugzilla
bugzilla_noreply at kde.org
Thu Aug 11 01:07:39 BST 2016
https://bugs.kde.org/show_bug.cgi?id=366445
--- Comment #11 from Ian Dall <ian at beware.dropbear.id.au> ---
I think I can add some insight into why this worked for some and not others. I
noticed in the MySQL documentation that ROLLBACK does not roll back ALTER
commands!
V7 did not have any foreign key constraints. In my case, the upgrade failed,
probably due to constraint violations (eg ImageInformation rows referring to
Image rows which had been deleted), but the ALTER commands to create the
foreign constraint constraints up to that point worked, and were not rolled
back. The next time I tried to upgrade, the foreign key constraint already
existed, so DROP KEY didn't work and the the script failed early.
Someone else, without cruft in their V7 database, would have succeeded first
time.
I am unsure whether my patches work with a clean V7 database. I guess dropping
a constraint that doesn't exist may fail. I would test this, (I did back up my
V7 database before doing all this) but I would have to clean the cruft again,
which is a non-trivial process because I did it by hand.
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Digikam-devel
mailing list