Mise à jour Problème INDEX


#1

Je me suis trouvé au problème de droit de création d’index lors de la mise à jour vers 1.1.1 alors que via phpMyAdmin je peux créer, modifier et supprimer des index. En examinant les instructions SQL données par phpMyAdmin, j’ai modifié les instructions indiqués par Piwik et j’ai pu installer la mise à jour. J’indique le contournement si ça peut être utile…

Ne pas utiliser :


DROP INDEX nom_index ON nom_table

Remplacer par :


ALTER TABLE nom_table DROP INDEX nom_index


(vipsoft) #2

Since MySQL 3.2.2, DROP INDEX is mapped to an ALTER TABLE statement.

What MySQL version are you running? And what Piwik version were you running before the update?


#3

MySQL client version: 5.0.51a
Piwik 0.54 (I believe) before update to 1.1.1 – the update was never proposed in the frontpage.

Effectively, MySQL documentation indicates that DROP INDEX is mapped to an ALTER TABLE statement. I tried to understand why I could bypass the problem using ALTER. I found that exist the privileges ALTER and INDEX. The SHOW GRANTS command gives me this result:


GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER ON `<mydir>`.* TO '<myaccount>'@'<myserver>'

As you can see, INDEX is not granted for me. Sure, it’s stupid to grant ALTER and not INDEX, but…


(vipsoft) #4

Interesting bit of trivia. Thanks.

Well, you’ll be glad to hear that 0.5.5 was the last time we used the short form DROP INDEX. Since then we’ve used the longer form.


#5

O.K. So no further expected problems with updates (for me). Great.

I won’t forget he most important: Piwik 1.1.1 is very comfortable and more complete. Many thanks for the job (use it since PHPmyVisites…)