diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPTableStructureDelegate.m | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m index bb7d99be..27a7cfe9 100644 --- a/Source/SPTableStructureDelegate.m +++ b/Source/SPTableStructureDelegate.m @@ -141,12 +141,10 @@ [tableSourceView reloadData]; } } - // Reset collation if BINARY was set to 1 since BINARY sets collation to *_bin + // Reset collation if BINARY was set changed, as enabling BINARY sets collation to *_bin else if([[aTableColumn identifier] isEqualToString:@"binary"]) { if([[currentRow objectForKey:@"binary"] integerValue] != [anObject integerValue]) { - if([anObject integerValue] == 1) { - [currentRow setObject:[NSNumber numberWithInteger:0] forKey:@"collation"]; - } + [currentRow setObject:[NSNumber numberWithInteger:0] forKey:@"collation"]; [tableSourceView reloadData]; } @@ -326,7 +324,7 @@ fieldEncoding = [tableDataInstance tableEncoding]; } - if ([fieldEncoding length] && [[originalRow objectForKey:@"collation"] integerValue] > 0) { + if ([fieldEncoding length] && [[originalRow objectForKey:@"collation"] integerValue] > 0 && ![[originalRow objectForKey:@"binary"] integerValue]) { NSArray *theCollations = [databaseDataInstance getDatabaseCollationsForEncoding:fieldEncoding]; NSString *col = [[theCollations objectAtIndex:[[originalRow objectForKey:@"collation"] integerValue] - 1] objectForKey:@"COLLATION_NAME"]; |