diff options
author | dmoagx <post@wickenrode.com> | 2010-12-18 16:44:46 +0000 |
---|---|---|
committer | dmoagx <post@wickenrode.com> | 2010-12-18 16:44:46 +0000 |
commit | 8ad3b1a34828fd624ceaa4a238fdf84fdf8536cb (patch) | |
tree | 45f113f024cca2bf2536639128c9c536657eb8e4 /Source/SPTextView.m | |
parent | 072a730f22e3c06fed48acf31ac5708259c93a32 (diff) | |
download | sequelpro-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.m | 8 |
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) { |