diff options
author | rowanbeentje <rowan@beent.je> | 2011-01-11 22:25:03 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2011-01-11 22:25:03 +0000 |
commit | 895278394c8b4954e5dde9a3fcf0470c956c3867 (patch) | |
tree | a79d15fd8c1127dada58d2c0ab5a30eeb332ff87 /Source/SPIndexesController.m | |
parent | d0ac737bcfc19fc4921d5701fd18be315807c6d1 (diff) | |
download | sequelpro-895278394c8b4954e5dde9a3fcf0470c956c3867.tar.gz sequelpro-895278394c8b4954e5dde9a3fcf0470c956c3867.tar.bz2 sequelpro-895278394c8b4954e5dde9a3fcf0470c956c3867.zip |
- Fix errors creating indexes, addressing Issue #946
- Move index type query part before the column list to fix advanced use errors
- Correct spelling of -_removeIndexUsingDetails:
Diffstat (limited to 'Source/SPIndexesController.m')
-rw-r--r-- | Source/SPIndexesController.m | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Source/SPIndexesController.m b/Source/SPIndexesController.m index ad057926..49ac8594 100644 --- a/Source/SPIndexesController.m +++ b/Source/SPIndexesController.m @@ -39,7 +39,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize"; - (void)_reloadIndexedColumnsTableData; - (void)_addIndexUsingDetails:(NSDictionary *)indexDetails; -- (void)_removeIndexUsingDeatails:(NSDictionary *)indexDetails; +- (void)_removeIndexUsingDetails:(NSDictionary *)indexDetails; - (void)_resizeWindowForAdvancedOptionsViewByHeightDelta:(NSInteger)delta; @@ -568,7 +568,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize"; [indexDetails setObject:[NSNumber numberWithInteger:[indexKeyBlockSizeTextField integerValue]] forKey:SPNewIndexKeyBlockSize]; } - if (([[indexTypePopUpButton selectedItem] tag] != SPPrimaryKeyMenuTag) && ([[indexTypePopUpButton selectedItem] tag] != SPSpatialMenuTag)) { + if (([indexStorageTypePopUpButton indexOfSelectedItem] > 0) && ([[indexTypePopUpButton selectedItem] tag] != SPSpatialMenuTag)) { [indexDetails setObject:[indexStorageTypePopUpButton titleOfSelectedItem] forKey:SPNewIndexStorageType]; } @@ -601,12 +601,12 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize"; [indexDetails setObject:[NSNumber numberWithBool:[contextInfo hasSuffix:@"AndForeignKey"]] forKey:@"RemoveForeignKey"]; if ([NSThread isMainThread]) { - [NSThread detachNewThreadSelector:@selector(_removeIndexUsingDeatails:) toTarget:self withObject:indexDetails]; + [NSThread detachNewThreadSelector:@selector(_removeIndexUsingDetails:) toTarget:self withObject:indexDetails]; [dbDocument enableTaskCancellationWithTitle:NSLocalizedString(@"Cancel", @"cancel button") callbackObject:self callbackFunction:NULL]; } else { - [self _removeIndexUsingDeatails:indexDetails]; + [self _removeIndexUsingDetails:indexDetails]; } } } @@ -758,14 +758,14 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize"; [query appendString:indexName]; } - // Add the columns - [query appendFormat:@" (%@)", [tempIndexedColumns componentsJoinedByCommas]]; - // If supplied specify the index's storage type if (indexStorageType) { [query appendString:@" USING "]; [query appendString:indexStorageType]; } + + // Add the columns + [query appendFormat:@" (%@)", [tempIndexedColumns componentsJoinedByCommas]]; // If supplied specify the index's key block size if (indexKeyBlockSize) { @@ -805,7 +805,7 @@ static const NSString *SPNewIndexKeyBlockSize = @"IndexKeyBlockSize"; * * @param indexDetails A dictionary containing the details of the index to be removed */ -- (void)_removeIndexUsingDeatails:(NSDictionary *)indexDetails +- (void)_removeIndexUsingDetails:(NSDictionary *)indexDetails { NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; |