Enable spatial indexes for Aria

This commit is contained in:
2025-04-21 01:03:11 -07:00
parent fa1b8d5c94
commit cc1dc7a822

View File

@@ -429,10 +429,10 @@ while ($row = PMA_DBI_fetch_assoc($fields_rs)) {
'geometry', 'point', 'linestring', 'polygon', 'multipoint', 'geometry', 'point', 'linestring', 'polygon', 'multipoint',
'multilinestring', 'multipolygon', 'geomtrycollection' 'multilinestring', 'multipolygon', 'geomtrycollection'
); );
if (! in_array($type, $spatial_types) || 'MYISAM' != $tbl_type) { if (in_array($type, $spatial_types) && ($tbl_type == 'MYISAM' || $tbl_type == 'ARIA' || $tbl_type == 'MARIA')) {
$spatial_enabled = false;
} else {
$spatial_enabled = true; $spatial_enabled = true;
} else {
$spatial_enabled = false;
} }
?> ?>
<a <?php echo $spatial_enabled ? '' : ' class="disabled"'; ?>href="sql.php?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD SPATIAL(' . PMA_backquote($row['Field']) . ')'); ?>&amp;message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>"> <a <?php echo $spatial_enabled ? '' : ' class="disabled"'; ?>href="sql.php?<?php echo $url_query; ?>&amp;sql_query=<?php echo urlencode('ALTER TABLE ' . PMA_backquote($table) . ' ADD SPATIAL(' . PMA_backquote($row['Field']) . ')'); ?>&amp;message_to_show=<?php echo urlencode(sprintf(__('An index has been added on %s'), htmlspecialchars($row['Field']))); ?>">