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/SPExtendedTableInfo.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/SPExtendedTableInfo.m')
-rw-r--r-- | Source/SPExtendedTableInfo.m | 11 |
1 files changed, 6 insertions, 5 deletions
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 - |