aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPServerSupport.m
diff options
context:
space:
mode:
authorAbhi Beckert <abhi@Twist-of-Lemon-2.local>2015-05-16 08:06:06 +1000
committerAbhi Beckert <abhi@Twist-of-Lemon-2.local>2015-05-16 08:06:06 +1000
commit57a6f6c73bdaa202164645370d37fcbe5d14a092 (patch)
treedd30aa6156064f1d4c0e10ea87059625470fc2f9 /Source/SPServerSupport.m
parentb5e972f4504043dfb9c358e272e93fb59ae2127f (diff)
parent0f0c43eb74408b6a65a42e2c6fd46f4142ef8e3f (diff)
downloadsequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.tar.gz
sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.tar.bz2
sequelpro-57a6f6c73bdaa202164645370d37fcbe5d14a092.zip
Merge remote-tracking branch 'sequelpro/master'
Diffstat (limited to 'Source/SPServerSupport.m')
-rw-r--r--Source/SPServerSupport.m32
1 files changed, 32 insertions, 0 deletions
diff --git a/Source/SPServerSupport.m b/Source/SPServerSupport.m
index 991a9fd3..489acc04 100644
--- a/Source/SPServerSupport.m
+++ b/Source/SPServerSupport.m
@@ -69,12 +69,15 @@
@synthesize supportsArchiveStorageEngine;
@synthesize supportsCSVStorageEngine;
@synthesize supportsTriggers;
+@synthesize supportsEvents;
@synthesize supportsIndexKeyBlockSize;
@synthesize supportsQuotingEngineTypeInCreateSyntax;
@synthesize supportsFractionalSeconds;
@synthesize serverMajorVersion;
@synthesize serverMinorVersion;
@synthesize serverReleaseVersion;
+@synthesize supportsFulltextOnInnoDB;
+@synthesize supportsShowEngine;
#pragma mark -
#pragma mark Initialisation
@@ -185,6 +188,9 @@
// Support for triggers wasn't added until MySQL 5.0.2
supportsTriggers = [self isEqualToOrGreaterThanMajorVersion:5 minor:0 release:2];
+
+ // Support for events wasn't added until MySQL 5.1.6
+ supportsEvents = [self isEqualToOrGreaterThanMajorVersion:5 minor:1 release:6];
// 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];
@@ -194,6 +200,29 @@
// Fractional second support wasn't added until MySQL 5.6.4
supportsFractionalSeconds = [self isEqualToOrGreaterThanMajorVersion:5 minor:6 release:4];
+ supportsFulltextOnInnoDB = supportsFractionalSeconds; //introduced in 5.6.4 too
+
+ // The SHOW ENGINE query wasn't added until MySQL 4.1.2
+ supportsShowEngine = [self isEqualToOrGreaterThanMajorVersion:4 minor:1 release:2];
+}
+
+- (SPInnoDBStatusQueryFormat)innoDBStatusQuery
+{
+ SPInnoDBStatusQueryFormat tuple = {nil,0};
+
+ //if we have SHOW ENGINE go with that
+ if(supportsShowEngine) {
+ tuple.queryString = @"SHOW ENGINE INNODB STATUS";
+ tuple.columnIndex = 2;
+ }
+ //up to mysql 5.5 we could also use the old SHOW INNODB STATUS
+ if([self isEqualToOrGreaterThanMajorVersion:3 minor:23 release:52] &&
+ ![self isEqualToOrGreaterThanMajorVersion:5 minor:5 release:0]) {
+ tuple.queryString = @"SHOW INNODB STATUS";
+ tuple.columnIndex = 0;
+ }
+
+ return tuple;
}
/**
@@ -280,9 +309,12 @@
supportsArchiveStorageEngine = NO;
supportsCSVStorageEngine = NO;
supportsTriggers = NO;
+ supportsEvents = NO;
supportsIndexKeyBlockSize = NO;
supportsQuotingEngineTypeInCreateSyntax = NO;
supportsFractionalSeconds = NO;
+ supportsFulltextOnInnoDB = NO;
+ supportsShowEngine = NO;
}
/**