diff --git a/ChangeLog b/ChangeLog index e8b5e7b..0ea3bdb 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-07 Richard Frith-Macdonald + + * SQLClient.m: Fix error causing loss of some debug output when an + exception occurs in a transaction. + 2007-04-01 Richard Frith-Macdonald * SQLClient.h: diff --git a/SQLClient.m b/SQLClient.m index 3a774e1..e2f2d2a 100644 --- a/SQLClient.m +++ b/SQLClient.m @@ -1076,12 +1076,14 @@ static unsigned int maxConnections = 8; { [self simpleExecute: commitStatement]; _inTransaction = NO; + [_statements removeAllObjects]; [lock unlock]; // Locked at start of -commit [lock unlock]; // Locked by -begin } NS_HANDLER { _inTransaction = NO; + [_statements removeAllObjects]; [lock unlock]; // Locked at start of -commit [lock unlock]; // Locked by -begin [localException raise]; @@ -1557,6 +1559,7 @@ static unsigned int maxConnections = 8; if (_inTransaction == YES) { _inTransaction = NO; + [_statements removeAllObjects]; NS_DURING { [self simpleExecute: rollbackStatement]; @@ -1716,14 +1719,14 @@ static unsigned int maxConnections = 8; } } } - if (_inTransaction == NO || isCommit || isRollback) + if (_inTransaction == NO) { [_statements removeAllObjects]; } } NS_HANDLER { - if (_inTransaction == NO || isCommit || isRollback) + if (_inTransaction == NO) { [_statements removeAllObjects]; }