bug #2634827 [import] Using DELIMITER ends with infinite cycle

This commit is contained in:
Marc Delisle
2009-04-12 10:43:43 +00:00
parent 2ad18b06e3
commit 07673dcee9
2 changed files with 6 additions and 0 deletions

View File

@@ -109,6 +109,11 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
// Current length of our buffer
$len = strlen($buffer);
// Avoid endless loop in case of missing last newline
if ($GLOBALS['finished'] && $buffer[$len - 1] != "\n") {
$buffer .= "\n";
}
// Grab some SQL queries out of it
while ($i < $len) {
$found_delimiter = false;