Author: rfm
Date: Wed Sep 24 17:03:05 2014
New Revision: 38091
URL: http://svn.gna.org/viewcvs/gnustep?rev=38091&view=rev
Log:
don't auto-disconnect on error
Modified:
libs/sqlclient/trunk/ChangeLog
libs/sqlclient/trunk/Postgres.m
Modified: libs/sqlclient/trunk/ChangeLog
URL:
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/ChangeLog?rev=38091&r1=38090&r2=38091&view=diff
==============================================================================
--- libs/sqlclient/trunk/ChangeLog (original)
+++ libs/sqlclient/trunk/ChangeLog Wed Sep 24 17:03:05 2014
@@ -1,3 +1,8 @@
+2014-09-24 Richard Frith-Macdonald <[email protected]>
+
+ * Postgres.m: An SQL exception/error should not automatically
+ disconnect.
+
2014-09-10 Richard Frith-Macdonald <[email protected]>
* SQLClient.m:
Modified: libs/sqlclient/trunk/Postgres.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/Postgres.m?rev=38091&r1=38090&r2=38091&view=diff
==============================================================================
--- libs/sqlclient/trunk/Postgres.m (original)
+++ libs/sqlclient/trunk/Postgres.m Wed Sep 24 17:03:05 2014
@@ -400,10 +400,6 @@
{
str = [NSString stringWithCString: cstr];
}
- if (YES == connected)
- {
- [self disconnect];
- }
[NSException raise: SQLException format: @"Error executing %@: %@",
stmt, str];
}
@@ -423,13 +419,13 @@
{
NSString *n = [localException name];
+ if (result != 0)
+ {
+ PQclear(result);
+ }
if (YES == connected && [n isEqual: SQLConnectionException] == YES)
{
[self disconnect];
- }
- if (result != 0)
- {
- PQclear(result);
}
[localException retain];
[arp release];
@@ -535,10 +531,6 @@
if (nil == str)
{
str = [NSString stringWithCString: cstr];
- }
- if (YES == connected)
- {
- [self disconnect];
}
[NSException raise: SQLException format: @"Error executing %@: %@",
stmt, str];
@@ -656,13 +648,13 @@
{
NSString *n = [localException name];
+ if (result != 0)
+ {
+ PQclear(result);
+ }
if (YES == connected && [n isEqual: SQLConnectionException] == YES)
{
[self disconnect];
- }
- if (result != 0)
- {
- PQclear(result);
}
[records release];
records = nil;
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs