]> git.joonet.de Git - adminer.git/commitdiff
Ignore whitespace after semicolon
authorJakub Vrana <jakub@vrana.cz>
Mon, 12 Sep 2011 19:14:22 +0000 (21:14 +0200)
committerJakub Vrana <jakub@vrana.cz>
Mon, 12 Sep 2011 19:14:22 +0000 (21:14 +0200)
adminer/sql.inc.php

index cc98e5ec26b1101417dce0fbd67e0d985d884516..5ae86a28948b44ad2396f843dcef1f398893abee 100644 (file)
@@ -33,7 +33,7 @@ if (!$error && $_POST) {
                        @ini_set("memory_limit", max(ini_bytes("memory_limit"), 2 * strlen($query) + memory_get_usage() + 8e6)); // @ - may be disabled, 2 - substr and trim, 8e6 - other variables
                }
                if ($query != "" && strlen($query) < 1e6) { // don't add big queries
-                       $q = $query . (ereg(';$', $query) ? "" : ";"); //! doesn't work with DELIMITER |
+                       $q = $query . (ereg(";[ \t\r\n]*\$", $query) ? "" : ";"); //! doesn't work with DELIMITER |
                        if (!$history || end($history) != $q) { // no repeated queries
                                $history[] = $q;
                        }