From: Jakub Vrana Date: Thu, 4 Aug 2011 20:58:25 +0000 (+0200) Subject: MySQL specific characters X-Git-Tag: v3.3.2~8 X-Git-Url: https://git.joonet.de/?a=commitdiff_plain;h=323f4ab34cf86c45ddb55c6ed137cfacbd0330e2;p=adminer.git MySQL specific characters --- diff --git a/adminer/sql.inc.php b/adminer/sql.inc.php index d739bf16..090d3e5a 100644 --- a/adminer/sql.inc.php +++ b/adminer/sql.inc.php @@ -51,7 +51,7 @@ if (!$error && $_POST) { } $commands = 0; $errors = array(); - $parse = '[\'`"]' . ($jush == "pgsql" ? '|\\$[^$]*\\$' : ($jush == "mssql" || $jush == "sqlite" ? '|\\[' : '')) . '|/\\*|-- |#'; //! ` and # not everywhere + $parse = '[\'"' . ($jush == "sql" ? '`#' : ($jush == "sqlite" ? '`[' : ($jush == "mssql" ? '[' : ''))) . ']|/\\*|-- |$' . ($jush == "pgsql" ? '|\\$[^$]*\\$' : ''); $total_start = microtime(); parse_str($_COOKIE["adminer_export"], $adminer_export); $dump_format = $adminer->dumpFormat(); @@ -61,7 +61,7 @@ if (!$error && $_POST) { $delimiter = $match[1]; $query = substr($query, strlen($match[0])); } else { - preg_match('(' . preg_quote($delimiter) . "|$parse|\$)", $query, $match, PREG_OFFSET_CAPTURE, $offset); // should always match + preg_match('(' . preg_quote($delimiter) . "|$parse)", $query, $match, PREG_OFFSET_CAPTURE, $offset); // should always match $found = $match[0][0]; $offset = $match[0][1] + strlen($found); if (!$found && $fp && !feof($fp)) {