diff options
author | rowanbeentje <rowan@beent.je> | 2009-12-02 01:56:21 +0000 |
---|---|---|
committer | rowanbeentje <rowan@beent.je> | 2009-12-02 01:56:21 +0000 |
commit | af16f1e3bb44a4a782dbe1bee18513ce7d4738c6 (patch) | |
tree | d219832403e19837591759b0fb8759921990dac0 /Source/TableDump.m | |
parent | e80643e92666c6752940f791f3148fcfefe9bb4e (diff) | |
download | sequelpro-af16f1e3bb44a4a782dbe1bee18513ce7d4738c6.tar.gz sequelpro-af16f1e3bb44a4a782dbe1bee18513ce7d4738c6.tar.bz2 sequelpro-af16f1e3bb44a4a782dbe1bee18513ce7d4738c6.zip |
- Improve import cancellation responsiveness, especially for lots of short data rows or slow connections
- Remove a debug NSLog on "Copy as SQL insert"
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r-- | Source/TableDump.m | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m index 50bba928..f1c2f678 100644 --- a/Source/TableDump.m +++ b/Source/TableDump.m @@ -689,6 +689,7 @@ // Extract and process any complete SQL queries that can be found in the strings parsed so far while (query = [sqlParser trimAndReturnStringToCharacter:';' trimmingInclusively:YES returningInclusively:NO]) { + if (progressCancelled) break; fileProcessedLength += [query lengthOfBytesUsingEncoding:sqlEncoding] + 1; // Skip blank or whitespace-only queries to avoid errors @@ -997,6 +998,7 @@ while ([parsedRows count] >= csvRowsPerQuery || (!csvRowArray && allDataRead && [parsedRows count])) { + if (progressCancelled) break; query = [[NSMutableString alloc] initWithString:insertBaseString]; csvRowsThisQuery = 0; for (i = 0; i < csvRowsPerQuery && i < [parsedRows count]; i++) { |