diff --git a/adminer/create.inc.php b/adminer/create.inc.php index 58b82a67..b1636c42 100644 --- a/adminer/create.inc.php +++ b/adminer/create.inc.php @@ -70,7 +70,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"]) : "") - . ($_POST["auto_increment"] != "" ? " AUTO_INCREMENT=" . preg_replace('~[^0-9]+~', '', $_POST["auto_increment"]) : "") + . ($_POST["Auto_increment"] != "" ? " AUTO_INCREMENT=" . preg_replace('~[^0-9]+~', '', $_POST["Auto_increment"]) : "") ; if (in_array($_POST["partition_by"], $partition_by)) { $partitions = array(); @@ -113,6 +113,9 @@ if ($_POST) { $row = $orig_status; $row["name"] = $TABLE; $row["fields"] = array(); + if (!$_GET["auto_increment"]) { // don't prefill by original Auto_increment for the sake of performance and not reusing deleted ids + $row["Auto_increment"] = ""; + } foreach ($orig_fields as $field) { $field["has_default"] = isset($field["default"]); if ($field["on_update"]) { @@ -162,7 +165,7 @@ foreach ($engines as $engine) {
-: "> +: "> : " maxlength="60">