aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTableStructureDelegate.m
diff options
context:
space:
mode:
authorrowanbeentje <rowan@beent.je>2011-02-11 02:06:18 +0000
committerrowanbeentje <rowan@beent.je>2011-02-11 02:06:18 +0000
commite3ac547a6fb5b73581e61bb35ac2f3f7fca67a96 (patch)
tree8ed159102057d9a26a5dd13e303cf1ce37da7c3b /Source/SPTableStructureDelegate.m
parentf5a99e49839174bdfa2364fbba1c963da4a3481b (diff)
downloadsequelpro-e3ac547a6fb5b73581e61bb35ac2f3f7fca67a96.tar.gz
sequelpro-e3ac547a6fb5b73581e61bb35ac2f3f7fca67a96.tar.bz2
sequelpro-e3ac547a6fb5b73581e61bb35ac2f3f7fca67a96.zip
- Revert r3187, which only masked an underlying bug and caused double columns in views
- In SPTableStructureDelete, don't request the encoding if the table is reloading; this prevents multithreaded data fetches and race conditions causing Issue #974. - Alter SPTableData to use thread mutexes instead of a boolean to prevent threading issues, which also fixes Issue #974 in a different way. Alter race condition checks to block their threads instead of returning bogus information to prevent state issues. - Alter table loading to no longer load trigger information until required, speeding up use of other views and cleaning up the console log.
Diffstat (limited to 'Source/SPTableStructureDelegate.m')
-rw-r--r--Source/SPTableStructureDelegate.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Source/SPTableStructureDelegate.m b/Source/SPTableStructureDelegate.m
index 17ad817d..729091d6 100644
--- a/Source/SPTableStructureDelegate.m
+++ b/Source/SPTableStructureDelegate.m
@@ -49,7 +49,10 @@
NSInteger end = [enc length] - start - 1;
collations = [databaseDataInstance getDatabaseCollationsForEncoding:[enc substringWithRange:NSMakeRange(start, end)]];
} else {
- if([tableDataInstance tableEncoding] != nil) {
+
+ // If the structure has loaded (not still loading!) and the table encoding
+ // is set, use the appropriate collations.
+ if([tableDocumentInstance structureLoaded] && [tableDataInstance tableEncoding] != nil) {
collations = [databaseDataInstance getDatabaseCollationsForEncoding:[tableDataInstance tableEncoding]];
} else {
collations = [NSArray array];