diff options
Diffstat (limited to 'Source')
-rw-r--r-- | Source/SPConnectionController.h | 2 | ||||
-rw-r--r-- | Source/SPConnectionController.m | 4 | ||||
-rw-r--r-- | Source/SPConnectionHandler.m | 3 | ||||
-rw-r--r-- | Source/SPConstants.h | 1 | ||||
-rw-r--r-- | Source/SPConstants.m | 1 |
5 files changed, 10 insertions, 1 deletions
diff --git a/Source/SPConnectionController.h b/Source/SPConnectionController.h index 72a9652d..99488600 100644 --- a/Source/SPConnectionController.h +++ b/Source/SPConnectionController.h @@ -79,6 +79,7 @@ NSString *socket; NSString *port; NSInteger colorIndex; + BOOL useCompression; // SSL details NSInteger useSSL; @@ -209,6 +210,7 @@ @property (readwrite, retain) NSString *connectionKeychainItemAccount; @property (readwrite, retain) NSString *connectionSSHKeychainItemName; @property (readwrite, retain) NSString *connectionSSHKeychainItemAccount; +@property (readwrite, assign) BOOL useCompression; #ifdef SP_CODA @property (readwrite, assign) SPDatabaseDocument *dbDocument; diff --git a/Source/SPConnectionController.m b/Source/SPConnectionController.m index 1f3521e9..3176fb2f 100644 --- a/Source/SPConnectionController.m +++ b/Source/SPConnectionController.m @@ -132,6 +132,7 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, @synthesize sshKeyLocationEnabled; @synthesize sshKeyLocation; @synthesize sshPort; +@synthesize useCompression; #ifdef SP_CODA @synthesize dbDocument; @@ -648,7 +649,8 @@ static NSComparisonResult _compareFavoritesUsingKey(id favorite1, id favorite2, [self setColorIndex:([fav objectForKey:SPFavoriteColorIndexKey]? [[fav objectForKey:SPFavoriteColorIndexKey] integerValue] : -1)]; [self setPort:([fav objectForKey:SPFavoritePortKey] ? [fav objectForKey:SPFavoritePortKey] : @"")]; [self setDatabase:([fav objectForKey:SPFavoriteDatabaseKey] ? [fav objectForKey:SPFavoriteDatabaseKey] : @"")]; - + [self setUseCompression:([fav objectForKey:SPFavoriteUseCompressionKey] ? [[fav objectForKey:SPFavoriteUseCompressionKey] boolValue] : YES)]; + // SSL details [self setUseSSL:([fav objectForKey:SPFavoriteUseSSLKey] ? [[fav objectForKey:SPFavoriteUseSSLKey] intValue] : NSOffState)]; [self setSslKeyFileLocationEnabled:([fav objectForKey:SPFavoriteSSLKeyFileLocationEnabledKey] ? [[fav objectForKey:SPFavoriteSSLKeyFileLocationEnabledKey] intValue] : NSOffState)]; diff --git a/Source/SPConnectionHandler.m b/Source/SPConnectionHandler.m index aeb4eb36..d27e9a1a 100644 --- a/Source/SPConnectionHandler.m +++ b/Source/SPConnectionHandler.m @@ -157,6 +157,9 @@ static NSString *SPLocalhostAddress = @"127.0.0.1"; } } + if(![self useCompression]) + [mySQLConnection removeClientFlags:SPMySQLClientFlagCompression]; + // Connection delegate must be set before actual connection attempt is made [mySQLConnection setDelegate:dbDocument]; diff --git a/Source/SPConstants.h b/Source/SPConstants.h index 5e34ef56..2c2555a8 100644 --- a/Source/SPConstants.h +++ b/Source/SPConstants.h @@ -489,6 +489,7 @@ extern NSString *SPFavoriteSSLCertificateFileLocationEnabledKey; extern NSString *SPFavoriteSSLCertificateFileLocationKey; extern NSString *SPFavoriteSSLCACertFileLocationEnabledKey; extern NSString *SPFavoriteSSLCACertFileLocationKey; +extern NSString *SPFavoriteUseCompressionKey; extern NSString *SPConnectionFavoritesChangedNotification; // Favorites import/export diff --git a/Source/SPConstants.m b/Source/SPConstants.m index d9729980..5f3348ed 100644 --- a/Source/SPConstants.m +++ b/Source/SPConstants.m @@ -299,6 +299,7 @@ NSString *SPFavoriteSSLCertificateFileLocationEnabledKey = @"sslCertificateFileL NSString *SPFavoriteSSLCertificateFileLocationKey = @"sslCertificateFileLocation"; NSString *SPFavoriteSSLCACertFileLocationEnabledKey = @"sslCACertFileLocationEnabled"; NSString *SPFavoriteSSLCACertFileLocationKey = @"sslCACertFileLocation"; +NSString *SPFavoriteUseCompressionKey = @"useCompression"; NSString *SPConnectionFavoritesChangedNotification = @"SPConnectionFavoritesChanged"; // Favorites import/export |