From 44a5f9e552b3d5e1f9ef1c6d11f34e893d67e85b Mon Sep 17 00:00:00 2001 From: stuconnolly Date: Thu, 7 Oct 2010 18:56:33 +0000 Subject: Various improvements to server capability/version checking, including: - Add a new ServerSupport class, for which an instance is created upon each new connection and is then subsequently accessible via SPDatabaseDocument. - Replace the majority of manual version checking with calls to properties in the above new class. - Improve the user manager's compatibility with MySQL 3 and 4 servers. Fixes issue #811 Other changes include: - Disable the encoding popup button when adding a new table or database to servers running pre MySQL 4.1 as it only contains one option, 'Default'. - Fix various potential memory leaks discovered during static analysis. - General tidy up and comments. --- Source/SPDatabaseDocument.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'Source/SPDatabaseDocument.h') diff --git a/Source/SPDatabaseDocument.h b/Source/SPDatabaseDocument.h index 07c3f7bb..c2cf0e85 100644 --- a/Source/SPDatabaseDocument.h +++ b/Source/SPDatabaseDocument.h @@ -29,7 +29,12 @@ #import #import -@class SPConnectionController, SPProcessListController, SPServerVariablesController, SPUserManager, SPWindowController; +@class SPConnectionController, + SPProcessListController, + SPServerVariablesController, + SPUserManager, + SPWindowController, + SPServerSupport; /** * The SPDatabaseDocument class controls the primary database view window. @@ -55,6 +60,7 @@ IBOutlet id statusTableCopyChecksum; SPUserManager *userManagerInstance; + SPServerSupport *serverSupport; IBOutlet NSSearchField *listFilterField; @@ -190,15 +196,17 @@ @property (readwrite, assign) SPWindowController *parentWindowController; @property (readwrite, assign) NSTabViewItem *parentTabViewItem; @property (readwrite, assign) BOOL isProcessing; +@property (readonly) SPServerSupport *serverSupport; - (BOOL)isUntitled; - (BOOL)couldCommitCurrentViewActions; - (void)initQueryEditorWithString:(NSString *)query; - (void)initWithConnectionFile:(NSString *)path; + // Connection callback and methods - (void)setConnection:(MCPConnection *)theConnection; -- (MCPConnection *) getConnection; +- (MCPConnection *)getConnection; - (void)setKeychainID:(NSString *)theID; // Database methods -- cgit v1.2.3