From 1b117d4c65e420524fa5d80f5d052126783c5ea4 Mon Sep 17 00:00:00 2001 From: Bibiko Date: Wed, 20 May 2009 14:13:01 +0000 Subject: =?UTF-8?q?=E2=80=A2=20fixed=20bug=20for=20getServerVersionString?= =?UTF-8?q?=20-=20one=20has=20to=20loop=20over=20all=20rows=20of=20a=20CMM?= =?UTF-8?q?CPResult=20object=20or=20to=20set=20dataSeek=20to=20the=20end?= =?UTF-8?q?=20of=20that=20object=20to=20dealloc=20it?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/CMMCPConnection.m | 8 +++++--- 1 file 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 -- cgit v1.2.3