aboutsummaryrefslogtreecommitdiffstats
path: root/Source/CMMCPConnection.m
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2009-05-20 14:13:01 +0000
committerBibiko <bibiko@eva.mpg.de>2009-05-20 14:13:01 +0000
commit1b117d4c65e420524fa5d80f5d052126783c5ea4 (patch)
treeca81f03c7c715d9fd61ba92e26d09311611529f5 /Source/CMMCPConnection.m
parent365c6c4e30a2b54848d14c240aa3580875a90393 (diff)
downloadsequelpro-1b117d4c65e420524fa5d80f5d052126783c5ea4.tar.gz
sequelpro-1b117d4c65e420524fa5d80f5d052126783c5ea4.tar.bz2
sequelpro-1b117d4c65e420524fa5d80f5d052126783c5ea4.zip
• fixed bug for getServerVersionString
- one has to loop over all rows of a CMMCPResult object or to set dataSeek to the end of that object to dealloc it
Diffstat (limited to 'Source/CMMCPConnection.m')
-rw-r--r--Source/CMMCPConnection.m8
1 files changed, 5 insertions, 3 deletions
diff --git a/Source/CMMCPConnection.m b/Source/CMMCPConnection.m
index f27eee6b..6e00357c 100644
--- a/Source/CMMCPConnection.m
+++ b/Source/CMMCPConnection.m
@@ -40,9 +40,11 @@ static void forcePingTimeout(int signalNumber);
if( mConnected ) {
CMMCPResult *theResult;
theResult = [self queryString:@"SHOW VARIABLES WHERE Variable_name = 'version'"];
- if ([theResult numOfRows])
- [theResult dataSeek:0];
- serverVersionString = [NSString stringWithString:[[theResult fetchRowAsDictionary] objectForKey:@"Value"]];
+ if ([theResult numOfRows]) {
+ [theResult dataSeek:0];
+ serverVersionString = [NSString stringWithString:[[theResult fetchRowAsArray] objectAtIndex:1]];
+ [theResult dataSeek:[theResult numOfRows]];
+ }
}
}
@end