openlp/openlp
Dave Warnock 913b0433f6 This update is a tidy up of the code that fixed bug #927473
Changes are made due to the following issues:

- the code assumed that exception OperationalError would only be thrown by  mySQL temporarily disappearing. However, other dbms can throw this exception and usually for errors that mean a retry will also fail.

- the code repeated the actual code of the method within the exception handler. This means code duplication and also that any new exceptions  are not handled by the same exception handler so for example their transaction will not get rolled back.

- not all potential dbms exceptions were caught and so in some cases the database transaction was not rolled back

The solution is to retry transactions where an OperationalError is thrown. Currently these are retried up to 3 times before the error is logged and the method returns false. By retrying the transaction we ensure that the same transaction code with the same exception handlers is used each time.

An additional catchall exception has been added where there is a transaction to ensure that it is rolled back. As with the OperationError this throws the exception back up the stack.
2012-06-10 22:45:02 +01:00
..
core This update is a tidy up of the code that fixed bug #927473 2012-06-10 22:45:02 +01:00
plugins Added ZionWorx importer. Added descriptionLabel to song import wizard. 2012-06-09 19:58:56 +01:00
.version removed dead code, refactor version comparison code 2012-04-28 15:51:05 +02:00
__init__.py New year merge 2011-12-27 10:33:55 +00:00