Error in case of found string at end of chunk (thanks to simonik)
This commit is contained in:
parent
c456f52d9f
commit
dd85aa5d6a
|
@ -73,12 +73,13 @@ if (!$error && $_POST) {
|
|||
if ($found && $found != $delimiter) { // find matching quote or comment end
|
||||
while (preg_match('(' . ($found == '/*' ? '\\*/' : ($found == '[' ? ']' : (ereg('^-- |^#', $found) ? "\n" : preg_quote($found) . "|\\\\."))) . '|$)s', $query, $match, PREG_OFFSET_CAPTURE, $offset)) { //! respect sql_mode NO_BACKSLASH_ESCAPES
|
||||
$s = $match[0][0];
|
||||
$offset = $match[0][1] + strlen($s);
|
||||
if (!$s && $fp && !feof($fp)) {
|
||||
$offset -= strlen($found); // strlen($found) >= strlen("\\.") - 1
|
||||
$query .= fread($fp, 1e5);
|
||||
} elseif ($s[0] != "\\") {
|
||||
break;
|
||||
} else {
|
||||
$offset = $match[0][1] + strlen($s);
|
||||
if ($s[0] != "\\") {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
} else { // end of a query
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
Adminer 3.3.4-dev:
|
||||
Foreign keys default actions (bug #3397606)
|
||||
Fix minor parser bug in SQL command with webserver file
|
||||
PostgreSQL: fix alter foreign key
|
||||
SET DEFAULT foreign key action
|
||||
PostgreSQL over PDO: connect if the eponymous database does not exist (bug #3391619)
|
||||
|
|
Loading…
Reference in a new issue