diff --git a/ChangeLog b/ChangeLog index 06e1aca..21fc4c3 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2007-07-21 Richard Frith-Macdonald + + * SQLClient.m: Fix retasin bug copying transactions. + * JDBC.m: Update for new batch code + 2007-07-09 Richard Frith-Macdonald * SQLClient.m: Post notifications upon connect and disconnect. diff --git a/JDBC.m b/JDBC.m index 6f56611..0d05284 100644 --- a/JDBC.m +++ b/JDBC.m @@ -1515,6 +1515,20 @@ static int JDBCVARCHAR = 0; return AUTORELEASE(records); } +- (SQLTransaction*) batch: (BOOL)stopOnFailure +{ + TDefs transaction; + + transaction = (TDefs)NSAllocateObject([_JDBCTransaction class], 0, + NSDefaultMallocZone()); + + transaction->_db = RETAIN(self); + transaction->_info = [NSMutableArray new]; + transaction->_batch = YES; + transaction->_stop = stopOnFailure; + return AUTORELEASE((SQLTransaction*)transaction); +} + - (void) begin { [lock lock]; diff --git a/SQLClient.m b/SQLClient.m index b313d5d..11646d4 100644 --- a/SQLClient.m +++ b/SQLClient.m @@ -2601,6 +2601,7 @@ static unsigned int maxConnections = 8; SQLTransaction *c; c = (SQLTransaction*)NSCopyObject(self, 0, z); + c->_db = RETAIN(c->_db); c->_info = [c->_info mutableCopy]; return c; }