aboutsummaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorMax <post@wickenrode.com>2015-08-07 23:45:15 +0200
committerMax <post@wickenrode.com>2015-08-07 23:45:15 +0200
commitc7b5e880003153e599a452151ee1f3a3e40aff4c (patch)
tree14fa6a7c648e08c5a08ab4225a61148709aff17d /Source
parent5befad85ccd6d22900942ea73f4018d71038f516 (diff)
downloadsequelpro-c7b5e880003153e599a452151ee1f3a3e40aff4c.tar.gz
sequelpro-c7b5e880003153e599a452151ee1f3a3e40aff4c.tar.bz2
sequelpro-c7b5e880003153e599a452151ee1f3a3e40aff4c.zip
Added fallback code for server version identification.
Good news: Sequel Pro can now connect to sphinxql server. Bad news: It will treat it like a MySQL 2 server (or whatever version of Sphinx is running)
Diffstat (limited to 'Source')
-rw-r--r--Source/SPServerSupport.m8
1 files changed, 4 insertions, 4 deletions
diff --git a/Source/SPServerSupport.m b/Source/SPServerSupport.m
index 489acc04..a3b2a1a7 100644
--- a/Source/SPServerSupport.m
+++ b/Source/SPServerSupport.m
@@ -95,10 +95,10 @@
- (id)initWithMajorVersion:(NSInteger)majorVersion minor:(NSInteger)minorVersion release:(NSInteger)releaseVersion
{
if ((self = [super init])) {
-
- serverMajorVersion = majorVersion;
- serverMinorVersion = minorVersion;
- serverReleaseVersion = releaseVersion;
+ // Might be NSNotFound if unknown. unknown should also lose against "0".
+ serverMajorVersion = (majorVersion != NSNotFound)? majorVersion : -1;
+ serverMinorVersion = (minorVersion != NSNotFound)? minorVersion : -1;
+ serverReleaseVersion = (releaseVersion != NSNotFound)? releaseVersion : -1;
// Determine what the server supports
[self evaluate];