From 323f4ab34cf86c45ddb55c6ed137cfacbd0330e2 Mon Sep 17 00:00:00 2001 From: Jakub Vrana Date: Thu, 4 Aug 2011 22:58:25 +0200 Subject: [PATCH] MySQL specific characters --- adminer/sql.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)) {