aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextView.m
diff options
context:
space:
mode:
Diffstat (limited to 'Source/SPTextView.m')
-rw-r--r--Source/SPTextView.m8
1 files changed, 7 insertions, 1 deletions
diff --git a/Source/SPTextView.m b/Source/SPTextView.m
index ab37f464..af4356a2 100644
--- a/Source/SPTextView.m
+++ b/Source/SPTextView.m
@@ -351,8 +351,10 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
// Put information_schema and/or mysql db at the end if not selected
+ // 5.5.3+ also has performance_schema
NSString* mysql_id = [NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, @"mysql"];
- NSString* inf_id = [NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, @"information_schema"];
+ NSString* inf_id = [NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, @"information_schema"];
+ NSString* perf_id = [NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, @"performance_schema"];
if(currentDb && ![currentDb isEqualToString:mysql_id] && [sortedDbs containsObject:mysql_id]) {
[sortedDbs removeObject:mysql_id];
[sortedDbs addObject:mysql_id];
@@ -361,6 +363,10 @@ NSInteger alphabeticSort(id string1, id string2, void *reverse)
[sortedDbs removeObject:inf_id];
[sortedDbs addObject:inf_id];
}
+ if(currentDb && ![currentDb isEqualToString:perf_id] && [sortedDbs containsObject:perf_id]) {
+ [sortedDbs removeObject:perf_id];
+ [sortedDbs addObject:perf_id];
+ }
BOOL aTableNameExists = NO;
if(!aDbName) {