Fix EXPLAIN in MySQL < 5.1, bug since Adminer 3.6.4 (thanks to Coudy)

This commit is contained in:
Jakub Vrana 2013-05-11 08:02:28 -07:00
parent 20915b1764
commit b7e0f1d81c
2 changed files with 2 additions and 1 deletions

View file

@ -851,7 +851,7 @@ if (!defined("DRIVER")) {
* @return Min_Result
*/
function explain($connection, $query) {
return $connection->query("EXPLAIN " . ($connection->server_info ? "PARTITIONS " : "") . $query);
return $connection->query("EXPLAIN " . ($connection->server_info >= 5.1 ? "PARTITIONS " : "") . $query);
}
/** Get approximate number of rows

View file

@ -15,6 +15,7 @@ MySQL: Display bit type as binary number
MySQL: Improve export of binary data types
MySQL: Fix handling of POINT data type (bug #3582578)
MySQL: Don't export binary and geometry columns twice in select
MySQL: Fix EXPLAIN in MySQL < 5.1, bug since Adminer 3.6.4
SQLite: Export views
Adminer 3.6.4 (released 2013-04-26):