diff --git a/CHANGELOG.md b/CHANGELOG.md index 74eed5ed..8c5b6c3f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 <body class> diff --git a/adminer/drivers/mysql.inc.php b/adminer/drivers/mysql.inc.php index a45e52d1..20121ea7 100644 --- a/adminer/drivers/mysql.inc.php +++ b/adminer/drivers/mysql.inc.php @@ -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; }