aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableContent.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2010-01-24 21:02:18 +0000
committerrowanbeentje <rowan@beent.je>2010-01-24 21:02:18 +0000
commit9997d982ca4fcbacb04b41c7f7e2aa7dd44db312 (patch)
tree8672ff610b9b932d4f5c59a8223e2033ac95e3b5 /Source/TableContent.m
parent127df973e23e7843320e470aad166ea587ab92eb (diff)
downloadsequelpro-9997d982ca4fcbacb04b41c7f7e2aa7dd44db312.tar.gz
sequelpro-9997d982ca4fcbacb04b41c7f7e2aa7dd44db312.tar.bz2
sequelpro-9997d982ca4fcbacb04b41c7f7e2aa7dd44db312.zip
Improve Disconnection on connection loss:
- Set error strings on MCPConnection on user disconnect to allow existing error chcking to catch the state - Improve close behaviour from threads - Improve window close behaviour and appearance - Add new checks for disconnection in one or two crash-prone locations This addresses Issue #531, one of Issue #532, one of Issue #539, and probable reported crashes on Issue #541.
Diffstat (limited to 'Source/TableContent.m')
-rw-r--r--Source/TableContent.m12
1 files changed, 8 insertions, 4 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index 4c8d9775..f5e1feb4 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -607,8 +607,10 @@
[tableContentView performSelectorOnMainThread:@selector(noteNumberOfRowsChanged) withObject:nil waitUntilDone:YES];
[self setUsedQuery:queryString];
streamingResult = [mySQLConnection streamingQueryString:queryString];
- [self processResultIntoDataStorage:streamingResult approximateRowCount:rowsToLoad];
- [streamingResult release];
+ if (streamingResult) {
+ [self processResultIntoDataStorage:streamingResult approximateRowCount:rowsToLoad];
+ [streamingResult release];
+ }
// If the result is empty, and a late page is selected, reset the page
if ([prefs boolForKey:SPLimitResults] && queryStringBeforeLimit && !tableRowsCount && ![mySQLConnection queryCancelled]) {
@@ -616,8 +618,10 @@
queryString = [NSMutableString stringWithFormat:@"%@ LIMIT 0,%ld", queryStringBeforeLimit, (long)[prefs integerForKey:SPLimitResultsValue]];
[self setUsedQuery:queryString];
streamingResult = [mySQLConnection streamingQueryString:queryString];
- [self processResultIntoDataStorage:streamingResult approximateRowCount:[prefs integerForKey:SPLimitResultsValue]];
- [streamingResult release];
+ if (streamingResult) {
+ [self processResultIntoDataStorage:streamingResult approximateRowCount:[prefs integerForKey:SPLimitResultsValue]];
+ [streamingResult release];
+ }
}
if ([mySQLConnection queryCancelled] || ![[mySQLConnection getLastErrorMessage] isEqualToString:@""])