aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPTextView.m
diff options
context:
space:
mode:
authordmoagx <post@wickenrode.com>2010-12-18 16:44:46 +0000
committerdmoagx <post@wickenrode.com>2010-12-18 16:44:46 +0000
commit8ad3b1a34828fd624ceaa4a238fdf84fdf8536cb (patch)
tree45f113f024cca2bf2536639128c9c536657eb8e4 /Source/SPTextView.m
parent072a730f22e3c06fed48acf31ac5708259c93a32 (diff)
downloadsequelpro-8ad3b1a34828fd624ceaa4a238fdf84fdf8536cb.tar.gz
sequelpro-8ad3b1a34828fd624ceaa4a238fdf84fdf8536cb.tar.bz2
sequelpro-8ad3b1a34828fd624ceaa4a238fdf84fdf8536cb.zip
* Recognize "performance_schema" as system DB (added in 5.5)
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) {