From e2932a9e12db6764d1539e4fd3bd100d59f0a76a Mon Sep 17 00:00:00 2001 From: mtvee Date: Fri, 15 May 2009 06:40:08 +0000 Subject: fixed bug with SPTableData not clearing cache properly --- Source/SPTableData.m | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 6b40eb99..2192d5f9 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -266,6 +266,8 @@ NSString *encodingString; unsigned i, stringStart; + [columns removeAllObjects]; + [columnNames removeAllObjects]; [constraints removeAllObjects]; // Catch unselected tables and return nil @@ -356,12 +358,12 @@ if( [[parts objectAtIndex:0] hasPrefix:@"CONSTRAINT"] ) { NSMutableDictionary *constraintDetails = [[NSMutableDictionary alloc] init]; /* - NSLog( @"constraint %@ on %@ ref %@.%@", - [[parts objectAtIndex:1] stringByTrimmingCharactersInSet:junk], - [[parts objectAtIndex:4] stringByTrimmingCharactersInSet:junk], - [[parts objectAtIndex:6] stringByTrimmingCharactersInSet:junk], - [[parts objectAtIndex:7] stringByTrimmingCharactersInSet:junk] ); - */ + NSLog( @"constraint %@ on %@ ref %@.%@", + [[parts objectAtIndex:1] stringByTrimmingCharactersInSet:junk], + [[parts objectAtIndex:4] stringByTrimmingCharactersInSet:junk], + [[parts objectAtIndex:6] stringByTrimmingCharactersInSet:junk], + [[parts objectAtIndex:7] stringByTrimmingCharactersInSet:junk] ); + */ [constraintDetails setObject:[[parts objectAtIndex:1] stringByTrimmingCharactersInSet:junk] forKey:@"name"]; [constraintDetails setObject:[[parts objectAtIndex:4] stringByRemovingCharactersInSet:junk] @@ -446,9 +448,9 @@ // key else if( [[parts objectAtIndex:0] hasPrefix:@"KEY"] ) { /* - NSLog( @"key %@.%@", - [[parts objectAtIndex:1] stringByTrimmingCharactersInSet:junk], - [[parts objectAtIndex:2] stringByTrimmingCharactersInSet:junk] ); + NSLog( @"key %@.%@", + [[parts objectAtIndex:1] stringByTrimmingCharactersInSet:junk], + [[parts objectAtIndex:2] stringByTrimmingCharactersInSet:junk] ); */ } // who knows -- cgit v1.2.3