]> git.joonet.de Git - adminer.git/commitdiff
Ignore SQLite autoindexes
authorJakub Vrana <jakub@vrana.cz>
Sun, 15 Jul 2012 19:24:20 +0000 (12:24 -0700)
committerJakub Vrana <jakub@vrana.cz>
Sun, 15 Jul 2012 19:24:20 +0000 (12:24 -0700)
adminer/drivers/sqlite.inc.php

index 3233613a0527fee6c9d821cb82efa5e926d1fffe..1f21b14cea50db713fa8f0f810075ff905cb3e88 100644 (file)
@@ -301,10 +301,12 @@ if (isset($_GET["sqlite"]) || isset($_GET["sqlite2"])) {
                        $return[""] = array("type" => "PRIMARY", "columns" => $primary, "lengths" => array());
                }
                foreach (get_rows("PRAGMA index_list(" . table($table) . ")") as $row) {
-                       $return[$row["name"]]["type"] = ($row["unique"] ? "UNIQUE" : "INDEX");
-                       $return[$row["name"]]["lengths"] = array();
-                       foreach (get_rows("PRAGMA index_info(" . idf_escape($row["name"]) . ")") as $row1) {
-                               $return[$row["name"]]["columns"][] = $row1["name"];
+                       if (!ereg("^sqlite_", $row["name"])) {
+                               $return[$row["name"]]["type"] = ($row["unique"] ? "UNIQUE" : "INDEX");
+                               $return[$row["name"]]["lengths"] = array();
+                               foreach (get_rows("PRAGMA index_info(" . idf_escape($row["name"]) . ")") as $row1) {
+                                       $return[$row["name"]]["columns"][] = $row1["name"];
+                               }
                        }
                }
                return $return;