SUMMARY SQlite - Mysql internal tag migrating error STEPS TO REPRODUCE 1. An error message always appears in the same place 2.4932] digikam.coredb: Core database: query isOnValidRow [ true ] isActive [ true ] result size: [ -1 ] [14932] digikam.coredb: Core database: column: [ "id" ] value [ QVariant(qlonglong, 1772) ] [14932] digikam.coredb: Core database: column: [ "pid" ] value [ QVariant(qlonglong, 1733) ] [14932] digikam.coredb: Core database: column: [ "name" ] value [ QVariant(QString, "Aare Miller") ] [14932] digikam.coredb: Core database: column: [ "icon" ] value [ QVariant(qlonglong, 182090) ] [14932] digikam.coredb: Core database: column: [ "iconkde" ] value [ QVariant(QString, "") ] [14932] digikam.coredb: Core database: query isOnValidRow [ true ] isActive [ true ] result size: [ -1 ] [14932] digikam.coredb: Core database: column: [ "id" ] value [ QVariant(qlonglong, 1773) ] [14932] digikam.coredb: Core database: column: [ "pid" ] value [ QVariant(qlonglong, 1733) ] [14932] digikam.coredb: Core database: column: [ "name" ] value [ QVariant(QString, "Kaja Kartau (Lainde)") ] [14932] digikam.coredb: Core database: column: [ "icon" ] value [ QVariant(qlonglong, 308120) ] [14932] digikam.coredb: Core database: column: [ "iconkde" ] value [ QVariant(QString, "") ] [14932] digikam.dbengine: Failure executing query: [14932] "\n REPLACE INTO Tags (id, pid, name, icon, iconkde) VALUES (?, ?, ?, ?, ?);\n " [14932] Error messages: "QMYSQL3: Unable to execute statement" "Cannot add or update a child row: a foreign key constraint fails (`digikam`.`tags`, CONSTRAINT `Tags_Images` FOREIGN KEY (`icon`) REFERENCES `images` (`id`) ON DELETE SET NULL ON UPDATE CASCADE)" "1452" 2 [14932] Bound values: (QVariant(qlonglong, 1773), QVariant(qlonglong, 1733), QVariant(QString, "Kaja Kartau (Lainde)"), QVariant(qlonglong, 308120), QVariant(QString, "")) [14932] digikam.dbengine: Error while executing DBAction [ "Migrate_Write_Tags" ] Statement [ "\n REPLACE INTO Tags (id, pid, name, icon, iconkde) VALUES (:id, :pid, :name, :icon, :iconkde);\n " ] [14932] digikam.coredb: Core database: error while converting table data. Details: QSqlError("1452", "QMYSQL3: Unable to execute statement", "Cannot add or update a child row: a foreign key constraint fails (`digikam`.`tags`, CONSTRAINT `Tags_Images` FOREIGN KEY (`icon`) REFERENCES `images` (`id`) ON DELETE SET NULL ON UPDATE CASCADE)") [14932] digikam.databaseserver: Running 930 seconds... 3. What could be the reason for the failure? OBSERVED RESULT EXPECTED RESULT SOFTWARE/OS VERSIONS Windows: macOS: Linux/KDE Plasma: (available in About System) KDE Plasma Version: KDE Frameworks Version: Qt Version: ADDITIONAL INFORMATION
You have set a tag symbol from a image, but the image no longer exists. Maik
I deleted all the persons tag symbols and then the error did not recur. I couldn't see which tag symbol image no longer exists. Hannes
The problem was triggered by a symbol in the tag "Kaja Kartau (Lainde)". Normally, when deleting images, the entry is set to "NULL" in the Tags table. For some reason (crash?) It was not reset at some point. Maik
Previously, I only used jpg image files. But at some point, I decided to replace the scanned images with the tif format. And the tag symbols image has also been selected from the deleted jpg images and there have really been a lot of crashes during the operation, I thought it more appropriate to reset the tag symbols images. But in any case, many thanks for the quick response. Hannes
Git commit 5020f0ea87dac93c5d39c6369efc5be5e30f4bd3 by Maik Qualmann. Committed on 17/08/2021 at 16:27. Pushed by mqualmann into branch 'master'. copy the tags icon with an extra job like the albums icon FIXED-IN: 7.4.0 M +1 -1 NEWS M +22 -6 core/data/database/dbconfig.xml.cmake.in M +2 -0 core/libs/database/coredb/coredbcopymanager.cpp M +1 -1 core/libs/database/utils/widgets/dbmigrationdlg.cpp https://invent.kde.org/graphics/digikam/commit/5020f0ea87dac93c5d39c6369efc5be5e30f4bd3