You need to find tables in the catalog that will be quickly noticed by Lightroom as corrupted. Offhand I can't remember which ones..
Sean, thanks for that info, but it doesn't help me to create a corrupt catalog. I did delete some lines, but only got inappropriate messages as mentioned above.
If anyone has another hint?
I don’t think Adobe will give an answer to this question so you’ll probably just have to continue to hack on the database until the issues happen. I’d expect most database corruption occurs when the database file is disconnected from LR unexpectedly while the file is still open and LR is still updating things, so you could put a LR database on a flash drive and unplug it in the middle of LR doing something and see if that leads to a corruption problem.
Otherwise, what the previous poster was suggesting is that you modify the LR database to be logically inconsistent—delete rows from some of the tables without deleting them from others if that’s possible, where there may be relational constraints that prevent this. If you want to try this approach, LR uses a SQLite database that you can modify with a SQLite Manage program. Here is a FF plug-in that may be able to do this, if it allows more than reading the data. I just Googled (SQLite Manager) and haven’t tried it myself:
Indeed Steve that was the point. It's not a matter of randomly deleting stuff, it's finding specific tables in SQLite that makes a difference. It is a matter of trial and error.
Steve and Sean, thanks again for your suggestions!
Now i did try, as you suggested, to save a catalog to USB stick and remove the USB stick prematurely (ouch) (watching the changes in the explorer and on the status bar until LR seemed almost done). I didn't achieve the goal properly; i believe LR writes the catalog somewhere else and only in the last moment puts the whole thing to the USB stick. In ten tries, I only got a catalog version sized 1.024 kb, and it prompted LR to say:
Catalog cannot be opend, because it isn't valid
In the message, there was no mentioning of repairing being possible or not.
As damaging the catalog with the Editor didn't work, i could still try - as you suggested - an SQLlite program to distort the database. I might try that later and if, i will report back here.
But if you have any other suggestion on how to create a damaged LR catalog that can/cannot be repaired, i'd still be interested.
To be frank, you're probably wasting your time looking for a reliable way as it happens on extremely rare occasions and only because of rare events. Rather than perpetuating the idea that corruption is actually a common problem, maybe focus on other, much more likely reasons why the user may want to restore a backup?
I would have suggested the USB stick method while standing on one leg, or you could try opening and resaving the lrcat file in Excel or some other program. The SQLite Manager plugin for Firefox would allow you to do something stupid in the SQL - try deleting Adobe_images or just a field in that table. As Sean says, trial and error.
I also noted that corrupt catalogs don't feature high in forum discussions, except for recent instances, when the zipped backup could not be opened on Windows.
I have a corrupt catalog that I would dearly like to open, but have no clue as to how to fix it. Mac OS 10.10.4. LR CC.