If we get Error (for some reason) while installing a plugin we can get inconsistency as DB is updated with plugin config data but plugin not installed. When we try to install plugin once more (with solved problem) we get these DB data doubled (rows with same data are duplicated).
So we need one of these solutions:
In addition: same is true for plugin data itself in cot_plugins table.
Maybe it is time to start using SQL Transactions? So we roll the transaction back if something goes wrong on plugin installation or during system update.
I'm not familiar with transactions. Does it solution for «fatal error» case?
What we need to start using it?
I've checked it and transactions don't work for ALTER queries, so it's not an option. We need some smarter strategy for error handling.