mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-15 16:11:42 +00:00
Fix retain/release error when copying transactions
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@25344 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
fb09bfd147
commit
2a7acda4e7
3 changed files with 20 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2007-07-21 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* SQLClient.m: Fix retasin bug copying transactions.
|
||||
* JDBC.m: Update for new batch code
|
||||
|
||||
2007-07-09 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* SQLClient.m: Post notifications upon connect and disconnect.
|
||||
|
|
14
JDBC.m
14
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];
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue