Author: rfm
Date: Mon Jul 6 20:58:24 2015
New Revision: 38757
URL: http://svn.gna.org/viewcvs/gnustep?rev=38757&view=rev
Log:
transaction ownership fixups
Modified:
libs/sqlclient/trunk/SQLClient.h
libs/sqlclient/trunk/SQLClient.m
libs/sqlclient/trunk/SQLClientPool.m
Modified: libs/sqlclient/trunk/SQLClient.h
URL:
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/SQLClient.h?rev=38757&r1=38756&r2=38757&view=diff
==============================================================================
--- libs/sqlclient/trunk/SQLClient.h (original)
+++ libs/sqlclient/trunk/SQLClient.h Mon Jul 6 20:58:24 2015
@@ -1741,6 +1741,7 @@
- (NSMutableArray*) columns: (NSMutableArray*)records;
- (NSInteger) execute: (NSString*)stmt,...;
- (NSInteger) execute: (NSString*)stmt with: (NSDictionary*)values;
+- (SQLClientPool*) pool;
- (NSMutableArray*) prepare: (NSString*)stmt args: (va_list)args;
- (NSMutableArray*) prepare: (NSString*)stmt with: (NSDictionary*)values;
- (NSMutableArray*) query: (NSString*)stmt,...;
Modified: libs/sqlclient/trunk/SQLClient.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/SQLClient.m?rev=38757&r1=38756&r2=38757&view=diff
==============================================================================
--- libs/sqlclient/trunk/SQLClient.m (original)
+++ libs/sqlclient/trunk/SQLClient.m Mon Jul 6 20:58:24 2015
@@ -3373,7 +3373,11 @@
{
if (other != nil && other->_count > 0)
{
- if (NO == [_owner isEqual: other->_owner])
+ /* Owners must the the same client, or the same pool, or members
+ * of the same pool oar a client and the pool it belongs to.
+ */
+ if (NO == [_owner isEqual: other->_owner]
+ && NO == [[_owner pool] isEqual: [other->_owner pool]])
{
[NSException raise: NSInvalidArgumentException
format: @"[%@-%@] database owner missmatch",
Modified: libs/sqlclient/trunk/SQLClientPool.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/SQLClientPool.m?rev=38757&r1=38756&r2=38757&view=diff
==============================================================================
--- libs/sqlclient/trunk/SQLClientPool.m (original)
+++ libs/sqlclient/trunk/SQLClientPool.m Mon Jul 6 20:58:24 2015
@@ -974,6 +974,11 @@
return result;
}
+- (SQLClientPool*) pool
+{
+ return self;
+}
+
- (NSMutableArray*) prepare: (NSString*)stmt args: (va_list)args
{
return [c[0] prepare: stmt args: args];
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs