More a regression issue rather than a bug, but it seems in PMA 4.x versions the feature was removed to be able to edit non-unique table rows. Formerly, the WHERE condition would simply take all columns to be able to edit a row.
I know this has been removed to ensure that updating a row does not update other rows "by accident".
But removing the feature to edit such rows alltogether is IMO prevent users from using a tool like phpMyAdmin properly, and would need to make them resort to other tools.
I would like to suggest either one of two things:
1.) Allow a config option to make people ignore the issues such editing would have, and restore PMA < 4.0 behaviour for editing rows.
2.) (the better way) When a temporary WHERE condition is built, execute a query to check if there is more than one result to edit the data. Then issue a huge warning when editing such rows, that updating the data may yield to unexpected results.
I am so far away from the current codebase that I sadly can't offer to check this out on my own. But I am working with some projects where unique keys in tables have not been set ("because of reasons") but we still need to edit data, and can no longer use recent phpMyAdmin versions for this. I know of several other developers who are annoyed by this...
Hi Garvin,
the origin of this behavior change is https://sourceforge.net/p/phpmyadmin/bugs/3672 in October 2012. I don't remember receiving much (if any) complaints about this.
I am leaving this issue open to gather more opinions, but currently my position is that phpMyAdmin also has a "responsibility" into educating users about this matter. See, for example, http://c2.com/cgi/wiki?DatabaseBestPractices.
I do not have a strong opinion on this. Anyway https://github.com/phpmyadmin/phpmyadmin/pull/1751 is a pull request for the first option
Thanks Madhura. Your implementation displays the proper warnings and also, the default behavior of requiring a unique key is respected, so I am happy. Pull request merged.
See also https://github.com/phpmyadmin/phpmyadmin/commit/16856699703b84c22516f8df59d5fdddda066ab4
Hey,
thanks a lot - that helps a lot!