diff options
author | Stuart Connolly <stuart02@gmail.com> | 2017-03-23 18:26:02 +0000 |
---|---|---|
committer | Stuart Connolly <stuart02@gmail.com> | 2017-03-23 18:26:02 +0000 |
commit | d37a2f490a271b6170a5c2978f505fb403d1ad64 (patch) | |
tree | 4b817ac830d64aeeab9cb4c2d80afea671b7a426 /Source/SPTableCopy.m | |
parent | bab93f8ce74a6644c9a3d8a50fa26230f127c550 (diff) | |
download | sequelpro-d37a2f490a271b6170a5c2978f505fb403d1ad64.tar.gz sequelpro-d37a2f490a271b6170a5c2978f505fb403d1ad64.tar.bz2 sequelpro-d37a2f490a271b6170a5c2978f505fb403d1ad64.zip |
- #1235: Prevent renaming a database which contains any non-table objects as it's currently not supported.
- #1235: Inform the user when duplicating a database than any non-table objects won't be copied.
- Add missing high resolution images to project.
- Fix a potential memory leak inside SPCreateDatabaseInfo
Diffstat (limited to 'Source/SPTableCopy.m')
-rw-r--r-- | Source/SPTableCopy.m | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Source/SPTableCopy.m b/Source/SPTableCopy.m index 07f03846..bc13bc5c 100644 --- a/Source/SPTableCopy.m +++ b/Source/SPTableCopy.m @@ -117,7 +117,7 @@ success = NO; } - // re-enable id creation + // Re-enable id creation [connection queryString:@"/*!40101 SET SQL_MODE=@OLD_SQL_MODE */"]; if ([connection queryErrored]) { @@ -147,11 +147,12 @@ { NSString *showCreateTableStatment = [NSString stringWithFormat:@"SHOW CREATE TABLE %@.%@", [sourceDatabase backtickQuotedString], [tableName backtickQuotedString]]; - SPMySQLResult *theResult = [connection queryString:showCreateTableStatment]; + SPMySQLResult *result = [connection queryString:showCreateTableStatment]; - if([theResult numberOfRows] > 0) return [[theResult getRowAsArray] objectAtIndex:1]; + if ([result numberOfRows] > 0) return [[result getRowAsArray] objectAtIndex:1]; - NSLog(@"query <%@> failed to return the expected result.\n Error state: %@ (%lu)",showCreateTableStatment,[connection lastErrorMessage],[connection lastErrorID]); + SPLog(@"query <%@> failed to return the expected result.\n Error state: %@ (%lu)", showCreateTableStatment, [connection lastErrorMessage], [connection lastErrorID]); + return nil; } |