aboutsummaryrefslogtreecommitdiffstats
path: root/Source/TableDump.m
diff options
context:
space:
mode:
authorstuconnolly <stuart02@gmail.com>2009-11-11 00:14:50 +0000
committerstuconnolly <stuart02@gmail.com>2009-11-11 00:14:50 +0000
commitf7f1c7bd05538feca61f735f6039e548f9d7ad5e (patch)
tree09bda39946d215114b161e45b5f23b2cdcaf4fc1 /Source/TableDump.m
parent938e8654b76383396ee187ab751bb8fa6d67f37a (diff)
downloadsequelpro-f7f1c7bd05538feca61f735f6039e548f9d7ad5e.tar.gz
sequelpro-f7f1c7bd05538feca61f735f6039e548f9d7ad5e.tar.bz2
sequelpro-f7f1c7bd05538feca61f735f6039e548f9d7ad5e.zip
During an import, before entering the loop to execute the current batch of queries, check that the current connection is active and if not bail from the method.
Diffstat (limited to 'Source/TableDump.m')
-rw-r--r--Source/TableDump.m6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/TableDump.m b/Source/TableDump.m
index f073f068..e8722174 100644
--- a/Source/TableDump.m
+++ b/Source/TableDump.m
@@ -630,6 +630,9 @@
dataBufferPosition -= dataBufferLastQueryEndPosition;
dataBufferLastQueryEndPosition = 0;
}
+
+ // Before entering the following loop, check that we actually have a connection. If not, bail.
+ if (![mySQLConnection isConnected]) return;
// 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]) {
@@ -929,6 +932,9 @@
}
}
if (!fieldMappingArray) continue;
+
+ // Before entering the following loop, check that we actually have a connection. If not, bail.
+ if (![mySQLConnection isConnected]) return;
// If we have more than the csvRowsPerQuery amount, or if we're at the end of the
// available data, construct and run a query.