diff options
author | stuconnolly <stuart02@gmail.com> | 2012-01-22 12:19:21 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2012-01-22 12:19:21 +0000 |
commit | 1d7ed99d602bf9c7aa4ea40a9a2ab6458864e51f (patch) | |
tree | 6c08ad29618ea02caf302180706d010c90cd57e0 /Source/SPServerSupport.m | |
parent | e23ba5155a53c43a106ac9646f51321ccc7d86f4 (diff) | |
download | sequelpro-1d7ed99d602bf9c7aa4ea40a9a2ab6458864e51f.tar.gz sequelpro-1d7ed99d602bf9c7aa4ea40a9a2ab6458864e51f.tar.bz2 sequelpro-1d7ed99d602bf9c7aa4ea40a9a2ab6458864e51f.zip |
Bring outlinew view branch up to date with trunk (r3375:3468).
Diffstat (limited to 'Source/SPServerSupport.m')
-rw-r--r-- | Source/SPServerSupport.m | 57 |
1 files changed, 31 insertions, 26 deletions
diff --git a/Source/SPServerSupport.m b/Source/SPServerSupport.m index 15c3555f..3d38ff79 100644 --- a/Source/SPServerSupport.m +++ b/Source/SPServerSupport.m @@ -62,6 +62,7 @@ @synthesize supportsCSVStorageEngine; @synthesize supportsTriggers; @synthesize supportsIndexKeyBlockSize; +@synthesize supportsQuotingEngineTypeInCreateSyntax; @synthesize serverMajorVersion; @synthesize serverMinorVersion; @synthesize serverReleaseVersion; @@ -81,7 +82,7 @@ */ - (id)initWithMajorVersion:(NSInteger)majorVersion minor:(NSInteger)minorVersion release:(NSInteger)releaseVersion { - if ((self == [super init])) { + if ((self = [super init])) { serverMajorVersion = majorVersion; serverMinorVersion = minorVersion; @@ -153,7 +154,7 @@ supportsShowPrivileges = [self isEqualToOrGreaterThanMajorVersion:4 minor:1 release:0]; // MySQL 4.0.18+ and 4.1.2+ changed the TYPE option to ENGINE, but 4.x supports both - engineTypeQueryName = [self isEqualToOrGreaterThanMajorVersion:5 minor:0 release:0]?@"ENGINE":@"TYPE"; + engineTypeQueryName = [self isEqualToOrGreaterThanMajorVersion:5 minor:0 release:0] ? @"ENGINE" : @"TYPE"; // Before MySQL 4.1 the MEMORY engine was known as HEAP and the ISAM engine was available supportsPre41StorageEngines = (![self isEqualToOrGreaterThanMajorVersion:4 minor:1 release:0]); @@ -171,7 +172,10 @@ supportsTriggers = [self isEqualToOrGreaterThanMajorVersion:5 minor:0 release:2]; // Support for specifying an index's key block size wasn't added until MySQL 5.1.10 - supportsIndexKeyBlockSize = [self isEqualToOrGreaterThanMajorVersion:5 minor:1 release:10]; + supportsIndexKeyBlockSize = [self isEqualToOrGreaterThanMajorVersion:5 minor:1 release:10]; + + // MySQL 4.0 doesn't seem to like having the ENGINE/TYPE quoted in a table's create syntax + supportsQuotingEngineTypeInCreateSyntax = [self isEqualToOrGreaterThanMajorVersion:4 minor:1 release:0]; } /** @@ -234,29 +238,30 @@ */ - (void)_invalidate { - isMySQL3 = NO; - isMySQL4 = NO; - isMySQL5 = NO; - isMySQL6 = NO; - - supportsInformationSchema = NO; - supportsSpatialExtensions = NO; - supportsShowCharacterSet = NO; - supportsCharacterSetDatabaseVar = NO; - supportsPost41CharacterSetHandling = NO; - supportsCreateUser = NO; - supportsDropUser = NO; - supportsFullDropUser = NO; - supportsUserMaxVars = NO; - supportsShowPrivileges = NO; - engineTypeQueryName = @"ENGINE"; - supportsInformationSchemaEngines = NO; - supportsPre41StorageEngines = NO; - supportsBlackholeStorageEngine = NO; - supportsArchiveStorageEngine = NO; - supportsCSVStorageEngine = NO; - supportsTriggers = NO; - supportsIndexKeyBlockSize = NO; + isMySQL3 = NO; + isMySQL4 = NO; + isMySQL5 = NO; + isMySQL6 = NO; + + supportsInformationSchema = NO; + supportsSpatialExtensions = NO; + supportsShowCharacterSet = NO; + supportsCharacterSetDatabaseVar = NO; + supportsPost41CharacterSetHandling = NO; + supportsCreateUser = NO; + supportsDropUser = NO; + supportsFullDropUser = NO; + supportsUserMaxVars = NO; + supportsShowPrivileges = NO; + engineTypeQueryName = @"ENGINE"; + supportsInformationSchemaEngines = NO; + supportsPre41StorageEngines = NO; + supportsBlackholeStorageEngine = NO; + supportsArchiveStorageEngine = NO; + supportsCSVStorageEngine = NO; + supportsTriggers = NO; + supportsIndexKeyBlockSize = NO; + supportsQuotingEngineTypeInCreateSyntax = NO; } /** |