bug #2634827 [import] Using DELIMITER ends with infinite cycle
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user