patch #2915168 [import] Incorrect parsing of DELIMITER keyword

This commit is contained in:
Marc Delisle
2009-12-17 17:54:53 +00:00
parent 6ec65aafe3
commit cc96cb9601
2 changed files with 3 additions and 1 deletions

View File

@@ -118,7 +118,7 @@ while (!($GLOBALS['finished'] && $i >= $len) && !$error && !$timeout_passed) {
$old_i = $i;
// this is about 7 times faster that looking for each sequence i
// one by one with strpos()
if (preg_match('/(\'|"|#|-- |\/\*|`|(?i)' . $delimiter_keyword . ')/', $buffer, $matches, PREG_OFFSET_CAPTURE, $i)) {
if (preg_match('/(\'|"|#|-- |\/\*|`|(?i)(?<![A-Z0-9_])' . $delimiter_keyword . ')/', $buffer, $matches, PREG_OFFSET_CAPTURE, $i)) {
// in $matches, index 0 contains the match for the complete
// expression but we don't use it
$first_position = $matches[1][1];