]> git.joonet.de Git - adminer.git/commitdiff
Auto_increment may be biginit (bug #2871284)
authorjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 1 Oct 2009 12:49:37 +0000 (12:49 +0000)
committerjakubvrana <jakubvrana@7c3ca157-0c34-0410-bff1-cbf682f78f5c>
Thu, 1 Oct 2009 12:49:37 +0000 (12:49 +0000)
git-svn-id: https://adminer.svn.sourceforge.net/svnroot/adminer/trunk@1158 7c3ca157-0c34-0410-bff1-cbf682f78f5c

adminer/create.inc.php

index 8eb0ea5b5018b9b464e1bd0862288c50210332b4..28bef2ca16cb9833a3cecfc28045d40ee66b1a62 100644 (file)
@@ -65,7 +65,7 @@ if ($_POST && !$error && !$_POST["add"] && !$_POST["drop_col"] && !$_POST["up"]
        $status = "COMMENT=" . $connection->quote($_POST["Comment"])
                . ($_POST["Engine"] && $_POST["Engine"] != $orig_status["Engine"] ? " ENGINE=" . $connection->quote($_POST["Engine"]) : "")
                . ($_POST["Collation"] && $_POST["Collation"] != $orig_status["Collation"] ? " COLLATE " . $connection->quote($_POST["Collation"]) : "")
-               . (strlen($_POST["auto_increment"]) ? " AUTO_INCREMENT=" . intval($_POST["auto_increment"]) : "")
+               . (strlen($_POST["auto_increment"]) ? " AUTO_INCREMENT=" . preg_replace('~[^0-9]+~', '', $_POST["auto_increment"]) : "")
        ;
        if (in_array($_POST["partition_by"], $partition_by)) {
                $partitions = array();