]> git.joonet.de Git - adminer.git/commitdiff
MySQL: Support index algorithms with MEMORY and NDB engines
authorJakub Vrana <jakub@vrana.cz>
Thu, 17 Apr 2025 08:54:04 +0000 (10:54 +0200)
committerJakub Vrana <jakub@vrana.cz>
Thu, 17 Apr 2025 08:54:04 +0000 (10:54 +0200)
CHANGELOG.md
adminer/drivers/mysql.inc.php

index 74eed5ed1c2f46639d0b72168aebd08d4ec30e33..8c5b6c3fbf0a4ea4d40ebaabf9f4f505bb6552d0 100644 (file)
@@ -1,8 +1,8 @@
 ## Adminer dev
 - MySQL: Avoid warning on selecting tables with fulltext indexes (bug #1036)
+- MySQL, PostgreSQL: Support index algorithms (bug #1030)
 - PostgreSQL, CockroachDB: Creating partitioned tables (bug #1031)
 - PostgreSQL: Move partitioned tables from table list to parent table
-- PostgreSQL: Support index algorithms (bug #1030)
 - PostgreSQL: Support calling functions returning table (bug #1040)
 - Designs: adminer.css with 'prefers-color-scheme: dark' don't disable dark mode
 - Plugins: Method bodyClass() to add &lt;body class>
index a45e52d1690dbfec115979897c6de39cfa30ba6e..20121ea712ff211032d836ab887290b146c78cb1 100644 (file)
@@ -367,6 +367,10 @@ if (!defined('Adminer\DRIVER')) {
                        }
                        return $return;
                }
+
+               function indexAlgorithms(array $tableStatus): array {
+                       return (preg_match('~^(MEMORY|NDB)$~', $tableStatus["Engine"]) ? array("HASH", "BTREE") : array());
+               }
        }
 
 
@@ -558,6 +562,7 @@ if (!defined('Adminer\DRIVER')) {
                        $return[$name]["columns"][] = $row["Column_name"];
                        $return[$name]["lengths"][] = ($row["Index_type"] == "SPATIAL" ? null : $row["Sub_part"]);
                        $return[$name]["descs"][] = null;
+                       $return[$name]["algorithm"] = $row["Index_type"];
                }
                return $return;
        }