Bug 471961

Summary: Two database dump was made on the same day, but one of them is not read by digiKam
Product: [Applications] digikam Reporter: Peter <benedekppeter>
Component: Database-EngineAssignee: Digikam Developers <digikam-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: caulier.gilles, metzpinguin
Priority: NOR    
Version First Reported In: 8.1.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed/Implemented In: 8.2.0
Sentry Crash Report:

Description Peter 2023-07-04 22:28:01 UTC
digiKam version: (Weekly Snapshots) 8.1 on Windows 10 and LinuxMint 21 (appimage)
Database: mysql-server  5.7.42-0ubuntu0.18.04.1 (The database runs on an ubuntu server)
Dump: dump files were created automatically
warning before loading the database (20230704_09:00:01-digikam_FAULT.sql): Old character set: UTF8, new character set: UTF8MB4
Comment: 20230704_23:22:29-digikam_GOOD.sql -- I restored a previous database backup, then I created a new dump. This works well.

The uploaded two database dump and two screenshot:
https://mega.nz/folder/IMwn0aKa#kJW3tpwUM5FGfFkrNSL8tQ

Environment:
Language: HU
The database runs on an ubuntu server, and windows 10 clients connect to it in a network.
In LinuxMint am currently only checking the database backups, no changes are made!

I opened the 20230704_09:00:01-digikam_FAULT.sql database in Windows 10 and LinuxMint client, and I see that the data is not displayed (Fault_database_dump.jpg).
After opening the database, digiKam starts rebuilding the data, even though the data is already in the database (I checked in a text editor).
I restored a save from a few days ago and the data appeared (Good_database_dump.jpg)
Between the two dates, only a few labels and captions were made for the pictures.
I reloaded again the 20230704_09:00:01-digikam_FAULT.sql database, but it seems the albums/photos data is lost.

Can two nearby digiKam weekly snapshots cause this problem?
Comment 1 Maik Qualmann 2023-07-05 06:44:50 UTC
I only looked at the behavior of the "VIDEOBANK" collection, which now has a much higher album ID in the defective DB. This means that the existing one was deleted by a scanning process and was recreated.
You only use network collections. These are recognized as available if the path exists and there is at least one file/folder in it. If you start digiKam and the network collection is not mounted and there is a file in it, then all items in the database will be deleted. We already have bug reports that should ask the user about major changes first. We will not solve here why and whether your collections were not available, otherwise it is currently normal behavior.

Maik