aboutsummaryrefslogtreecommitdiffstats
path: root/Frameworks/MCPKit
diff options
context:
space:
mode:
authorBibiko <bibiko@eva.mpg.de>2010-03-20 00:12:06 +0000
committerBibiko <bibiko@eva.mpg.de>2010-03-20 00:12:06 +0000
commitd8b3558dc3825e95f3edf529f75b24b18b74e4ba (patch)
treee01807459976fe04516f79b8a18c4781388b38e9 /Frameworks/MCPKit
parentca77ea4aa4972ddda817485b2f301f6b39ed14e3 (diff)
downloadsequelpro-d8b3558dc3825e95f3edf529f75b24b18b74e4ba.tar.gz
sequelpro-d8b3558dc3825e95f3edf529f75b24b18b74e4ba.tar.bz2
sequelpro-d8b3558dc3825e95f3edf529f75b24b18b74e4ba.zip
Diffstat (limited to 'Frameworks/MCPKit')
-rw-r--r--Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m5
1 files changed, 4 insertions, 1 deletions
diff --git a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
index 6dac15b3..6b6ccc22 100644
--- a/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
+++ b/Frameworks/MCPKit/MCPFoundationKit/MCPConnection.m
@@ -1931,6 +1931,7 @@ void performThreadedKeepAlive(void *ptr)
NSMutableArray *allDbNames = [NSMutableArray array];
NSMutableArray *allTableNames = [NSMutableArray array];
+ // id to make any key unique
NSString *connectionID;
if([delegate respondsToSelector:@selector(connectionID)])
connectionID = [NSString stringWithString:[[self delegate] connectionID]];
@@ -1938,10 +1939,12 @@ void performThreadedKeepAlive(void *ptr)
connectionID = @"_";
NSString *SPUniqueSchemaDelimiter = @"￸";
+ NSUInteger cnt = 0; // used to make field data unique
[structure setObject:[NSMutableDictionary dictionary] forKey:connectionID];
while(row = mysql_fetch_row(theResult)) {
+ cnt++;
NSString *db = [self stringWithUTF8CString:row[0]];
NSString *db_id = [NSString stringWithFormat:@"%@%@%@", connectionID, SPUniqueSchemaDelimiter, db];
NSString *table = [self stringWithUTF8CString:row[1]];
@@ -1968,7 +1971,7 @@ void performThreadedKeepAlive(void *ptr)
[[[structure valueForKey:connectionID] valueForKey:db_id] setObject:[NSMutableDictionary dictionary] forKey:table_id];
}
- [[[[structure valueForKey:connectionID] valueForKey:db_id] valueForKey:table_id] setObject:[NSArray arrayWithObjects:type, charset, key, extra, priv, nil] forKey:field_id];
+ [[[[structure valueForKey:connectionID] valueForKey:db_id] valueForKey:table_id] setObject:[NSArray arrayWithObjects:type, charset, key, extra, priv, [NSNumber numberWithUnsignedLongLong:cnt], nil] forKey:field_id];
[[[[structure valueForKey:connectionID] valueForKey:db_id] valueForKey:table_id] setObject:structtype forKey:@" struct_type "];
}