diff options
Diffstat (limited to 'Source/SPTableData.m')
-rw-r--r-- | Source/SPTableData.m | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/Source/SPTableData.m b/Source/SPTableData.m index cb98183e..27dd4ea1 100644 --- a/Source/SPTableData.m +++ b/Source/SPTableData.m @@ -48,6 +48,7 @@ @implementation SPTableData @synthesize tableHasAutoIncrementField; +@synthesize connection = mySQLConnection; - (id) init { @@ -61,7 +62,6 @@ triggers = nil; tableEncoding = nil; tableCreateSyntax = nil; - mySQLConnection = nil; tableHasAutoIncrementField = NO; pthread_mutex_init(&dataProcessingLock, NULL); @@ -71,18 +71,6 @@ } /** - * Set the connection for use. - * Called by the connect sheet methods. - * - * @param theConnection The used connection for the SPDatabaseDocument - */ -- (void) setConnection:(SPMySQLConnection *)theConnection -{ - mySQLConnection = theConnection; - [mySQLConnection retain]; -} - -/** * Retrieve the encoding for the current table, using or refreshing the cache as appropriate. */ - (NSString *) tableEncoding @@ -1415,7 +1403,7 @@ if (triggers) SPClear(triggers); if (tableEncoding) SPClear(tableEncoding); if (tableCreateSyntax) SPClear(tableCreateSyntax); - if (mySQLConnection) SPClear(mySQLConnection); + [self setConnection:nil]; pthread_mutex_destroy(&dataProcessingLock); |