From 8ad3b1a34828fd624ceaa4a238fdf84fdf8536cb Mon Sep 17 00:00:00 2001 From: dmoagx Date: Sat, 18 Dec 2010 16:44:46 +0000 Subject: * Recognize "performance_schema" as system DB (added in 5.5) --- Source/SPTextView.m | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'Source/SPTextView.m') 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) { -- cgit v1.2.3