From eab6df4de773259f90dd5a1d25e44ca4d2765bbf Mon Sep 17 00:00:00 2001 From: rowanbeentje Date: Fri, 16 Mar 2012 09:41:37 +0000 Subject: - Fix a bug in the SPMySQL integration branch causing the table triggers list never to be initialised - 10.7 magically fixed this and worked, but 10.6 didn't show any triggers. Thanks to schlabberdog for spotting and diagnosing this issue! --- Source/SPTableData.h | 2 +- Source/SPTableData.m | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/SPTableData.h b/Source/SPTableData.h index c7ebe37b..94c95da4 100644 --- a/Source/SPTableData.h +++ b/Source/SPTableData.h @@ -33,7 +33,7 @@ NSMutableArray *columns; NSMutableArray *columnNames; NSMutableArray *constraints; - NSMutableArray *triggers; + NSArray *triggers; NSMutableDictionary *status; NSString *tableEncoding; diff --git a/Source/SPTableData.m b/Source/SPTableData.m index 582ad9d2..0c0814d6 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -166,7 +166,7 @@ } } - return (NSArray *)triggers; + return triggers; } /** @@ -1060,8 +1060,8 @@ return NO; } - [triggers removeAllObjects]; - [triggers addObjectsFromArray:[theResult getAllRows]]; + if (triggers) [triggers release]; + triggers = [[NSArray alloc] initWithArray:[theResult getAllRows]]; if (changeEncoding) [mySQLConnection restoreStoredEncoding]; -- cgit v1.2.3