aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorjakob <jakob@eggerapps.at>2010-04-16 17:18:54 +0000
committerjakob <jakob@eggerapps.at>2010-04-16 17:18:54 +0000
commitf5f15a660b5663865347e2b2b162fba7ad86566f (patch)
tree5c8f1093381e02563f4b816c96a6848bf9efac3d /Source
parent4c7dbcd724e9ac6fbd5943f147b15472833dceeb (diff)
downloadsequelpro-f5f15a660b5663865347e2b2b162fba7ad86566f.tar.gz
sequelpro-f5f15a660b5663865347e2b2b162fba7ad86566f.tar.bz2
sequelpro-f5f15a660b5663865347e2b2b162fba7ad86566f.zip
- changed the query locking mechanism for MCPConnection to be more thread safe. From now on, always use [self lockConnection] rather than [queryLock lock], independent of what thread you are running on
- A warning is written to the console when the connection is unlocked multiple times (to identify potential race conditions) - modified MCPStreamingResult to ensure it only closes the connection once - added a check to prevent arrow key navigation past the last row
Diffstat (limited to 'Source')
-rw-r--r--Source/TableContent.m10
1 files changed, 3 insertions, 7 deletions
diff --git a/Source/TableContent.m b/Source/TableContent.m
index e95a719f..07a69ad8 100644
--- a/Source/TableContent.m
+++ b/Source/TableContent.m
@@ -546,13 +546,9 @@
*/
- (void) loadTableValues
{
-
// If no table is selected, return
if (!selectedTable) return;
- // Wrap the values load in an autorelease pool to ensure full and timely release
- NSAutoreleasePool *loadPool = [[NSAutoreleasePool alloc] init];
-
NSMutableString *queryString;
NSString *queryStringBeforeLimit = nil;
NSString *filterString;
@@ -673,8 +669,6 @@
// Trigger a full reload if required
if (fullTableReloadRequired) [self reloadTable:self];
-
- [loadPool drain];
}
/*
@@ -3191,10 +3185,12 @@
// Trap down arrow key
else if ( [textView methodForSelector:command] == [textView methodForSelector:@selector(moveDown:)] )
{
- if (row==tableRowsCount) return TRUE; //already at the end of the list
+ if (row==tableRowsCount) return TRUE; //check if we're already at the end of the list
[[control window] makeFirstResponder:control];
[self addRowToDB];
+
+ if (row==tableRowsCount) return TRUE; //check again. addRowToDB could reload the table and change the number of rows
[tableContentView selectRow:row+1 byExtendingSelection:NO];
[tableContentView editColumn:column row:row+1 withEvent:nil select:YES];
return TRUE;