diff options
author | stuconnolly <stuart02@gmail.com> | 2010-07-24 21:34:05 +0000 |
---|---|---|
committer | stuconnolly <stuart02@gmail.com> | 2010-07-24 21:34:05 +0000 |
commit | bf1294bd1016672aa3062bb80b546bf2f8037fb3 (patch) | |
tree | 121768027638e59af7d5830855bd19b88de7e601 /Source/SPSQLExporter.m | |
parent | eb29a57a6860961c0caa00787d779f4cb4117c90 (diff) | |
download | sequelpro-bf1294bd1016672aa3062bb80b546bf2f8037fb3.tar.gz sequelpro-bf1294bd1016672aa3062bb80b546bf2f8037fb3.tar.bz2 sequelpro-bf1294bd1016672aa3062bb80b546bf2f8037fb3.zip |
In addition to Gzip compression support when exporting SQL dumps add the ability to use Bzip2 compression.
Other changes include:
+ Enable the use of export compression (Gzip and Bzip2) for all export formats.
+ Move the compression options in the export dialog to the 'Advanced' export settings view.
+ Simplify the setting of common exporter properties (e.g. the connection, use of compression).
+ Fix a potential memory leak in the dot exporter.
+ Update the data importer to recognise Bzip2 compressed files.
+ Fix several display issues on export dialog.
+ Restore the default .csv file extension of CSV exports.
+ Correctly update the default export filename when selecting a output compression type.
The addition of Bzip2 compression support implements issue #688.
Diffstat (limited to 'Source/SPSQLExporter.m')
-rw-r--r-- | Source/SPSQLExporter.m | 18 |
1 files changed, 3 insertions, 15 deletions
diff --git a/Source/SPSQLExporter.m b/Source/SPSQLExporter.m index 3d36fce3..7249af1d 100644 --- a/Source/SPSQLExporter.m +++ b/Source/SPSQLExporter.m @@ -52,7 +52,6 @@ @synthesize sqlOutputIncludeUTF8BOM; @synthesize sqlOutputEncodeBLOBasHex; @synthesize sqlOutputIncludeErrors; -@synthesize sqlOutputCompressFile; @synthesize sqlCurrentTableExportIndex; @synthesize sqlInsertAfterNValue; @synthesize sqlInsertDivider; @@ -140,6 +139,8 @@ { // Check for cancellation flag if ([self isCancelled]) { + [errors release]; + [sqlString release]; [pool release]; return; } @@ -159,7 +160,7 @@ [targetArray addObject:item]; } - // If required write the UTF-8 Byte Order Mark + // If required write the UTF-8 Byte Order Mark (BOM) if ([self sqlOutputIncludeUTF8BOM]) { [metaString setString:@"\xef\xbb\xbf"]; [metaString appendString:@"# ************************************************************\n"]; @@ -167,9 +168,6 @@ else { [metaString setString:@"# ************************************************************\n"]; } - - // If required set the file handle to compress it's output - [[self exportOutputFileHandle] setShouldWriteWithGzipCompression:[self sqlOutputCompressFile]]; // Add the dump header to the dump file [metaString appendString:@"# Sequel Pro SQL dump\n"]; @@ -186,12 +184,6 @@ [metaString appendString:@"/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;\n"]; [metaString appendString:@"/*!40101 SET NAMES utf8 */;\n"]; - // Add commands to store and disable unique checks, foreign key checks, mode and notes where supported. - // Include trailing semicolons to ensure they're run individually. Use MySQL-version based comments. - //if (sqlOutputIncludeDropSyntax) { - //[metaString appendString:@"/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;\n"]; - //} - [metaString appendString:@"/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;\n"]; [metaString appendString:@"/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;\n"]; [metaString appendString:@"/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;\n\n\n"]; @@ -722,10 +714,6 @@ [metaString appendString:@"/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;\n"]; [metaString appendString:@"/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;\n"]; - //if (sqlOutputIncludeDropSyntax) { - //[metaString appendString:@"/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;\n"]; - //} - // Restore the client encoding to the original encoding before import [metaString appendString:@"/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;\n"]; [metaString appendString:@"/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;\n"]; |