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/SPExtendedTableInfo.m | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'Source/SPExtendedTableInfo.m') diff --git a/Source/SPExtendedTableInfo.m b/Source/SPExtendedTableInfo.m index 1f67b95d..a765f6df 100644 --- a/Source/SPExtendedTableInfo.m +++ b/Source/SPExtendedTableInfo.m @@ -513,23 +513,24 @@ // If we are viewing tables in the information_schema database, then disable all controls that cause table // changes as these tables are not modifiable by anyone. - BOOL isInformationSchemaDb = [[tableDocumentInstance database] isEqualToString:@"information_schema"]; + //also affects mysql and performance_schema + BOOL isSystemSchemaDb = ([[tableDocumentInstance database] isEqualToString:@"information_schema"] || [[tableDocumentInstance database] isEqualToString:@"performance_schema"] || [[tableDocumentInstance database] isEqualToString:@"mysql"]); if ([[databaseDataInstance getDatabaseStorageEngines] count] && [statusFields objectForKey:@"Engine"]) { - [tableTypePopUpButton setEnabled:(!isInformationSchemaDb)]; + [tableTypePopUpButton setEnabled:(!isSystemSchemaDb)]; } if ([[databaseDataInstance getDatabaseCharacterSetEncodings] count] && [tableDataInstance tableEncoding]) { - [tableEncodingPopUpButton setEnabled:(!isInformationSchemaDb)]; + [tableEncodingPopUpButton setEnabled:(!isSystemSchemaDb)]; } if ([[databaseDataInstance getDatabaseCollationsForEncoding:[tableDataInstance tableEncoding]] count] && [statusFields objectForKey:@"Collation"]) { - [tableCollationPopUpButton setEnabled:(!isInformationSchemaDb)]; + [tableCollationPopUpButton setEnabled:(!isSystemSchemaDb)]; } - [tableCommentsTextView setEditable:(!isInformationSchemaDb)]; + [tableCommentsTextView setEditable:(!isSystemSchemaDb)]; } #pragma mark - -- cgit v1.2.3