Piwigo / GrumPluginClasses

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Repair and Optimize Database throws warnings clustered index

BenMak opened this issue · comments

Hello/Hi/Greetings,

See also https://piwigo.org/forum/viewtopic.php?id=30714

When running Repair and Optimize Database I get following Message:

Warning: [mysql error 1105] ORDER BY ignored as there is a user-defined clustered index in the table 'pi_amm_blocks'
ALTER TABLE pi_amm_blocks ORDER BY id; in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 856

This is a table created by the Advanced Menu Manager plugin. The optimisation attempts to sort the table pi_amm_blocks by id. This is rejected by MySql as this table is already sorted by the (clustered) index.

I removed the Advanced Menu Manager plugin and re-ran Repair and Optimize Database and now received the folowing message:

Warning: [mysql error 1105] ORDER BY ignored as there is a user-defined clustered index in the table 'pi_gpc_request'
ALTER TABLE pi_gpc_request ORDER BY id; in /var/www/html/piwigo/include/dblayer/functions_mysqli.inc.php on line 856

This is a table created by the Grum Plugins Classes plugin. Also here sorting on a table with a clustered index is rejected.

Never the less despite the warnings Piwigo operates fine, but according to Piwigo's Repair and Optimize Database module with a sub-optimum sorting of these tables.
For me the frustrating part is that running the repair and optimization results in warnings and as a result me having to remove plugins until I get the message that optimisation was successful.

Either the plugins need to be modified so no clustered indexes are created in tables or Piwigo has to change the Repair and Optimize Database module such that tables with clustered indexes are skipped from re-sorting.

Any suggestions?

Piwigo 2.10.2
OS: Linux
PHP: 7.3.11
MySQL: 5.5.5-10.3.13-MariaDB
ImageMagick 6.9.10-68