diff --git a/ChangeLog b/ChangeLog index 7f5dd8a357..d1f49d4d2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -8,6 +8,7 @@ phpMyAdmin - ChangeLog - bug #4767 Drizzle: undefined index in mysql_charsets.inc.php - bug #4753 Normal field and multi-line field have different margins - bug #4760 Cannot re-import settings from local storage +- bug #4778 SQL error when database list is sorted by additional columns 4.3.10.0 (2015-02-20) - bug Undefined index navwork diff --git a/libraries/DatabaseInterface.class.php b/libraries/DatabaseInterface.class.php index 1162c968fd..a61b71c81c 100644 --- a/libraries/DatabaseInterface.class.php +++ b/libraries/DatabaseInterface.class.php @@ -985,7 +985,13 @@ class PMA_DatabaseInterface } $sql .= $sql_where_schema . ' GROUP BY BINARY s.SCHEMA_NAME - ORDER BY BINARY ' . PMA_Util::backquote($sort_by) + ORDER BY '; + if ($sort_by == 'SCHEMA_NAME' + || $sort_by == 'DEFAULT_COLLATION_NAME' + ) { + $sql .= 'BINARY '; + } + $sql .= PMA_Util::backquote($sort_by) . ' ' . $sort_order . $limit; }