aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2009-08-25 00:49:11 +0000
committerrowanbeentje <rowan@beent.je>2009-08-25 00:49:11 +0000
commit94f177aa0e8350a9bba0790ee41b606c461a314f (patch)
treeff2f0bfe1d03a1b7bdb2b54c8015c69f7ee65ad0 /Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
parent4f94e0a0a120fba845b040a6247a3af93f753c20 (diff)
downloadsequelpro-94f177aa0e8350a9bba0790ee41b606c461a314f.tar.gz
sequelpro-94f177aa0e8350a9bba0790ee41b606c461a314f.tar.bz2
sequelpro-94f177aa0e8350a9bba0790ee41b606c461a314f.zip
- Fix NSLock console lines
- Speed up table content processing a bit - Make the table content download/processing determinate where an approximate row count is available - Clean up table content source, assuming MCPStreamingResult will remain in use
Diffstat (limited to 'Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m7
1 files changed, 5 insertions, 2 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
index e51785f8..3f3e2073 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPStreamingResult.m
@@ -74,6 +74,7 @@
mTimeZone = [theTimeZone retain];
parentConnection = theConnection;
fullyStreaming = useFullStreaming;
+ connectionUnlocked = NO;
if (mResult) {
mysql_free_result(mResult);
@@ -122,9 +123,9 @@
/**
* Deallocate the result and unlock the parent connection for further use
*/
- - (void) dealloc
+- (void) dealloc
{
- [parentConnection unlockConnection];
+ if (!connectionUnlocked) [parentConnection unlockConnection];
[super dealloc];
}
@@ -169,6 +170,8 @@
// once all memory has been freed
if (processedRowCount == downloadedRowCount) {
while (!dataFreed) usleep(1000);
+ [parentConnection unlockConnection];
+ connectionUnlocked = YES;
return nil;
}