]> git.joonet.de Git - adminer.git/commitdiff
MariaDB: Support fulltext and spatial indexes in InnoDB (bug #583)
authorJakub Vrana <jakub@vrana.cz>
Wed, 24 Jan 2018 08:18:19 +0000 (09:18 +0100)
committerJakub Vrana <jakub@vrana.cz>
Wed, 24 Jan 2018 08:18:19 +0000 (09:18 +0100)
adminer/indexes.inc.php
changes.txt

index 0b43ee3e68cb2e48bf2d0724c543fac3e9a5fab9..a430b9a9872e6e2be278b6ff0e5aa9ad70042e89 100644 (file)
@@ -2,10 +2,18 @@
 $TABLE = $_GET["indexes"];
 $index_types = array("PRIMARY", "UNIQUE", "INDEX");
 $table_status = table_status($TABLE, true);
-if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.6 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
+$server_info = $connection->server_info;
+$fulltext = ($server_info >= 5.6);
+$spatial = ($server_info >= 5.7);
+if (preg_match('~([\d.]+)-MariaDB~', $server_info, $match)) {
+       $server_info = $match[1];
+       $fulltext = (version_compare($server_info, '10.0.5') >= 0);
+       $spatial = (version_compare($server_info, '10.2.2') >= 0);
+}
+if (preg_match('~MyISAM|M?aria' . ($fulltext ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
        $index_types[] = "FULLTEXT";
 }
-if (preg_match('~MyISAM|M?aria' . ($connection->server_info >= 5.7 ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
+if (preg_match('~MyISAM|M?aria' . ($spatial ? '|InnoDB' : '') . '~i', $table_status["Engine"])) {
        $index_types[] = "SPATIAL";
 }
 $indexes = indexes($TABLE);
index 277dc1198078da963fa2774a5cfd4563aa435606..8093f5a87392c871986602de5d11148de66813c1 100644 (file)
@@ -5,6 +5,7 @@ Hide window.opener from pages opened in a new window (bug #561)
 Adminer: Fix Search data in tables (regression from 4.4.0)
 CSP: Allow any styles, images, media and fonts, disallow base-uri
 MySQL: Support geometry in MySQL 8 (bug #574)
+MariaDB: Support fulltext and spatial indexes in InnoDB (bug #583)
 SQLite: Enable foreign key checks
 PostgreSQL: Respect NULL default value
 PostgreSQL: Display foreign tables (bug #576)