aboutsummaryrefslogtreecommitdiffstats
path: root/Source/SPServerSupport.m
diff options
context:
space:
mode:
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;
}
/**